diff --git a/frontend/src/lib/components/UserEditForm.svelte b/frontend/src/lib/components/UserEditForm.svelte new file mode 100644 index 0000000..cf51143 --- /dev/null +++ b/frontend/src/lib/components/UserEditForm.svelte @@ -0,0 +1,577 @@ + + +
+ +

{$t("user_edit")}

+ {#if form?.success} +

+ Um einen fehlerhaften upload Ihres Bildes zu vermeiden, clicke bitte auf + den "Update" Button unten. +

+ {/if} + {#if form?.errors} + {#each form?.errors as error (error.id)} +

+ {$t(error.field) + ": " + $t(error.key)} +

+ {/each} + {/if} + + + +
+ {#each TABS as tab} + + {/each} +
+
+ + {#if user.role_id === 8} + + {/if} + + + + + + + + + + + + +
+
+ + + + + +
+

{$t("licence_categories")}

+
+ {#each Object.entries(groupedCategories) as [group, categories], groupIndex} + {#if groupIndex > 0} +
+ {/if} + {#each categories as category} +
+
+ cat.category === category.category + )} + /> +
+ + {$t(`licenceCategory.${category.category}`)} + +
+ {/each} + {/each} +
+
+
+
+ + +
+
+

+ {$t("monthly_fee")}: + {selectedSubscriptionModel?.monthly_fee || "-"} +

+

+ {$t("hourly_rate")}: + {selectedSubscriptionModel?.hourly_rate || "-"} +

+ {#if selectedSubscriptionModel?.included_hours_per_year} +

+ {$t("included_hours_per_year")}: + {selectedSubscriptionModel?.included_hours_per_year} +

+ {/if} + {#if selectedSubscriptionModel?.included_hours_per_month} +

+ {$t("included_hours_per_month")}: + {selectedSubscriptionModel?.included_hours_per_month} +

+ {/if} +
+
+

+ {$t("details")}: + {selectedSubscriptionModel?.details || "-"} +

+ {#if selectedSubscriptionModel?.conditions} +

+ {$t("conditions")}: + {selectedSubscriptionModel?.conditions} +

+ {/if} +
+
+ + + +
+
+ + + + + + +
+
+ {#if isUpdating} + + {:else} + + + {/if} +
+ + + diff --git a/frontend/src/routes/auth/about/[id]/+page.svelte b/frontend/src/routes/auth/about/[id]/+page.svelte index bdc4d65..908d646 100644 --- a/frontend/src/routes/auth/about/[id]/+page.svelte +++ b/frontend/src/routes/auth/about/[id]/+page.svelte @@ -1,15 +1,13 @@
@@ -202,363 +99,13 @@ {#if showModal} -
- -

{$t("user_edit")}

- {#if form?.success} -

- Um einen fehlerhaften upload Ihres Bildes zu vermeiden, clicke bitte - auf den "Update" Button unten. -

- {/if} - {#if form?.errors} - {#each form?.errors as error (error.id)} -

- {$t(error.field) + ": " + $t(error.key)} -

- {/each} - {/if} - - - -
- {#each TABS as tab} - - {/each} -
-
- - {#if user.role_id === 8} - - {/if} - - - - - - - - - - - - -
-
- - - - - -
-

{$t("licence_categories")}

-
- {#each Object.entries(groupedCategories) as [group, categories], groupIndex} - {#if groupIndex > 0} -
- {/if} - {#each categories as category} -
-
- cat.category === category.category - )} - /> -
- - {$t(`licenceCategory.${category.category}`)} - -
- {/each} - {/each} -
-
-
-
- - -
-
-

- {$t("monthly_fee")}: - {selectedSubscriptionModel?.monthly_fee || "-"} -

-

- {$t("hourly_rate")}: - {selectedSubscriptionModel?.hourly_rate || "-"} -

- {#if selectedSubscriptionModel?.included_hours_per_year} -

- {$t("included_hours_per_year")}: - {selectedSubscriptionModel?.included_hours_per_year} -

- {/if} - {#if selectedSubscriptionModel?.included_hours_per_month} -

- {$t("included_hours_per_month")}: - {selectedSubscriptionModel?.included_hours_per_month} -

- {/if} -
-
-

- {$t("details")}: - {selectedSubscriptionModel?.details || "-"} -

- {#if selectedSubscriptionModel?.conditions} -

- {$t("conditions")}: - {selectedSubscriptionModel?.conditions} -

- {/if} -
-
- - - -
-
- - - - - - -
-
- {#if isUpdating} - - {:else} - - - {/if} -
- + {/if} @@ -701,67 +248,6 @@ font-size: 1.1rem; } - /* .avatar-container { - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - } - - .avatar-form { - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - } - - .current-avatar { - margin-bottom: 1rem; - } - - .avatar-buttons { - display: flex; - flex-direction: column; - align-items: center; - gap: 1rem; - width: 100%; - max-width: 200px; - } - - .avatar-buttons button { - margin-top: 1.5rem; - width: 100%; - } - - .avatar-selection { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 10px; - margin-top: 1rem; - } - - .avatar-option { - width: 80px; - height: 80px; - padding: 0; - border: none; - background: none; - cursor: pointer; - transition: transform 0.2s; - } - - .avatar-option:hover, - .avatar-option:focus { - transform: scale(1.8); - } - - .avatar-option img { - width: 100%; - height: 100%; - object-fit: cover; - border-radius: 50%; - } */ .button-container { display: flex; justify-content: space-between;