update Ausweise

This commit is contained in:
Robert Jagtiani
2025-01-22 15:37:51 +01:00
parent adb0d2a454
commit 4e4264ad54
6 changed files with 60 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts">
import HelpLabel from "#labels/HelpLabel.svelte";
import type { BedarfsausweisWohnen, Enums, VerbrauchsausweisGewerbe } from "@ibcornelsen/database/client";
export let max: number = 2;
@@ -90,13 +91,23 @@
{#if images.filter((image) => image.kategorie === kategorie).length === max}
<span class="bg-base-200 border px-4 py-2">Maximale Anzahl Bilder wurde erreicht.</span>
{:else if max > 1}
<div>
<div class="input-standard">
<input type="file" class="file-input file-input-ghost h-[38px]" bind:this={fileUpload} {name} multiple on:change={getAllImages} />
<slot />
<div class="help-label">
<HelpLabel>
<slot />
</HelpLabel>
</div>
</div>
{:else}
<div>
<div class="input-standard">
<input type="file" class="file-input file-input-ghost h-[38px]" bind:this={fileUpload} {name} on:change={getAllImages} />
<slot />
<div class="help-label">
<HelpLabel>
<slot />
</HelpLabel>
</div>
</div>
{/if}