diff --git a/backend/akr/src/main/java/fi/oph/akr/onr/OnrOperationApiImpl.java b/backend/akr/src/main/java/fi/oph/akr/onr/OnrOperationApiImpl.java index 6ccf98dd3..8b7dfea7d 100644 --- a/backend/akr/src/main/java/fi/oph/akr/onr/OnrOperationApiImpl.java +++ b/backend/akr/src/main/java/fi/oph/akr/onr/OnrOperationApiImpl.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import fi.oph.akr.api.dto.clerk.ClerkTranslatorAddressDTO; import fi.oph.akr.api.dto.translator.TranslatorAddressDTO; import fi.oph.akr.config.Constants; import fi.oph.akr.onr.dto.ContactDetailsGroupDTO; diff --git a/frontend/packages/akr/src/components/clerkTranslator/new/NewTranslatorBasicInformation.tsx b/frontend/packages/akr/src/components/clerkTranslator/new/NewTranslatorBasicInformation.tsx index a9ee3ec35..a765e7a2c 100644 --- a/frontend/packages/akr/src/components/clerkTranslator/new/NewTranslatorBasicInformation.tsx +++ b/frontend/packages/akr/src/components/clerkTranslator/new/NewTranslatorBasicInformation.tsx @@ -26,13 +26,6 @@ export const NewTranslatorBasicInformation = ({ handleFieldChange(field, event.target.value); }; - /* - const handleComboBoxChange = - (field: keyof ClerkTranslatorBasicInformation) => (value?: string) => { - handleFieldChange(field, value); - }; - */ - const handleCheckBoxChange = (field: keyof ClerkTranslatorBasicInformation) => (_event: ChangeEvent, checked: boolean) => { @@ -65,9 +58,6 @@ export const NewTranslatorBasicInformation = ({ handleTextFieldChange(field) } onAddressChange={handleAddressChange} - // onComboBoxChange={(field: keyof ClerkTranslatorBasicInformation) => - // handleComboBoxChange(field) - // } onCheckBoxChange={(field: keyof ClerkTranslatorBasicInformation) => handleCheckBoxChange(field) } diff --git a/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorAddressFields.tsx b/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorAddressFields.tsx index 6e85b8b1b..1b1553d76 100644 --- a/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorAddressFields.tsx +++ b/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorAddressFields.tsx @@ -32,10 +32,10 @@ import { WithId } from 'interfaces/with'; type ClerkTranslatorAddressRow = ClerkTranslatorAddress & WithId; const textFieldMaxLengths = { - [ClerkTranslatorAddressFieldEnum.Street]: 4096, - [ClerkTranslatorAddressFieldEnum.PostalCode]: 4096, - [ClerkTranslatorAddressFieldEnum.Town]: 4096, - [ClerkTranslatorAddressFieldEnum.Country]: 4096, + [ClerkTranslatorAddressFieldEnum.Street]: 255, + [ClerkTranslatorAddressFieldEnum.PostalCode]: 255, + [ClerkTranslatorAddressFieldEnum.Town]: 255, + [ClerkTranslatorAddressFieldEnum.Country]: 255, }; const getTextFieldMaxLength = (field: ClerkTranslatorAddressFieldEnum) => { diff --git a/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorDetailsFields.tsx b/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorDetailsFields.tsx index e441989d0..67dfc5017 100644 --- a/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorDetailsFields.tsx +++ b/frontend/packages/akr/src/components/clerkTranslator/overview/ClerkTranslatorDetailsFields.tsx @@ -97,15 +97,13 @@ const emptyAddress = { postalCode: '', town: '', country: '', - source: 'alkupera8', + source: ClerkTranslatorAddressSource.AKR, type: 'yhteystietotyyppi14', selected: false, }; const findAkrAddress = (addresses: Array) => - addresses - .filter((addr) => addr.source === ClerkTranslatorAddressSource.AKR) - .shift(); + addresses.find((addr) => addr.source === ClerkTranslatorAddressSource.AKR); const ClerkTranslatorDetailsTextField = ({ translator, @@ -238,22 +236,6 @@ export const ClerkTranslatorDetailsFields = ({ ) : [...addresses, address]; - // const countryCodeToLabel = (code: string) => { - // const label = translateCountry(code); - - // const labelKosovoFixedDuplicate = - // code === 'XKK' || code === 'XKX' ? `${label} ${code}` : label; - - // return { - // label: labelKosovoFixedDuplicate, - // value: code, - // }; - // }; - - // const comboBoxCountryValues: { label: string; value: string }[] = Object.keys( - // koodistoCountriesFI?.akr?.koodisto?.countries - // ).map(countryCodeToLabel); - return ( <>
diff --git a/frontend/packages/akr/src/interfaces/clerkPerson.ts b/frontend/packages/akr/src/interfaces/clerkPerson.ts index 2e8a5ae43..8a5ea46f0 100644 --- a/frontend/packages/akr/src/interfaces/clerkPerson.ts +++ b/frontend/packages/akr/src/interfaces/clerkPerson.ts @@ -1,6 +1,4 @@ -import { - ClerkTranslatorAddress, -} from 'interfaces/clerkTranslator'; +import { ClerkTranslatorAddress } from 'interfaces/clerkTranslator'; export interface ClerkPerson { onrId: string;