From ebead445c49577bfa92ea353b26b128fe288ad44 Mon Sep 17 00:00:00 2001 From: carkom Date: Sat, 9 Dec 2023 11:39:14 +0000 Subject: [PATCH] fix filters --- .../src/components/reports/reports/CustomReport.js | 4 ++-- .../components/reports/spreadsheets/cash-flow-spreadsheet.tsx | 2 +- .../src/components/reports/spreadsheets/makeQuery.ts | 2 +- .../components/reports/spreadsheets/net-worth-spreadsheet.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.js b/packages/desktop-client/src/components/reports/reports/CustomReport.js index b7caa4645b1..42818ec18e3 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReport.js +++ b/packages/desktop-client/src/components/reports/reports/CustomReport.js @@ -112,7 +112,7 @@ export default function CustomReport() { endDate, categories, selectedCategories, - filters, + conditions: filters, conditionsOp, showEmpty, showOffBudgetHidden, @@ -137,7 +137,7 @@ export default function CustomReport() { endDate, categories, selectedCategories, - filters, + conditions: filters, conditionsOp, showEmpty, showOffBudgetHidden, diff --git a/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx index 20ae05ef9c3..5d874cb821a 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx +++ b/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx @@ -60,7 +60,7 @@ export function cashFlowByDate( function makeQuery(where) { const query = q('transactions') .filter({ - [conditionsOpKey]: [...filters], + [conditionsOpKey]: filters, }) .filter({ $and: [ diff --git a/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts b/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts index 2e61c3eb922..6d6ee2ca349 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts @@ -49,7 +49,7 @@ function makeQuery( ) //Apply filters and split by "Group By" .filter({ - [conditionsOpKey]: [...filters], + [conditionsOpKey]: filters, }) //Apply month range filters .filter({ diff --git a/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.tsx index 4bc90d04124..328f8354f03 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.tsx +++ b/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.tsx @@ -44,7 +44,7 @@ export default function createSpreadsheet( runQuery( q('transactions') .filter({ - [conditionsOpKey]: [...filters], + [conditionsOpKey]: filters, }) .filter({ account: acct.id,