Skip to content

Commit

Permalink
99306 Copy changes and conditional updates - form 10-7959c (#33738)
Browse files Browse the repository at this point in the history
* updated missingfileoverview to properly catch name field

* updated e2e tests

* added updateSchema for applicantEmail

* copy changes
  • Loading branch information
michaelclement authored Dec 27, 2024
1 parent c8d41c0 commit e3e92a0
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,23 @@ export const applicantContactInfoSchema = {
),
applicantPhone: phoneUI(),
applicantEmail: emailUI(),
'ui:options': {
updateSchema: (formData, formSchema) => {
const fs = JSON.parse(JSON.stringify(formSchema)); // Deep copy
// If user is the applicant, they have already given us an email
// previously in signer section, so remove the field on this page:
if (formData.certifierRole === 'applicant') {
delete fs.properties.applicantEmail;
// Just in case we require this email field in future, be sure to un-require it:
fs.required = fs.required.filter(f => f !== 'applicantEmail');
} else if (fs.properties.applicantEmail === undefined) {
// Replace email field if we previously dropped it and
// user is not the applicant:
fs.properties.applicantEmail = emailSchema;
}
return fs;
},
},
},
schema: {
type: 'object',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,8 @@ export const applicantMedicareABUploadSchema = {
<br />
Upload a copy of one of these documents:
<ul>
<li>
Medicare Parts A and B card, <b>or</b>
</li>
<li>
Medicare Advantage card, <b>or</b>
</li>
<li>Medicare Parts A and B card, or</li>
<li>Medicare Advantage card, or</li>
<li>Medicare PACE card</li>
</ul>
If you don’t have a copy to upload now, you can send it by mail or
Expand Down
2 changes: 2 additions & 0 deletions src/applications/ivc-champva/10-7959C/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const officeAddress = (
P.O. Box 469063
<br />
Denver, CO 80246-9063
<br />
United States of America
</>
);
export const officeFaxNum = '3033317808';
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
],
"consentToMailMissingRequiredFiles": true,
"certifierRole": "other",
"certifierEmail": "[email protected]",
"signature": "Certifier Jones"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"suffix": "III"
},
"certifierRole": "other",
"certifierEmail": "[email protected]",
"signature": "Certifier Jones"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
],
"consentToMailMissingRequiredFiles": true,
"certifierRole": "other",
"certifierEmail": "[email protected]",
"signature": "Certifier Jones"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
],
"consentToMailMissingRequiredFiles": true,
"certifierRole": "other",
"certifierEmail": "[email protected]",
"signature": "Certifier Jones"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"certifierRole": "applicant",
"certifierEmail": "[email protected]",
"primaryInsuranceCard": [
{
"name": "example_upload.png",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"secondaryMedigapPlan": "M",
"secondaryAdditionalComments": "Additional secondary comment",
"certifierRole": "other",
"certifierEmail": "[email protected]",
"signature": "Certifier Jones",
"consentToMailMissingRequiredFiles": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"consentToMailMissingRequiredFiles": true,
"certifierRole": "other",
"certifierEmail": "[email protected]",
"signature": "Certifier Jones"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"primaryAdditionalComments": "Additional primary comment",
"consentToMailMissingRequiredFiles": true,
"certifierRole": "other",
"certifierEmail": "[email protected]",
"signature": "Certifier Jones"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default function MissingFileOverview({
// Update sponsor to identify missing uploads
const sponsorConditionalPages = getConditionalPages(pages, data);
const sponsorMiss = {
name: data?.[nonListNameKey || 'veteransFullName'],
[nonListNameKey ?? 'name']: data?.[nonListNameKey || 'veteransFullName'],
missingUploads: checkFlags(
sponsorConditionalPages,
data,
Expand Down

0 comments on commit e3e92a0

Please sign in to comment.