-
Notifications
You must be signed in to change notification settings - Fork 128
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
Authed patterns/aw/159/update prefill add 22 1990 form task gray #32364
Merged
adamwhitlock1
merged 9 commits into
main
from
authed-patterns/aw/159/update-prefill-add-22-1990-form-task-gray
Oct 11, 2024
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9319310
add 22 1990 form files to orange task, rename red to gray task
adamwhitlock1 0b38005
add required toggle for 22-1990, get form rendering with intro page
adamwhitlock1 bf8a0b4
add sip prefill data for 22-1990
adamwhitlock1 46941f2
tweak mock response names
adamwhitlock1 0e24cde
Merge branch 'main' into authed-patterns/aw/159/update-prefill-add-22…
adamwhitlock1 66056ca
restore opt out wizard from origin app folder
adamwhitlock1 37f7cc3
remove import from other app
adamwhitlock1 12f2151
test: fix unit test
adamwhitlock1 ae65359
fix: put edu wizard back
adamwhitlock1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/applications/_mock-form-ae-design-patterns/mocks/endpoints/in-progress-forms/22-1990.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const responses = { | ||
FORM_22_1990: { | ||
minimal: { | ||
formData: { | ||
veteranFullName: { | ||
first: 'Mitchell', | ||
middle: 'George', | ||
last: 'Jenkins', | ||
}, | ||
gender: 'M', | ||
veteranDateOfBirth: '1956-07-10', | ||
veteranSocialSecurityNumber: '796123607', | ||
homePhone: '8015551217', | ||
mobilePhone: '6493315849', | ||
veteranAddress: { | ||
street: '419 LaPorte Ave', | ||
street2: 'Apt C', | ||
city: 'Fort Collins', | ||
state: 'CO', | ||
country: 'USA', | ||
postalCode: '80521', | ||
}, | ||
toursOfDuty: [ | ||
{ | ||
serviceBranch: 'Space Force', | ||
dateRange: { | ||
from: '2021-01-01', | ||
to: '2023-01-01', | ||
}, | ||
}, | ||
], | ||
}, | ||
metadata: { | ||
version: 0, | ||
prefill: true, | ||
returnUrl: '/applicant/information', | ||
}, | ||
}, | ||
}, | ||
}; | ||
module.exports = responses; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions
36
src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskOrange/Form1990App.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React, { useEffect } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import RoutedSavableApp from 'platform/forms/save-in-progress/RoutedSavableApp'; | ||
import formConfig from './config/form'; | ||
|
||
export default function Form1990Entry({ location, children }) { | ||
/* This useEffect is to add custom class to remove the extra margin-top for radio buttons | ||
in benefits-selection and review-and-submit pages. */ | ||
useEffect( | ||
() => { | ||
const fieldset = document.querySelector('body'); | ||
if ( | ||
location.pathname.includes('benefits-selection') || | ||
location.pathname === '/review-and-submit' | ||
) { | ||
fieldset.classList.add('fieldset-wrapper'); | ||
} else { | ||
fieldset.classList.remove('fieldset-wrapper'); | ||
} | ||
}, | ||
[location.pathname], | ||
); | ||
return ( | ||
<RoutedSavableApp formConfig={formConfig} currentLocation={location}> | ||
{children} | ||
</RoutedSavableApp> | ||
); | ||
} | ||
|
||
Form1990Entry.propTypes = { | ||
children: PropTypes.oneOfType([ | ||
PropTypes.arrayOf(PropTypes.node), | ||
PropTypes.node, | ||
]).isRequired, | ||
location: PropTypes.object, | ||
}; |
168 changes: 168 additions & 0 deletions
168
...rm-ae-design-patterns/patterns/pattern2/TaskOrange/components/ConfirmationPageContent.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
import React, { useState } from 'react'; | ||
import moment from 'moment'; | ||
|
||
export function ConfirmationPageContent({ | ||
additionalGuidance, | ||
afterTitleContent, | ||
claimInfoListItems, | ||
displayDefaultClaimList = true, | ||
docExplanation, | ||
docExplanationHeader, | ||
formId, | ||
formName = 'Education benefit application', | ||
guidance = ( | ||
<> | ||
<h3 className="confirmation-guidance-heading vads-u-font-size--h4"> | ||
What happens after I apply? | ||
</h3> | ||
<p className="confirmation-guidance-message"> | ||
We usually decide on applications within 30 days. | ||
</p> | ||
<p className="confirmation-guidance-message"> | ||
You’ll get a Certificate of Eligibility (COE) or decision letter in the | ||
mail. If we’ve approved your application, you can bring the COE to the | ||
VA certifying official at your school. | ||
</p> | ||
<p> | ||
<a href="/education/after-you-apply/"> | ||
Learn more about what happens after you apply | ||
</a> | ||
</p> | ||
</> | ||
), | ||
name, | ||
printHeader = 'Update your education benefits', | ||
submission, | ||
}) { | ||
const [isExpanded, setIsExpanded] = useState(false); | ||
const response = submission.response ? submission.response.attributes : {}; | ||
const displayFormId = formId[0] === '2' ? `Form ${formId}` : formId; | ||
|
||
const claimList = () => { | ||
return [ | ||
<li key="confirmation-number"> | ||
<strong>Confirmation number</strong> | ||
<br /> | ||
<span>{response.confirmationNumber}</span> | ||
</li>, | ||
<li key="date-received"> | ||
<strong>Date received</strong> | ||
<br /> | ||
<span>{moment(submission.submittedAt).format('MMM D, YYYY')}</span> | ||
</li>, | ||
<li key="regional-office"> | ||
<strong>Your claim was sent to</strong> | ||
<br /> | ||
<address className="schemaform-address-view"> | ||
{response.regionalOffice} | ||
</address> | ||
</li>, | ||
]; | ||
}; | ||
|
||
return ( | ||
<div> | ||
<> | ||
<div className="print-only"> | ||
<img src="/img/design/logo/va-logo.png" alt="VA logo" width="300" /> | ||
<h1 className="vads-u-font-size--h3 vads-u-margin-top--3"> | ||
{printHeader} | ||
</h1> | ||
<span>{displayFormId}</span> | ||
</div> | ||
<h2 className="confirmation-page-title screen-only vads-u-font-size--h3"> | ||
We've received your application. | ||
</h2> | ||
<h4 className="print-only">We've received your application.</h4> | ||
<p> | ||
We usually process claims within <strong>30 days</strong>.<br /> | ||
We may contact you if we need more information or documents. | ||
</p> | ||
<p> | ||
<button | ||
className="usa-button-primary screen-only" | ||
onClick={() => window.print()} | ||
> | ||
Print this page | ||
</button> | ||
</p> | ||
</> | ||
|
||
{afterTitleContent} | ||
|
||
<div className="inset"> | ||
<h3 className="vads-u-margin-top--0 confirmation-header vads-u-font-size--h4"> | ||
{formName}{' '} | ||
<span className="vads-u-margin--0 vads-u-display--inline-block"> | ||
({displayFormId}) | ||
</span> | ||
</h3> | ||
{name && ( | ||
<span className="applicant-name"> | ||
for {name.first} | ||
{name.middle && ` ${name.middle}`} | ||
{name.last && ` ${name.last}`} | ||
{name.suffix && ` ${name.suffix}`} | ||
</span> | ||
)} | ||
|
||
<ul className="claim-list"> | ||
{claimInfoListItems} | ||
{displayDefaultClaimList && claimList()} | ||
</ul> | ||
</div> | ||
|
||
{docExplanation && | ||
docExplanationHeader && ( | ||
<div | ||
id="collapsiblePanel" | ||
className="usa-accordion-bordered screen-only" | ||
> | ||
{/* eslint-disable-next-line jsx-a11y/no-redundant-roles */} | ||
<ul className="usa-unstyled-list" role="list"> | ||
<li> | ||
<div className="accordion-header clearfix"> | ||
<button | ||
className="usa-button-unstyled doc-explanation" | ||
aria-expanded={isExpanded ? 'true' : 'false'} | ||
aria-controls="collapsible-document-explanation" | ||
onClick={() => setIsExpanded(!isExpanded)} | ||
> | ||
{docExplanationHeader} | ||
</button> | ||
</div> | ||
|
||
{isExpanded && ( | ||
<div id="collapsible-document-explanation"> | ||
<div className="usa-accordion-content" aria-hidden="false"> | ||
{docExplanation} | ||
</div> | ||
</div> | ||
)} | ||
</li> | ||
</ul> | ||
</div> | ||
)} | ||
<div className="confirmation-guidance-container"> | ||
{additionalGuidance} | ||
{guidance} | ||
<h3 className="confirmation-guidance-heading vads-u-border-bottom--3px vads-u-border-color--primary vads-u-line-height--4 vads-u-font-size--h4"> | ||
Need help? | ||
</h3> | ||
|
||
<p className="confirmation-guidance-message"> | ||
If you have questions, call 1-888-GI-BILL-1 ( | ||
<va-telephone contact="8884424551" /> | ||
), Monday – Friday, 8:00 a.m. – 7:00 p.m. ET. | ||
</p> | ||
</div> | ||
<div className="form-progress-buttons schemaform-back-buttons"> | ||
<a href="/"> | ||
<button type="button" className="usa-button-primary"> | ||
Go back to VA.gov | ||
</button> | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
} |
19 changes: 19 additions & 0 deletions
19
...s/_mock-form-ae-design-patterns/patterns/pattern2/TaskOrange/components/EducationView.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { formatReviewDate } from 'platform/forms-system/src/js/helpers'; | ||
|
||
export default function EducationView({ formData }) { | ||
let from = ''; | ||
let to = ''; | ||
if (formData.dateRange) { | ||
from = formatReviewDate(formData.dateRange.from); | ||
to = formatReviewDate(formData.dateRange.to); | ||
} | ||
|
||
return ( | ||
<div> | ||
<strong>{formData.name}</strong> | ||
<br /> | ||
{from} — {to} | ||
</div> | ||
); | ||
} |
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint disabled here