feat: group report transactions by report granularity
Make the outer accordion grouping in TransactionList granularity-aware instead of hardcoded months. TransactionList accepts a granularity prop (weekly/monthly/quarterly/yearly, default monthly); ReportViewer passes the report's granularity so a weekly report buckets transactions by ISO week, quarterly by quarter, yearly by year. Expense page keeps monthly grouping. Add periodKey/periodLabel/groupByPeriod/toPeriodGranularity to src/common/utils/transactions.ts and drop the dead groupByMonth/ GroupedMonth helpers.
This commit is contained in:
@@ -11,14 +11,6 @@ export interface ExpenseItem {
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface GroupedMonth {
|
||||
key: string;
|
||||
items: ExpenseItem[];
|
||||
spent: number;
|
||||
income: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface TxnFieldConfigs {
|
||||
entity: FieldConfig;
|
||||
amount: FieldConfig;
|
||||
|
||||
Reference in New Issue
Block a user