Add effective-date transaction filtering and bulk selection

This commit is contained in:
2026-06-15 21:38:25 +02:00
parent 1c88d12f0d
commit 238a30ae0c
12 changed files with 668 additions and 28 deletions

View File

@@ -0,0 +1,29 @@
export const DEFAULT_TRANSACTION_FILTER_RESET = {
global: {
preset: "current-month",
accountId: undefined,
categoryIds: [],
monthBasis: "effective",
},
page: {
search: "",
type: "all",
pendingOnly: false,
rowSelection: {},
},
} as const;
export type TransactionFilterResetState = typeof DEFAULT_TRANSACTION_FILTER_RESET;
export function getResetTransactionFilterState(): TransactionFilterResetState {
return {
global: {
...DEFAULT_TRANSACTION_FILTER_RESET.global,
categoryIds: [...DEFAULT_TRANSACTION_FILTER_RESET.global.categoryIds],
},
page: {
...DEFAULT_TRANSACTION_FILTER_RESET.page,
rowSelection: { ...DEFAULT_TRANSACTION_FILTER_RESET.page.rowSelection },
},
};
}