feat(analytics): replace budget page with spending analytics + split-adjusted amounts

- Rename 'Budget' → 'Analytics' in sidebar
- Rewrite /budget page: summary cards, recharts bar charts (monthly trend + category breakdown), 6-month trend table
- Fix analytics API to count only user's share for split transactions (CASE WHEN ts.share_percent IS NOT NULL THEN amount * share_percent / 100 ELSE amount END)
- Install recharts
This commit is contained in:
2026-03-08 17:58:33 +11:00
parent 1e79ada6d8
commit 30a7857d13
5 changed files with 646 additions and 272 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ const NAV_ITEMS = [
{ href: "/transactions", label: "Transactions", icon: "receipt" },
{ href: "/statements", label: "Statements", icon: "file-text" },
{ href: "/shared", label: "Shared", icon: "users" },
{ href: "/budget", label: "Budget", icon: "bar-chart" },
{ href: "/budget", label: "Analytics", icon: "bar-chart" },
{ href: "/tags", label: "Tags", icon: "tag" },
{ href: "/rules", label: "Rules", icon: "settings" },
];