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} + +