Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

93461: Add #employment_history to VBA214140 #20231

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

derekhouck
Copy link
Contributor

@derekhouck derekhouck commented Jan 10, 2025

Summary

  • This work is behind a feature toggle (flipper): NO
  • This should be the penultimate PR spawned from Create model class for Employment-History questionnaire va.gov-team#93461 due to LOC limitations. There should be one more PR after this.
  • Adds #employment_history and #employed? to VBA214140.
  • Maps employment history submission data to the 21-4140 PDF template.
  • Creates a FormEngine::EmploymentHistory class to handle employment history data.

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Unit tests for the new FormEngine::EmploymentHistory class
  • Unit tests for the #employment_history and #employed? instance methods

What areas of the site does it impact?

At the moment, none. It will ultimately impact the Simple Forms API, adding support for the 21-4140 form.

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

Comment on lines +83 to +85
"F[0].#subform[1].Name_And_Address_Of_Employer[0]": "<%= form.employment_history[3].name_and_address %>",
"F[0].#subform[1].Name_And_Address_Of_Employer[1]": "<%= form.employment_history[2].name_and_address %>",
"F[0].#subform[1].Name_And_Address_Of_Employer[2]": "<%= form.employment_history[1].name_and_address %>",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Form mappings go from bottom of the page to the top for some reason, so all employers are iterated over in reverse order.

Comment on lines +111 to +112
"F[0].#subform[1].Gross_Earnings_Per_Month[0]": "<%= form.employment_history[2].highest_income %>",
"F[0].#subform[1].Gross_Earnings_Per_Month[1]": "<%= form.employment_history[3].highest_income %>",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two fields are flipped on the PDF mapping, hence the odd ordering.

@va-vfs-bot va-vfs-bot temporarily deployed to 93461-employment-history/main/main January 10, 2025 17:43 Inactive
@derekhouck derekhouck changed the title 93461 employment history 93461: Add #employment_history to VBA214140 Jan 10, 2025
Comment on lines +33 to +35
def employed?
data['employers'] ? data['employers'].size.positive? : false
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method will be used in a later PR when we're figuring out where to put signatures and dates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants