fix: show live delta in closed-week banner instead of stale frozen value
closedWeek.delta_ms is a snapshot taken at close time and goes stale if entries are edited or days are re-closed afterward. The summary rows above already use the live totalWorkedMs - expectedMs; the closed-week banner now uses the same expression.
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
|
||||
{#if closedWeek}
|
||||
<div class="week-closed">
|
||||
<p>Week closed — overtime: <strong>{formatDelta(closedWeek.delta_ms)}</strong></p>
|
||||
<p>Week closed — overtime: <strong>{formatDelta(totalWorkedMs - expectedMs)}</strong></p>
|
||||
<button onclick={handleReopenWeek}>Reopen week</button>
|
||||
</div>
|
||||
{:else if canCloseWeek}
|
||||
|
||||
Reference in New Issue
Block a user