Skip to content

Commit

Permalink
Sa 101518 5490 dup contact info modal (#32860)
Browse files Browse the repository at this point in the history
* add dup email/phone to state

* fix your info review section

* fix submit transform

* mocked dupe contact response
  • Loading branch information
s-caso authored Nov 2, 2024
1 parent f067f50 commit 5921e81
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ const PersonalInformationReviewField = ({
userFullName,
}) => {
const formattedDateOfBirth = formatDateString(dateOfBirth);

return (
<>
<div className="form-review-panel-page">
<button
aria-label={`Edit ${title}`}
className="edit-btn primary-outline"
onClick={editPage}
type="button"
>
Edit
</button>
<div className="form-review-panel-page-header-row">
<va-button
aria-label={`Edit ${title}`}
secondary
text="Edit"
onClick={editPage}
/>
</div>

<dl className="review">
<div className="review-row">
<p className="va-address-block">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ function App({
}

if (
formData?.mobilePhone?.phone &&
formData?.email &&
(formData?.mobilePhone?.phone || formData?.email) &&
!formData?.duplicateEmail &&
!formData?.duplicatePhone
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const getAppData = state => ({
formId: state?.form?.formId,
isPersonalInfoFetchComplete: state.data?.personalInfoFetchComplete,
isSponsorsFetchComplete: state.data?.fetchedSponsorsComplete,
duplicateEmail: state.data?.duplicateEmail,
duplicatePhone: state.data?.duplicatePhone,
isLOA1: isLOA1Selector(state),
isLOA3: isLOA3Selector(state),
savedForms: state?.user?.profile?.savedForms,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const dupContactInfoReponse = {
data: {
id: '',
type: 'meb_api_dgi_dup_contact_responses',
attributes: {
email: [{ value: '[email protected]', dupe: true }],
phone: [{ value: '8013090123', dupe: true }],
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,14 @@ export function transform5490Form(_formConfig, form) {
addressLine2: form?.data?.mailingAddressInput?.address?.street2,
city: form?.data?.mailingAddressInput?.address?.city,
zipcode: form?.data?.mailingAddressInput?.address?.postalCode,
emailAddress: form?.data?.email?.email,
emailAddress: form?.data?.email,
addressType: getAddressType(form?.data?.mailingAddressInput),
mobilePhoneNumber: form?.data?.mobilePhone?.phone,
homePhoneNumber: form?.data?.homePhone?.phone,
countryCode: getLTSCountryCode(
form?.data?.mailingAddressInput?.address?.country,
),
stateCode: form?.data?.mailingAddressInput?.state,
stateCode: form?.data?.mailingAddressInput?.address?.state,
},
preferredContact: form?.data?.contactMethod,
},
Expand Down

0 comments on commit 5921e81

Please sign in to comment.