Monthly view: rota boundary, EOM PY card, % Budget headline; backfill 25 months
Rota forecasting: only trust Workforce rota for the current Mon–Sun week — beyond that use prior-week actuals to avoid incomplete next-week rotas deflating the EOM forecast. % vs Budget cards (Weekly + Monthly): show as coloured headline number (green/amber/red) instead of small pct-badge chip, matching other cards. Forecast EOM: PY sub-label shows full prior-year month total + % delta, replacing the static "rota + prior-week actual" note once PY data exists. Achieves this by fetching the full PY month rather than MTD-capped range, then deriving both MTD (for Actual MTD card) and full-month (for EOM card). Backfill depth: 13 → 25 months so past months in Rolling 12 have PY wage data available (viewing Dec 2024 needs Dec 2023 = 19 months ago). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a75aceb6e7
commit
d04cd1e82c
4 changed files with 43 additions and 27 deletions
|
|
@ -264,7 +264,7 @@ export async function runBackfill(onProgress, signal) {
|
|||
endDate.setDate(endDate.getDate() - 1)
|
||||
|
||||
const startDate = new Date(today)
|
||||
startDate.setMonth(startDate.getMonth() - 13)
|
||||
startDate.setMonth(startDate.getMonth() - 25)
|
||||
|
||||
const totalDays = Math.max(1, Math.ceil((endDate - startDate) / 86_400_000))
|
||||
let processedDays = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue