Private
Public Access
1
0

Add global multi-account filter to all reports with chart hover interaction

Move account selector to date range bar and apply filtering to all four
report types. Add bidirectional hover highlighting between spending donut
chart and category table. Fix donut data label readability with white text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-15 18:15:46 -05:00
parent 63a58b10c0
commit f3211b7ee7
5 changed files with 128 additions and 68 deletions
+12 -8
View File
@@ -2,23 +2,27 @@ import api from './api'
import type { SpendingByCategoryReport, IncomeVsExpenseReport, NetWorthReport, CashFlowReport } from '@/types'
export const reportsApi = {
spendingByCategory: (startDate: string, endDate: string, accountId?: string) =>
spendingByCategory: (startDate: string, endDate: string, accountIds?: string[]) =>
api.get<SpendingByCategoryReport>('/reports/spending-by-category', {
params: { startDate, endDate, accountId },
params: { startDate, endDate, accountIds },
paramsSerializer: { indexes: null },
}),
incomeVsExpense: (startDate: string, endDate: string) =>
incomeVsExpense: (startDate: string, endDate: string, accountIds?: string[]) =>
api.get<IncomeVsExpenseReport>('/reports/income-vs-expense', {
params: { startDate, endDate },
params: { startDate, endDate, accountIds },
paramsSerializer: { indexes: null },
}),
netWorth: (startDate: string, endDate: string) =>
netWorth: (startDate: string, endDate: string, accountIds?: string[]) =>
api.get<NetWorthReport>('/reports/net-worth', {
params: { startDate, endDate },
params: { startDate, endDate, accountIds },
paramsSerializer: { indexes: null },
}),
cashFlow: (startDate: string, endDate: string) =>
cashFlow: (startDate: string, endDate: string, accountIds?: string[]) =>
api.get<CashFlowReport>('/reports/cash-flow', {
params: { startDate, endDate },
params: { startDate, endDate, accountIds },
paramsSerializer: { indexes: null },
}),
}