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,25 @@
import { describe, expect, test } from "vitest";
import {
DEFAULT_TRANSACTION_FILTER_RESET,
getResetTransactionFilterState,
} from "@/lib/transactionFilterReset";
describe("transaction filter reset defaults", () => {
test("resets global and page-level transaction filters", () => {
expect(getResetTransactionFilterState()).toEqual({
global: {
preset: "current-month",
accountId: undefined,
categoryIds: [],
monthBasis: "effective",
},
page: {
search: "",
type: "all",
pendingOnly: false,
rowSelection: {},
},
});
expect(DEFAULT_TRANSACTION_FILTER_RESET.page.rowSelection).toEqual({});
});
});