{
+ if (!contact) return
+
+ Object.entries(contact).forEach(
+ ([field, value]) => {
+ const errorKey = `rateInfos.${index}.addtlActuaryContacts.${contactIndex}.${field}`
+ if (typeof value === 'string') {
+ errorObject[errorKey] = value
+ }
+ }
+ )
+ })
+ }
})
})
}
diff --git a/services/app-web/src/pages/StateSubmission/RateDetails/SingleRateCert.tsx b/services/app-web/src/pages/StateSubmission/RateDetails/SingleRateCert.tsx
index 7f68e9cada..7f7cfb5fba 100644
--- a/services/app-web/src/pages/StateSubmission/RateDetails/SingleRateCert.tsx
+++ b/services/app-web/src/pages/StateSubmission/RateDetails/SingleRateCert.tsx
@@ -584,11 +584,7 @@ export const SingleRateCert = ({
name={`${fieldNamePrefix}.addtlActuaryContacts`}
>
{({ remove, push }: FieldArrayRenderProps) => (
-
+
{rateInfo.addtlActuaryContacts.length > 0 &&
rateInfo.addtlActuaryContacts.map(
(_actuaryContact, index) => (
@@ -621,7 +617,7 @@ export const SingleRateCert = ({
}}
data-testid="removeContactBtn"
>
- Remove
+ Remove certifying actuary
)
@@ -637,7 +633,7 @@ export const SingleRateCert = ({
>
Add a certifying actuary
-
+
)}
diff --git a/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.tsx b/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.tsx
index ab8bbce07a..d3d946f276 100644
--- a/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.tsx
+++ b/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.tsx
@@ -358,6 +358,27 @@ const RateDetailsV2 = ({
}
)
}
+
+ // If the field is addtlActuaryContacts, then it should be an array.
+ if (
+ field === 'addtlActuaryContacts' &&
+ Array.isArray(value)
+ ) {
+ // Loops through every additional certifying actuary and adds each actuary field with an error to
+ // the errorObject.
+ value.forEach((contact, contactIndex) => {
+ if (!contact) return
+
+ Object.entries(contact).forEach(
+ ([field, value]) => {
+ const errorKey = `rateForms.${index}.addtlActuaryContacts.${contactIndex}.${field}`
+ if (typeof value === 'string') {
+ errorObject[errorKey] = value
+ }
+ }
+ )
+ })
+ }
})
})
}
diff --git a/services/app-web/src/pages/StateSubmission/RateDetails/V2/SingleRateFormFields.tsx b/services/app-web/src/pages/StateSubmission/RateDetails/V2/SingleRateFormFields.tsx
index bdd19522e6..b913c0e7f7 100644
--- a/services/app-web/src/pages/StateSubmission/RateDetails/V2/SingleRateFormFields.tsx
+++ b/services/app-web/src/pages/StateSubmission/RateDetails/V2/SingleRateFormFields.tsx
@@ -502,11 +502,7 @@ export const SingleRateFormFields = ({
/>
{({ remove, push }: FieldArrayRenderProps) => (
-
+
{rateForm.addtlActuaryContacts.length > 0 &&
rateForm.addtlActuaryContacts.map(
(_actuaryContact, index) => (
@@ -535,7 +531,7 @@ export const SingleRateFormFields = ({
}}
data-testid="removeContactBtn"
>
- Remove
+ Remove certifying actuary
)
@@ -551,7 +547,7 @@ export const SingleRateFormFields = ({
>
Add a certifying actuary
-
+
)}
diff --git a/services/app-web/src/pages/StateSubmission/StateSubmissionForm.module.scss b/services/app-web/src/pages/StateSubmission/StateSubmissionForm.module.scss
index 0ec0911930..c9582be711 100644
--- a/services/app-web/src/pages/StateSubmission/StateSubmissionForm.module.scss
+++ b/services/app-web/src/pages/StateSubmission/StateSubmissionForm.module.scss
@@ -105,10 +105,10 @@
.stateContact,
.actuaryContact {
- margin-bottom: uswds.units(5);
+ margin-bottom: uswds.units(2);
.removeContactBtn {
- margin-top: 0.5rem;
+ margin-top: uswds.units(3);
@include uswds.u-text('secondary');
}
}
@@ -128,7 +128,7 @@
}
.removeContactBtn {
- margin-top: uswds.units(4);
+ margin-top: uswds.units(3);
}
}