FIX delete buchung call
This commit is contained in:
@@ -79,4 +79,4 @@ services:
|
||||
- traefik-net
|
||||
networks:
|
||||
traefik-net:
|
||||
external: true
|
||||
external: false
|
||||
@@ -36,9 +36,10 @@
|
||||
|
||||
async function confirmDelete() {
|
||||
if (confirmId === null) return;
|
||||
deletingId = confirmId;
|
||||
const idToDelete = confirmId;
|
||||
deletingId = idToDelete;
|
||||
confirmId = null;
|
||||
await api.companyAdmin.deleteTallyEntry(token, deletingId);
|
||||
await api.companyAdmin.deleteTallyEntry(token, idToDelete);
|
||||
deletingId = null;
|
||||
await loadEntries();
|
||||
}
|
||||
@@ -119,14 +120,15 @@
|
||||
</div>
|
||||
|
||||
{#if confirmId !== null}
|
||||
{@const confirmEntry = entries.find(e => e.id === confirmId)}
|
||||
<div class="modal-overlay" on:click|self={() => confirmId = null}>
|
||||
<div class="modal">
|
||||
<h2>Eintrag löschen?</h2>
|
||||
{#if entries.find(e => e.id === confirmId) as entry}
|
||||
{#if confirmEntry}
|
||||
<p style="margin: 16px 0; color: var(--color-text-muted);">
|
||||
<strong style="color: var(--color-text-muted);">{entry.employeeFirstName} {entry.employeeLastName}</strong>
|
||||
– {entry.productName} ({formatPrice(entry.priceCents)})
|
||||
am {formatDateTime(entry.createdAt)}
|
||||
<strong style="color: var(--color-text-muted);">{confirmEntry.employeeFirstName} {confirmEntry.employeeLastName}</strong>
|
||||
– {confirmEntry.productName} ({formatPrice(confirmEntry.priceCents)})
|
||||
am {formatDateTime(confirmEntry.createdAt)}
|
||||
</p>
|
||||
{/if}
|
||||
<p style="margin-bottom: 20px; font-size: 0.9rem;">Dieser Eintrag wird unwiderruflich gelöscht.</p>
|
||||
|
||||
Reference in New Issue
Block a user