{#if error}
{error}
{/if} {#if showAdd && canManage}
{/if} {#if ($allShifts ?? []).length === 0}
No shifts yet

Add shifts to schedule your volunteers.

{:else} {#each grouped as { dept, days }}
{dept.name}
{#each days as { day, shifts }}
{formatDay(day)}
{#each shifts as s (s.id)} {#if canManage} {/if} {/each}
{s.name} {formatTime(s.start_time)} – {formatTime(s.end_time)} {#if s.capacity} Capacity: {s.capacity} {:else} Unlimited {/if}
{/each}
{/each} {#if ungrouped.length > 0}
{ungrouped.length} shift(s) with unknown departments
{/if} {/if}