Skip to content

Commit

Permalink
WIP: moved actuary radio group
Browse files Browse the repository at this point in the history
  • Loading branch information
ruizajtruss committed Apr 10, 2024
1 parent adc5425 commit b3eb93c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 73 deletions.
75 changes: 2 additions & 73 deletions services/app-web/src/pages/StateSubmission/Contacts/Contacts.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import React, { useEffect } from 'react'
import * as Yup from 'yup'
import {
Form as UswdsForm,
FormGroup,
Fieldset,
Button,
} from '@trussworks/react-uswds'
import { Form as UswdsForm, Fieldset, Button } from '@trussworks/react-uswds'
import {
Formik,
FormikErrors,
FormikHelpers,
FieldArray,
ErrorMessage,
getIn,
FieldArrayRenderProps,
} from 'formik'
Expand All @@ -25,11 +19,7 @@ import {
StateContact,
} from '../../../common-code/healthPlanFormDataType'

import {
ErrorSummary,
FieldRadio,
FieldTextInput,
} from '../../../components/Form'
import { ErrorSummary, FieldTextInput } from '../../../components/Form'

import { useFocus } from '../../../hooks/useFocus'
import { PageActions } from '../PageActions'
Expand Down Expand Up @@ -594,67 +584,6 @@ const Contacts = ({
</FieldArray>
</fieldset>
</SectionCard>

<SectionCard>
<fieldset className="usa-fieldset with-sections">
<h3>
Actuaries' communication
preference
</h3>

<legend className="srOnly">
Actuarial communication
preference
</legend>
<FormGroup
error={showFieldErrors(
errors.actuaryCommunicationPreference
)}
>
<Fieldset
className={
styles.radioGroup
}
legend="Communication preference between CMS Office of the Actuary (OACT) and all state’s actuaries (i.e. certifying actuaries and additional actuary contacts)"
>
<span
className={
styles.requiredOptionalText
}
>
Required
</span>
{showFieldErrors(
`True`
) && (
<ErrorMessage
name={`actuaryCommunicationPreference`}
component="div"
className="usa-error-message"
/>
)}
<FieldRadio
id="OACTtoActuary"
name="actuaryCommunicationPreference"
label={`OACT can communicate directly with the state’s actuaries but should copy the state on all written communication and all appointments for verbal discussions.`}
value={
'OACT_TO_ACTUARY'
}
aria-required
/>
<FieldRadio
id="OACTtoState"
name="actuaryCommunicationPreference"
label={`OACT can communicate directly with the state, and the state will relay all written communication to their actuaries and set up time for any potential verbal discussions.`}
value={
'OACT_TO_STATE'
}
aria-required
/>
</Fieldset>
</FormGroup>
</fieldset>
</SectionCard>
</>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,47 @@ export const SingleRateFormFields = ({
fieldSetLegend="Certifying Actuary"
/>
</FormGroup>
<FormGroup
error={Boolean(
showFieldErrors('actuaryCommunicationPreference')
)}
>
<Fieldset
className={styles.radioGroup}
legend="Actuaries' communication preference"
role="radiogroup"
aria-required
>
<span
className={styles.requiredOptionalText}
style={{ marginBottom: '10px' }}
>
Required
</span>
<span className={styles.requiredOptionalText}>
Communication preference between CMS Office of the
Actuary (OACT) and all state’s actuaries (i.e.
certifying actuaries and additional actuary contacts)
</span>
<PoliteErrorMessage>
{showFieldErrors('actuaryCommunicationPreference')}
</PoliteErrorMessage>
<FieldRadio
id={`OACTtoActuary-${index}`}
name={`${fieldNamePrefix}.actuaryCommunicationPreference`}
label={`OACT can communicate directly with the state's actuaries but should copy the state on all written communication and all appointments for verbal discussions.`}
value={'OACT_TO_ACTUARY'}
aria-required
/>
<FieldRadio
id={`OACTtoState-${index}`}
name={`${fieldNamePrefix}.actuaryCommunicationPreference`}
label={`OACT can communicate directly with the state, and the state will relay all written communication to their actuaries and set up time for any potential verbal discussions.`}
value={'OACT_TO_STATE'}
aria-required
/>
</Fieldset>
</FormGroup>
</>
)
}

0 comments on commit b3eb93c

Please sign in to comment.