diff --git a/frontend/src/citizen-frontend/applications/editor/contact-info/SecondGuardianSubSection.tsx b/frontend/src/citizen-frontend/applications/editor/contact-info/SecondGuardianSubSection.tsx index 93218963c14..9446aa10b04 100644 --- a/frontend/src/citizen-frontend/applications/editor/contact-info/SecondGuardianSubSection.tsx +++ b/frontend/src/citizen-frontend/applications/editor/contact-info/SecondGuardianSubSection.tsx @@ -4,12 +4,12 @@ import React from 'react' -import { ContactInfoFormData } from 'lib-common/api-types/application/ApplicationFormData' -import { UpdateStateFn } from 'lib-common/form-state' import { - ApplicationType, - OtherGuardianAgreementStatus -} from 'lib-common/generated/api-types/application' + ContactInfoFormData, + SelectableOtherGuardianAgreementStatus +} from 'lib-common/api-types/application/ApplicationFormData' +import { UpdateStateFn } from 'lib-common/form-state' +import { ApplicationType } from 'lib-common/generated/api-types/application' import InputField from 'lib-components/atoms/form/InputField' import Radio from 'lib-components/atoms/form/Radio' import AdaptiveFlex from 'lib-components/layout/AdaptiveFlex' @@ -31,11 +31,6 @@ type SecondGuardianSubSectionProps = { otherGuardianStatus: 'NO' | 'SAME_ADDRESS' | 'DIFFERENT_ADDRESS' } -export type SelectableOtherGuardianAgreementStatus = Exclude< - OtherGuardianAgreementStatus, - 'AUTOMATED' -> - export default React.memo(function SecondGuardianSubSection({ type, formData, diff --git a/frontend/src/employee-frontend/components/application-page/ApplicationEditView.tsx b/frontend/src/employee-frontend/components/application-page/ApplicationEditView.tsx index bb70d8e9395..67c29f3d03e 100644 --- a/frontend/src/employee-frontend/components/application-page/ApplicationEditView.tsx +++ b/frontend/src/employee-frontend/components/application-page/ApplicationEditView.tsx @@ -9,13 +9,13 @@ import { Link } from 'react-router' import styled from 'styled-components' import { Result, wrapResult } from 'lib-common/api' +import { SelectableOtherGuardianAgreementStatus } from 'lib-common/api-types/application/ApplicationFormData' import { swapElements } from 'lib-common/array' import DateRange from 'lib-common/date-range' import { Address, ApplicationDetails, FutureAddress, - OtherGuardianAgreementStatus, PersonBasics } from 'lib-common/generated/api-types/application' import { AttachmentType } from 'lib-common/generated/api-types/attachment' @@ -94,12 +94,7 @@ const PreferredUnitGridContainer = styled.div` grid-template-columns: 1fr auto auto auto auto; ` -export type SelectableOtherGuardianAgreementStatus = Exclude< - OtherGuardianAgreementStatus, - 'AUTOMATED' -> | null - -const selectableOtherGuardianAgreementStatuses: SelectableOtherGuardianAgreementStatus[] = +const selectableOtherGuardianAgreementStatuses: (SelectableOtherGuardianAgreementStatus | null)[] = ['AGREED', 'NOT_AGREED', 'RIGHT_TO_GET_NOTIFIED', null] export default React.memo(function ApplicationEditView({ diff --git a/frontend/src/lib-common/api-types/application/ApplicationFormData.ts b/frontend/src/lib-common/api-types/application/ApplicationFormData.ts index 7f78abc6cda..7c1c7b33227 100644 --- a/frontend/src/lib-common/api-types/application/ApplicationFormData.ts +++ b/frontend/src/lib-common/api-types/application/ApplicationFormData.ts @@ -46,6 +46,11 @@ export type UnitPreferenceFormData = { preferredUnits: { id: DaycareId; name: string }[] } +export type SelectableOtherGuardianAgreementStatus = Exclude< + OtherGuardianAgreementStatus, + 'AUTOMATED' +> + export type ContactInfoFormData = { childFirstName: string childLastName: string