fix: dashboard categorie niveau 4 sous son parent (#23) #24

Closed
medic-bot wants to merge 1 commit from fix/simpl-resultat-23-dashboard-category-sort-and-pie-layout into main
Collaborator

Summary

Fixes #23

  • Sorting fix: Level 4 categories now display directly under their intermediate parent in both the dashboard budget vs actual table and the budget page table. The sort algorithm now uses sub-group logic to keep depth-2 children grouped with their depth-1 intermediate parent, instead of sorting all depth-2 rows to the bottom of the section.
  • Pie chart space: Reduced chart height (280→220px), labels now only appear on hover (group-hover), and the grid layout gives 2/3 of the width to the table (1fr/2fr instead of 1fr/1fr).

Changes

  • src/services/budgetService.ts — Fixed getBudgetVsActualData sort with sub-group awareness
  • src/hooks/useBudget.ts — Fixed useBudget sort with same sub-group logic
  • src/pages/DashboardPage.tsx — Grid layout changed to lg:grid-cols-[1fr_2fr]
  • src/components/dashboard/CategoryPieChart.tsx — Height reduced, labels visible on hover only
  • CHANGELOG.md / CHANGELOG.fr.md — Updated

Test plan

  • Verify level 4 categories (e.g. assurance-maison) appear under their parent (e.g. assurance) in the dashboard budget vs actual table
  • Verify same behavior in the budget page table
  • Verify pie chart labels appear on hover and are hidden by default
  • Verify the table has more horizontal space than before

🤖 Generated with Claude Code

## Summary Fixes #23 - **Sorting fix**: Level 4 categories now display directly under their intermediate parent in both the dashboard budget vs actual table and the budget page table. The sort algorithm now uses sub-group logic to keep depth-2 children grouped with their depth-1 intermediate parent, instead of sorting all depth-2 rows to the bottom of the section. - **Pie chart space**: Reduced chart height (280→220px), labels now only appear on hover (group-hover), and the grid layout gives 2/3 of the width to the table (1fr/2fr instead of 1fr/1fr). ## Changes - `src/services/budgetService.ts` — Fixed `getBudgetVsActualData` sort with sub-group awareness - `src/hooks/useBudget.ts` — Fixed `useBudget` sort with same sub-group logic - `src/pages/DashboardPage.tsx` — Grid layout changed to `lg:grid-cols-[1fr_2fr]` - `src/components/dashboard/CategoryPieChart.tsx` — Height reduced, labels visible on hover only - `CHANGELOG.md` / `CHANGELOG.fr.md` — Updated ## Test plan - [ ] Verify level 4 categories (e.g. assurance-maison) appear under their parent (e.g. assurance) in the dashboard budget vs actual table - [ ] Verify same behavior in the budget page table - [ ] Verify pie chart labels appear on hover and are hidden by default - [ ] Verify the table has more horizontal space than before 🤖 Generated with [Claude Code](https://claude.com/claude-code)
medic-bot added 1 commit 2026-03-08 17:06:21 +00:00
- Fix sub-group sorting so depth-2 children stay grouped with their
  intermediate parent instead of falling to the bottom of the section
- Reduce pie chart height and show labels only on hover
- Adjust grid layout to give more room to the budget vs actual table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maximus closed this pull request 2026-03-09 23:45:26 +00:00

Pull request closed

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#24
No description provided.