From 493f92c34a25d1fd2185201084e562a4bfcd538b Mon Sep 17 00:00:00 2001 From: carkom Date: Mon, 22 Jan 2024 23:29:32 +0000 Subject: [PATCH] revert changes --- .../src/components/filters/FiltersMenu.jsx | 2 +- .../src/components/reports/ReportOptions.ts | 7 +- .../src/components/reports/ReportSidebar.jsx | 34 ++-- .../src/components/reports/ReportTopbar.jsx | 28 +-- .../src/components/reports/SaveReport.tsx | 178 ++++-------------- .../src/components/reports/SaveReportMenu.tsx | 76 -------- .../src/components/reports/SaveReportName.tsx | 72 ------- .../reports/reports/CustomReport.jsx | 89 +-------- upcoming-release-notes/2257.md | 6 - 9 files changed, 56 insertions(+), 436 deletions(-) delete mode 100644 packages/desktop-client/src/components/reports/SaveReportMenu.tsx delete mode 100644 packages/desktop-client/src/components/reports/SaveReportName.tsx delete mode 100644 upcoming-release-notes/2257.md diff --git a/packages/desktop-client/src/components/filters/FiltersMenu.jsx b/packages/desktop-client/src/components/filters/FiltersMenu.jsx index 9c3e3aa458b..3c85a7784eb 100644 --- a/packages/desktop-client/src/components/filters/FiltersMenu.jsx +++ b/packages/desktop-client/src/components/filters/FiltersMenu.jsx @@ -597,7 +597,7 @@ export function AppliedFilters({ onUpdateChange, }) { const onUpdateAppliedFilter = (filter, newFilter) => { - onUpdateChange?.(null, 'modify'); + //onUpdateChange?.(null, 'modify'); return onUpdate(filter, newFilter); }; diff --git a/packages/desktop-client/src/components/reports/ReportOptions.ts b/packages/desktop-client/src/components/reports/ReportOptions.ts index d76a2dc02f0..3639de6a964 100644 --- a/packages/desktop-client/src/components/reports/ReportOptions.ts +++ b/packages/desktop-client/src/components/reports/ReportOptions.ts @@ -12,9 +12,10 @@ const startDate = monthUtils.subMonths(monthUtils.currentMonth(), 5); const endDate = monthUtils.currentMonth(); const categories = useCategories(); const selectAll: CategoryEntity[] = []; -categories.grouped.map(categoryGroup => - categoryGroup.categories && - categoryGroup.categories.map(category => selectAll.push(category)), +categories.grouped.map( + categoryGroup => + categoryGroup.categories && + categoryGroup.categories.map(category => selectAll.push(category)), ); export const defaultReport: CustomReportEntity = { diff --git a/packages/desktop-client/src/components/reports/ReportSidebar.jsx b/packages/desktop-client/src/components/reports/ReportSidebar.jsx index 2ba6809de44..4dd5f8cba5f 100644 --- a/packages/desktop-client/src/components/reports/ReportSidebar.jsx +++ b/packages/desktop-client/src/components/reports/ReportSidebar.jsx @@ -38,10 +38,8 @@ export function ReportSidebar({ setSelectedCategories, onChangeDates, onChangeViews, - onReportChange, }) { const onSelectRange = cond => { - onReportChange(null, 'modify'); setDateRange(cond); switch (cond) { case 'All time': @@ -75,7 +73,6 @@ export function ReportSidebar({ }; const onChangeMode = cond => { - onReportChange(null, 'modify'); setMode(cond); if (cond === 'time') { if (customReportItems.graphType === 'TableGraph') { @@ -106,7 +103,6 @@ export function ReportSidebar({ }; const onChangeSplit = cond => { - onReportChange(null, 'modify'); setGroupBy(cond); if (customReportItems.mode === 'total') { if (customReportItems.graphType !== 'TableGraph') { @@ -124,7 +120,7 @@ export function ReportSidebar({ }; const onChangeBalanceType = cond => { - onReportChange(null, 'modify'); + //onReportChange(null, 'modify'); setBalanceType(cond); }; @@ -256,10 +252,7 @@ export function ReportSidebar({ id="show-empty-columns" checked={customReportItems.showEmpty} value={customReportItems.showEmpty} - onChange={() => { - setShowEmpty(!customReportItems.showEmpty); - onReportChange(null, 'modify'); - }} + onChange={() => setShowEmpty(!customReportItems.showEmpty)} />