validateForm(e, new_state)} use:enhance>
validateForm(e, edit_state)} use:enhance>
Stundenliste
Datum
Wochentag
Beginn
Ende
Dauer
Anmerkung
Actions
+
{#each data.records as entry} {#if editing?.id != entry.id } {@const weekday = parseDate(entry.date)?.getDay()}
{entry.date}
{#if weekday != null }
{WEEKDAYS[weekday]}
{:else}
{/if}
{entry.start}
{entry.end}
{calculateDuration(entry.start, entry.end)}
{entry.comment ?? ""}
{ event.preventDefault(); setEditing(entry); }} >
Edit
{:else}
Save
{ event.preventDefault(); setEditing(null); }} >
Cancel
{/if} {/each}
{#if data.records === undefined || data.records.length === 0}
No records
{/if}