From 382d46237e6c36988ce576daa0dcec25ae4438bb Mon Sep 17 00:00:00 2001 From: carkom Date: Sun, 7 Jan 2024 16:22:24 +0000 Subject: [PATCH] merge fixes --- .../src/components/reports/reports/CustomReport.jsx | 8 ++++---- .../src/components/reports/reports/CustomReportCard.jsx | 4 ++-- .../{default-spreadsheet.ts => custom-spreadsheet.ts} | 6 +++--- .../reports/spreadsheets/grouped-spreadsheet.ts | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) rename packages/desktop-client/src/components/reports/spreadsheets/{default-spreadsheet.ts => custom-spreadsheet.ts} (97%) diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx index 4268d84c07a..90738dd3dae 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx @@ -27,8 +27,8 @@ import { ReportOptions } from '../ReportOptions'; import { ReportSidebar } from '../ReportSidebar'; import { ReportSummary } from '../ReportSummary'; import { ReportTopbar } from '../ReportTopbar'; -import { createSpreadsheet as defaultSpreadsheet } from '../spreadsheets/default-spreadsheet'; -import { createGroupedSpreadsheet as groupedSpreadsheet } from '../spreadsheets/grouped-spreadsheet'; +import { createCustomSpreadsheet } from '../spreadsheets/custom-spreadsheet'; +import { createGroupedSpreadsheet } from '../spreadsheets/grouped-spreadsheet'; import { useReport } from '../useReport'; import { fromDateRepr } from '../util'; @@ -114,7 +114,7 @@ export function CustomReport() { const accounts = useCachedAccounts(); const getGroupData = useMemo(() => { - return groupedSpreadsheet({ + return createGroupedSpreadsheet({ startDate, endDate, categories, @@ -140,7 +140,7 @@ export function CustomReport() { const getGraphData = useMemo(() => { setDataCheck(false); - return defaultSpreadsheet({ + return createCustomSpreadsheet({ startDate, endDate, categories, diff --git a/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx b/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx index 7aa9df21a62..7269529b4e2 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx @@ -10,7 +10,7 @@ import { DateRange } from '../DateRange'; import { BarGraph } from '../graphs/BarGraph'; import { LoadingIndicator } from '../LoadingIndicator'; import { ReportCard } from '../ReportCard'; -import { defaultSpreadsheet } from '../spreadsheets/default-spreadsheet'; +import { createCustomSpreadsheet } from '../spreadsheets/custom-spreadsheet'; import { useReport } from '../useReport'; export function CustomReportCard() { @@ -21,7 +21,7 @@ export function CustomReportCard() { const groupBy = 'Category'; const getGraphData = useMemo(() => { - return defaultSpreadsheet({ + return createCustomSpreadsheet({ startDate, endDate, groupBy, diff --git a/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts similarity index 97% rename from packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts rename to packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts index 0fde5493c09..c17f9bef860 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts @@ -19,7 +19,7 @@ import { filterHiddenItems } from './filterHiddenItems'; import { makeQuery } from './makeQuery'; import { recalculate } from './recalculate'; -export type createSpreadsheetProps = { +export type createCustomSpreadsheetProps = { startDate: string; endDate: string; categories: { list: CategoryEntity[]; grouped: CategoryGroupEntity[] }; @@ -37,7 +37,7 @@ export type createSpreadsheetProps = { graphType: string; }; -export function createSpreadsheet({ +export function createCustomSpreadsheet({ startDate, endDate, categories, @@ -53,7 +53,7 @@ export function createSpreadsheet({ accounts, setDataCheck, graphType, -}: createSpreadsheetProps) { +}: createCustomSpreadsheetProps) { const [categoryList, categoryGroup] = categoryLists( showOffBudgetHidden, showUncategorized, diff --git a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts index 968e6d5c338..1e8a5313239 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts @@ -5,7 +5,7 @@ import { integerToAmount } from 'loot-core/src/shared/util'; import { categoryLists } from '../ReportOptions'; -import { type createSpreadsheetProps } from './default-spreadsheet'; +import { type createCustomSpreadsheetProps } from './custom-spreadsheet'; import { filterHiddenItems } from './filterHiddenItems'; import { makeQuery } from './makeQuery'; import { recalculate } from './recalculate'; @@ -21,7 +21,7 @@ export function createGroupedSpreadsheet({ showOffBudgetHidden, showUncategorized, balanceTypeOp, -}: createSpreadsheetProps) { +}: createCustomSpreadsheetProps) { const [categoryList, categoryGroup] = categoryLists( showOffBudgetHidden, showUncategorized,