whisper-money/resources/js/components/dashboard
Víctor Falcón 58354f9778 fix(dashboard): stop negative asset balances inflating net worth
A checking/savings account with a genuinely negative balance was shown as
positive on the dashboard account card and ADDED to the net worth chart,
while the accounts page displayed it correctly as negative.

Root cause: the dashboard used `getAccountSign(type) * Math.abs(value)`.
Liabilities (credit_card/loan) are stored as positive magnitudes, so
`-abs()` was correct for them, but for an asset holding a negative balance
`+abs()` flipped the sign and summed it in.

- Add `netWorthContribution(type, balance)`: liabilities subtract their
  magnitude, assets keep their real sign.
- Dashboard account card now shows the raw signed balance, matching the
  accounts page.
- Net worth totals, trend indicators and the stacked-asset total use the
  raw signed value instead of `Math.abs`.
- Add regression tests for a negative asset balance.
2026-07-08 16:55:55 +02:00
..
account-balance-card.tsx feat(dashboard): add accounts manager dialog with visibility toggle and reorder (#604) 2026-06-27 16:11:25 +00:00
account-type-icon.tsx refactor(accounts): unify account type icons via accountIconByType helper (#180) 2026-03-02 08:47:44 +00:00
accounts-manager-dialog.tsx feat(dashboard): add accounts manager dialog with visibility toggle and reorder (#604) 2026-06-27 16:11:25 +00:00
amount-trend-indicator.tsx fix: Prevent account card content overflow on long names (#133) 2026-02-19 10:22:51 +01:00
cashflow-summary-card.tsx perf(dashboard): optimize query performance and eliminate redundant requests (#146) 2026-02-24 08:43:48 +01:00
net-worth-chart.tsx fix(dashboard): stop negative asset balances inflating net worth 2026-07-08 16:55:55 +02:00
percentage-trend-indicator.tsx fix: preserve cents in chart amounts (#270) 2026-04-10 15:41:24 +02:00
top-categories-card.tsx feat(analysis): per-category 12-month spending drawer (#519) 2026-06-11 09:52:53 +02:00