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 }
{entry.date}
{weekday_of(parseDate(entry.date))}
{entry.start}
{entry.end}
{calculateDuration(entry.start, entry.end).toFixed(2)}
{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}