feat: add previous year total column to budget table (#16) #18

Merged
maximus merged 1 commit from fix/simpl-resultat-16-budget-previous-year into main 2026-03-08 16:39:44 +00:00
Collaborator

Summary

  • Add a read-only "Previous Year" column to the budget table, displayed as the first data column (between Category and Annual)
  • Shows the annual budget total from the previous year for each category as a baseline reference
  • Totals propagate correctly through parent subtotals, section totals, and grand total rows
  • Column styled in muted foreground to visually distinguish it from editable data

Changes

  • src/shared/types/index.ts — added previousYearTotal field to BudgetYearRow
  • src/hooks/useBudget.ts — fetch previous year entries and compute totals
  • src/components/budget/BudgetTable.tsx — render the new column with header, per-row values, section totals, and grand total
  • src/i18n/locales/fr.json / en.json — added budget.previousYear key
  • CHANGELOG.md / CHANGELOG.fr.md — added entry under Unreleased

Fixes #16

## Summary - Add a read-only "Previous Year" column to the budget table, displayed as the first data column (between Category and Annual) - Shows the annual budget total from the previous year for each category as a baseline reference - Totals propagate correctly through parent subtotals, section totals, and grand total rows - Column styled in muted foreground to visually distinguish it from editable data ## Changes - `src/shared/types/index.ts` — added `previousYearTotal` field to `BudgetYearRow` - `src/hooks/useBudget.ts` — fetch previous year entries and compute totals - `src/components/budget/BudgetTable.tsx` — render the new column with header, per-row values, section totals, and grand total - `src/i18n/locales/fr.json` / `en.json` — added `budget.previousYear` key - `CHANGELOG.md` / `CHANGELOG.fr.md` — added entry under Unreleased Fixes #16
medic-bot added 1 commit 2026-03-08 15:04:33 +00:00
Add a read-only column showing the annual budget total from the
previous year for each category. This serves as a baseline reference
when planning the current year's budget.

- Add previousYearTotal field to BudgetYearRow type
- Fetch previous year budget entries in useBudget hook
- Display column between Category and Annual in BudgetTable
- Propagate totals through parent/subtotal/section/grand total rows
- Add i18n keys for FR ("Année préc.") and EN ("Prev. Year")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maximus merged commit 8742c25945 into main 2026-03-08 16:39:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: maximus/Simpl-Resultat#18
No description provided.