Simpl-Resultat/docs
le king fu 4116db4090
All checks were successful
PR Check / rust (push) Successful in 24m37s
PR Check / frontend (push) Successful in 2m21s
PR Check / rust (pull_request) Successful in 24m25s
PR Check / frontend (pull_request) Successful in 2m26s
refactor(reports/compare): unify MoM/YoY under one Actual-vs-actual mode with reference month picker (#96)
Collapse the three Compare tabs (MoM / YoY / Budget) into two modes. The
new "Actual vs actual" mode exposes an explicit reference-month dropdown
in the header (defaults to the previous month, wraps around January) and
a MoM/YoY sub-toggle. The chart is rewritten to a grouped side-by-side
BarChart with two bars per category (reference period vs comparison
period) so both values are visible at a glance instead of just the
delta. The URL PeriodSelector stays in sync with the reference month.

- useCompare: state splits into { mode: "actual"|"budget", subMode:
  "mom"|"yoy", year, month }. Pure helpers previousMonth(),
  defaultReferencePeriod(), comparisonMeta() extracted for tests
- CompareModeTabs: 2 modes instead of 3
- New CompareSubModeToggle and CompareReferenceMonthPicker components
- ComparePeriodChart: grouped bars via two <Bar dataKey="..."/> on a
  vertical BarChart
- i18n: modeActual / subModeMoM / subModeYoY / referenceMonth (FR+EN),
  retire modeMoM / modeYoY
- 9 new vitest cases covering the pure helpers (January wrap-around for
  both MoM and YoY, default reference period, month/year arithmetic)

Closes #96

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 14:24:11 -04:00
..
adr docs: polish + changelog + ADR + legacy cleanup for reports refactor (#76) 2026-04-14 15:29:49 -04:00
archive docs: organize technical documentation into docs/ folder 2026-02-19 07:34:01 -05:00
architecture.md refactor(reports/compare): unify MoM/YoY under one Actual-vs-actual mode with reference month picker (#96) 2026-04-15 14:24:11 -04:00
guide-utilisateur.md docs: polish + changelog + ADR + legacy cleanup for reports refactor (#76) 2026-04-14 15:29:49 -04:00