From 380fee09c1a131026c78e43434ec42ac531126ab Mon Sep 17 00:00:00 2001 From: Alex <$(pass /github/email)> Date: Sat, 15 Mar 2025 00:11:41 +0100 Subject: [PATCH] add: carEditForm --- .../src/lib/components/CarEditForm.svelte | 252 ++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 frontend/src/lib/components/CarEditForm.svelte diff --git a/frontend/src/lib/components/CarEditForm.svelte b/frontend/src/lib/components/CarEditForm.svelte new file mode 100644 index 0000000..d933d79 --- /dev/null +++ b/frontend/src/lib/components/CarEditForm.svelte @@ -0,0 +1,252 @@ + + +{#if isLoading} + +{:else if editor && car} +
+ +

+ {car.id ? $t('car.edit') : $t('car.create')} +

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

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

+ {/each} + {/if} +
+ {#each TABS as tab} + + {/each} +
+
+ + + + + + + + + + +
+
+ {#each car.insurances as insurance} + + + + + + {/each} +
+
+ {#if isUpdating} + + {:else} + + + {/if} +
+
+{/if} + +