History

{#if error}

{error}

{/if}
Overall balance 0} class:negative={summary.total_delta_ms < 0}> {formatDelta(summary.total_delta_ms)} across {summary.closed_week_count} closed {summary.closed_week_count === 1 ? 'week' : 'weeks'} {#if summary.adjustment_count > 0} · {summary.adjustment_count} {summary.adjustment_count === 1 ? 'adjustment' : 'adjustments'} (weeks {formatDelta(summary.weeks_delta_ms)}, adj {formatDelta(summary.adjustments_delta_ms)}) {/if}
{#each weekKeys as wk (wk)} {@const cw = closedWeeksMap[wk]} {/each}
Week Worked Expected Delta Status
{wk} {cw ? formatDurationShort(cw.worked_ms) : '—'} {cw ? formatDurationShort(cw.expected_ms) : '—'} = 0} class:negative={cw && cw.delta_ms < 0}> {cw ? formatDelta(cw.delta_ms) : '—'} {cw ? 'closed' : 'open'}

Recent Days

{#each Object.entries(closedDaysMap).sort((a, b) => b[0].localeCompare(a[0])).slice(0, 30) as [dk, cd]} {/each}
Day Kind Worked
{dk} {cd.kind} {formatDurationShort(cd.worked_ms)}

Balance adjustments

{#if !showAddForm} {/if}
{#if showAddForm}
{#if addError}

{addError}

{/if}
{/if} {#if adjustments.length > 0} {#each adjustments as a (a.id)} {#if editingId === a.id} {:else} {/if} {/each}
Effective Delta Note
{#if editError}

{editError}

{/if}
{msToDateInput(a.effective_at)} 0} class:negative={a.delta_ms < 0}>{formatDelta(a.delta_ms)} {a.note}
{:else if !showAddForm}

No adjustments yet.

{/if}