From dc4a24b49c709065827eedde3ce5c1c1828a677a Mon Sep 17 00:00:00 2001 From: Rodrigo Louro Date: Mon, 20 Apr 2026 12:06:27 +0200 Subject: [PATCH 1/2] Fix: No ZIP/PLZ-code for Accompanying details #344 Fix: No ZIP/PLZ-code for Accompanying details #344 --- public/locales/de/translations.json | 1 + public/locales/en/translations.json | 1 + .../AccompanyingDetailsDisplay.tsx | 8 ++++++++ .../AccompanyingDetailsEdit.tsx | 19 ++++++++++++++++--- .../accompanyingDetailsSchema.ts | 1 + .../sections/AccompanyingDetails/helpers.ts | 1 + 6 files changed, 28 insertions(+), 3 deletions(-) diff --git a/public/locales/de/translations.json b/public/locales/de/translations.json index a3f1a932..48a1a11f 100644 --- a/public/locales/de/translations.json +++ b/public/locales/de/translations.json @@ -1021,6 +1021,7 @@ "accompanyingDetailsTitle": "Begleitdetails", "accompanyingDetails": { "appointmentAddress": "Terminadresse", + "appointmentPostcode": "Terminpostleitzahl", "appointmentDate": "Termindatum", "appointmentTime": "Terminzeit", "refugeeNumber": "Geflüchtetennummer", diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index 2b107865..c0364beb 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -1020,6 +1020,7 @@ "accompanyingDetailsTitle": "Accompanying details", "accompanyingDetails": { "appointmentAddress": "Appointment address", + "appointmentPostcode": "Appointment postcode", "appointmentDate": "Appointment date", "appointmentTime": "Appointment time", "refugeeNumber": "Refugee number", diff --git a/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsDisplay.tsx b/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsDisplay.tsx index 64e9d9fd..1a22ae05 100644 --- a/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsDisplay.tsx +++ b/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsDisplay.tsx @@ -23,6 +23,14 @@ export const AccompanyingDetailsDisplay = ({ values, languageLabel }: Props) => setValue={() => {}} /> + {}} + /> + {values.appointmentDate ? format(values.appointmentDate, "dd.MM.yyyy") : EMPTY_PLACEHOLDER_VALUE} diff --git a/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsEdit.tsx b/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsEdit.tsx index bcff065b..dce6d0b9 100644 --- a/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsEdit.tsx +++ b/src/components/Dashboard/Profile/sections/AccompanyingDetails/AccompanyingDetailsEdit.tsx @@ -60,6 +60,21 @@ export const AccompanyingDetailsEdit = ({ )} /> + }) => ( + + )} + /> + {errors.appointmentTime && ( - {t( - `dashboard.opportunityProfile.accompanyingDetails.validation.${errors.appointmentTime.message}`, - )} + {t(`dashboard.opportunityProfile.accompanyingDetails.validation.${errors.appointmentTime.message}`)} )} diff --git a/src/components/Dashboard/Profile/sections/AccompanyingDetails/accompanyingDetailsSchema.ts b/src/components/Dashboard/Profile/sections/AccompanyingDetails/accompanyingDetailsSchema.ts index f36c634c..558db99c 100644 --- a/src/components/Dashboard/Profile/sections/AccompanyingDetails/accompanyingDetailsSchema.ts +++ b/src/components/Dashboard/Profile/sections/AccompanyingDetails/accompanyingDetailsSchema.ts @@ -4,6 +4,7 @@ const timeRegex = /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/; export const accompanyingDetailsSchema = z.object({ appointmentAddress: z.string().optional(), + appointmentPostcode: z.string().optional(), appointmentDate: z.date().nullable().optional(), appointmentTime: z .string() diff --git a/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts b/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts index 2a46e59e..37c3a210 100644 --- a/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts +++ b/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts @@ -38,6 +38,7 @@ export const getInitialFormValues = ( details: ApiOpportunityAccompanyingDetails | undefined, ): AccompanyingDetailsFormData => ({ appointmentAddress: details?.appointmentAddress || "", + appointmentPostcode: "", appointmentDate: parseDate(details?.appointmentDate), appointmentTime: parseTime(details?.appointmentTime), refugeeNumber: details?.refugeeNumber || "", From 60746620605b4caffb66f784e765ffe9f067b26b Mon Sep 17 00:00:00 2001 From: Rodrigo Louro Date: Tue, 21 Apr 2026 15:18:12 +0200 Subject: [PATCH 2/2] Fix: helpers.ts Fix: helpers.ts --- .../Dashboard/Profile/sections/AccompanyingDetails/helpers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts b/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts index 37c3a210..0fb1dcda 100644 --- a/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts +++ b/src/components/Dashboard/Profile/sections/AccompanyingDetails/helpers.ts @@ -38,7 +38,8 @@ export const getInitialFormValues = ( details: ApiOpportunityAccompanyingDetails | undefined, ): AccompanyingDetailsFormData => ({ appointmentAddress: details?.appointmentAddress || "", - appointmentPostcode: "", + appointmentPostcode: + (details as ApiOpportunityAccompanyingDetails & { appointmentPostcode?: string })?.appointmentPostcode || "", appointmentDate: parseDate(details?.appointmentDate), appointmentTime: parseTime(details?.appointmentTime), refugeeNumber: details?.refugeeNumber || "",