From 67ef3a2fcab564442d8a02ae812cea48a92fdf11 Mon Sep 17 00:00:00 2001 From: Alex <$(pass /github/email)> Date: Fri, 31 Jan 2025 19:27:15 +0100 Subject: [PATCH] styling, DateOfBirth corrected --- frontend/src/app.d.ts | 126 +++---- frontend/src/lib/components/InputField.svelte | 2 - frontend/src/lib/components/Modal.svelte | 25 +- .../src/lib/components/UserEditForm.svelte | 12 +- frontend/src/lib/css/styles.min.css | 3 +- frontend/src/lib/locales/de.js | 347 +++++++++--------- frontend/src/lib/utils/helpers.js | 250 ++++++------- frontend/src/lib/utils/processing.js | 121 ++++++ .../routes/auth/about/[id]/+page.server.js | 276 ++++++-------- .../src/routes/auth/about/[id]/+page.svelte | 4 +- .../routes/auth/admin/users/+page.server.js | 223 +++-------- .../src/routes/auth/admin/users/+page.svelte | 76 +++- internal/models/user.go | 28 +- internal/validation/user_validation.go | 2 +- 14 files changed, 716 insertions(+), 779 deletions(-) create mode 100644 frontend/src/lib/utils/processing.js diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts index 885733e..8e22a90 100644 --- a/frontend/src/app.d.ts +++ b/frontend/src/app.d.ts @@ -1,87 +1,87 @@ // See https://kit.svelte.dev/docs/types#app interface Subscription { - id: number | -1; - name: string | ""; - details?: string | ""; - conditions?: string | ""; - monthly_fee?: number | -1; - hourly_rate?: number | -1; - included_hours_per_year?: number | 0; - included_hours_per_month?: number | 0; + id: number | -1; + name: string | ''; + details?: string | ''; + conditions?: string | ''; + monthly_fee?: number | -1; + hourly_rate?: number | -1; + included_hours_per_year?: number | 0; + included_hours_per_month?: number | 0; } interface Membership { - id: number | -1; - status: number | -1; - start_date: string | ""; - end_date: string | ""; - parent_member_id: number | -1; - subscription_model: Subscription; + id: number | -1; + status: number | -1; + start_date: string | ''; + end_date: string | ''; + parent_member_id: number | -1; + subscription_model: Subscription; } interface BankAccount { - id: number | -1; - mandate_date_signed: string | ""; - bank: string | ""; - account_holder_name: string | ""; - iban: string | ""; - bic: string | ""; - mandate_reference: string | ""; + id: number | -1; + mandate_date_signed: string | ''; + bank: string | ''; + account_holder_name: string | ''; + iban: string | ''; + bic: string | ''; + mandate_reference: string | ''; } interface Licence { - id: number | -1; - status: number | -1; - licence_number: string | ""; - issued_date: string | ""; - expiration_date: string | ""; - country: string | ""; - licence_categories: LicenceCategory[]; + id: number | -1; + status: number | -1; + licence_number: string | ''; + issued_date: string | ''; + expiration_date: string | ''; + country: string | ''; + licence_categories: LicenceCategory[]; } interface LicenceCategory { - id: number | -1; - category: string | ""; + id: number | -1; + category: string | ''; } interface User { - email: string | ""; - first_name: string | ""; - last_name: string | ""; - phone: string | ""; - notes: string | ""; - address: string | ""; - zip_code: string | ""; - city: string | ""; - status: number | -1; - id: number | -1; - role_id: number | -1; - date_of_birth: string | ""; - company: string | ""; - profile_picture: string | ""; - payment_status: number | -1; - membership: Membership; - bank_account: BankAccount; - licence: Licence; - notes: string | ""; + email: string | ''; + first_name: string | ''; + last_name: string | ''; + phone: string | ''; + notes: string | ''; + address: string | ''; + zip_code: string | ''; + city: string | ''; + status: number | -1; + id: number | -1; + role_id: number | -1; + dateofbirth: string | ''; + company: string | ''; + profile_picture: string | ''; + payment_status: number | -1; + membership: Membership; + bank_account: BankAccount; + licence: Licence; + notes: string | ''; } declare global { - namespace App { - // interface Error {} - interface Locals { - user: User; - users: User[]; - subscriptions: Subscription[]; - licence_categories: LicenceCategory[]; - } - interface Types { - licenceCategory: LicenceCategory; - } - // interface PageData {} - // interface Platform {} - } + namespace App { + // interface Error {} + interface Locals { + user: User; + users: User[]; + subscriptions: Subscription[]; + licence_categories: LicenceCategory[]; + } + interface Types { + licenceCategory: LicenceCategory; + } + // interface PageData {} + // interface Platform {} + } } export {}; diff --git a/frontend/src/lib/components/InputField.svelte b/frontend/src/lib/components/InputField.svelte index bb619b7..169ec93 100644 --- a/frontend/src/lib/components/InputField.svelte +++ b/frontend/src/lib/components/InputField.svelte @@ -283,7 +283,6 @@ .input { width: 100%; - margin: 0.5rem 0; } input, textarea, @@ -316,7 +315,6 @@ } /* Add consistent spacing between input boxes */ .input-box { - margin: 1rem 0; padding: 0.5rem; background-color: var(--surface0); border-radius: 6px; diff --git a/frontend/src/lib/components/Modal.svelte b/frontend/src/lib/components/Modal.svelte index a0deaf2..5c87241 100644 --- a/frontend/src/lib/components/Modal.svelte +++ b/frontend/src/lib/components/Modal.svelte @@ -28,28 +28,6 @@