Updated Dashboard and clarified default states.
This commit is contained in:
parent
260e017f79
commit
e7b25ea0c6
5 changed files with 172 additions and 35 deletions
|
|
@ -20,6 +20,14 @@
|
|||
|
||||
const role = $derived(session?.user?.role ?? '')
|
||||
const canManage = $derived(['admin', 'ticketing', 'staffing', 'colead'].includes(role))
|
||||
const myDeptIDs = $derived(session?.user?.department_ids ?? [])
|
||||
|
||||
// Auto-filter coleads to their department on mount
|
||||
$effect(() => {
|
||||
if (role === 'colead' && myDeptIDs.length > 0 && !filterDept) {
|
||||
filterDept = String(myDeptIDs[0])
|
||||
}
|
||||
})
|
||||
|
||||
const allVolunteers = liveQuery(() =>
|
||||
db.volunteers.filter(v => !v.deleted_at).toArray()
|
||||
|
|
@ -177,7 +185,7 @@
|
|||
{#if ($allVolunteers ?? []).length === 0}
|
||||
<div class="empty">
|
||||
<strong>No volunteers yet</strong>
|
||||
<p>Add volunteers manually.</p>
|
||||
<p>Add volunteers manually above, or enable public signup in Settings.</p>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="table-wrap">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue