diff --git a/frontend/src/lib/components/UserEditForm.svelte b/frontend/src/lib/components/UserEditForm.svelte index e445960..4d35ab3 100644 --- a/frontend/src/lib/components/UserEditForm.svelte +++ b/frontend/src/lib/components/UserEditForm.svelte @@ -11,8 +11,56 @@ /** @type {App.Locals['subscriptions']}*/ export let subscriptions; - /** @type {App.Locals['user']}*/ + /** @type {App.Locals['user'] | null} */ export let user; + if (user == null) { + user = { + id: 0, + email: "", + first_name: "", + last_name: "", + phone: "", + address: "", + zip_code: "", + city: "", + company: "", + date_of_birth: "", + notes: "", + profile_picture: "", + payment_status: 0, + status: 1, + role_id: 0, + membership: { + id: 0, + start_date: "", + end_date: "", + status: 3, + parent_member_id: 0, + subscription_model: { + id: 0, + name: "", + }, + }, + licence: { + id: 0, + status: 1, + licence_number: "", + issued_date: "", + expiration_date: "", + country: "", + licence_categories: [], + }, + bank_account: { + id: 0, + mandate_date_signed: "", + bank: "", + account_holder_name: "", + iban: "", + bic: "", + mandate_reference: "", + }, + }; + } /** @type {App.Locals['licence_categories']} */ export let licence_categories;