bonuses: templates full-width list, drag-create modal, auto-evaluate, outstanding/completed states
This commit is contained in:
@@ -167,16 +167,11 @@ import { onDestroy } from 'svelte';
|
||||
<div class="modal" onclick={(e) => e.stopPropagation()} role="dialog">
|
||||
<h3>Delete "{deletingSeason.name}"?</h3>
|
||||
<p class="warning">All chores assigned to this season will also be removed. This cannot be undone.</p>
|
||||
<form method="POST" action="?/deleteSeason" use:enhance={() => { return async ({ result }) => {
|
||||
if (result.type === 'success') {
|
||||
const r = result.data;
|
||||
if (r?.deletedChoreIds) {
|
||||
r.deletedChoreIds.forEach((id: string) => famStore.applyRecord('assigned_chores', { id }, 'delete'));
|
||||
}
|
||||
famStore.applyRecord('seasons', { id: deletingSeason.id }, 'delete');
|
||||
deletingSeason = null;
|
||||
}
|
||||
}}}>
|
||||
<form method="POST" action="?/deleteSeason" use:enhance={() => { return async ({ result }) => {
|
||||
if (result.type === 'success') {
|
||||
deletingSeason = null;
|
||||
}
|
||||
}}}>
|
||||
<input type="hidden" name="id" value={deletingSeason.id} />
|
||||
<div class="modal-actions">
|
||||
<button type="button" onclick={() => deletingSeason = null}>Cancel</button>
|
||||
|
||||
Reference in New Issue
Block a user