diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts index 4753812..9b48133 100644 --- a/frontend/src/app.d.ts +++ b/frontend/src/app.d.ts @@ -36,7 +36,7 @@ interface DriversLicence { licence_number: string | ""; issued_date: string | ""; expiration_date: string | ""; - issuing_country: string | ""; + country: string | ""; licence_categories: LicenceCategory[]; } diff --git a/frontend/src/routes/auth/about/[id]/+page.server.js b/frontend/src/routes/auth/about/[id]/+page.server.js index 0371d7c..22a3e48 100644 --- a/frontend/src/routes/auth/about/[id]/+page.server.js +++ b/frontend/src/routes/auth/about/[id]/+page.server.js @@ -58,6 +58,20 @@ export const actions = { bic: String(formData.get("bic")), mandate_reference: String(formData.get("mandate_reference")), }, + drivers_licence: { + id: Number(formData.get("drivers_licence_id")), + status: Number(formData.get("licence_status")), + licence_number: String(formData.get("licence_number")), + issued_date: toRFC3339(formData.get("issued_date")), + expiration_date: toRFC3339(formData.get("expiration_date")), + country: String(formData.get("country")), + licence_categories: formData + .getAll("licence_categories[]") + .map((category) => ({ + id: -1, // Use -1 as a placeholder for new categories + category: String(category), + })), + }, }; // Remove undefined or null properties diff --git a/frontend/src/routes/auth/about/[id]/+page.svelte b/frontend/src/routes/auth/about/[id]/+page.svelte index 4cb58fe..afd681d 100644 --- a/frontend/src/routes/auth/about/[id]/+page.svelte +++ b/frontend/src/routes/auth/about/[id]/+page.svelte @@ -467,7 +467,7 @@