Commit graph

7 commits

Author SHA1 Message Date
2114e60fce Fix chart legend order and tooltip stacking on wage graphs
Legend was sorted to mirror bar stack order, making it hard to tell
segments apart at a glance; reverse it. Tooltip also rendered behind
the legend div when they overlapped — raise its z-index above it.
2026-07-24 15:45:00 +00:00
a1a8900196 Fix current-period % Budget bugs on Rolling 12 Weeks/Months tables
Rolling12Months: current month's budget wasn't prorated at all, so
%Budget compared MTD actual against the FULL monthly budget — always
looked artificially favorable. Now prorates by elapsed PY DOW-matched
sales share (flat day-count fallback), reusing already-fetched data.

Rolling12Weeks: budget was prorated, but the elapsed-day count mixed a
real timestamp with Math.ceil(...)+1, always overstating elapsed days
by one and inflating the budget denominator. Rewrote to sum per-day
budgets by date string (no fractional-time bug), and applied the same
PY DOW-weighting as the Weekly page, sourcing each day from its own
calendar month so weeks spanning a month boundary split correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 21:18:30 +00:00
84f5d38b10 Rolling views: show most recent week/month first in table
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 16:15:02 +00:00
92400dbcec Show budget % as delta (+/-) from 100% across all views 2026-07-23 11:48:38 +00:00
793e97dbbb Fix week date range off-by-one in BST timezone
toISOString() returns UTC — in BST (UTC+1) dates computed from new Date()
land one day early. Replace with local date components via fmt()/localStr().
Affects Weekly, Monthly, Rolling12Weeks, Rolling12Months.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 09:48:46 +00:00
32318aa63f Fix TS errors: vite/client types + recharts Tooltip formatter signature 2026-07-23 09:07:34 +00:00
2e0592eb90 Initial scaffold: wages app
Full wage cost reporting app — weekly/monthly views, rolling 12-week/12-month
history, budget management, Workforce API sync with SSE backfill, net sales
via forecasting public API, department filter, CSV export.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 09:03:52 +00:00