From bb36b205bfcecf9a19a282af6c8188396d9469d6 Mon Sep 17 00:00:00 2001 From: Neil <55785687+carkom@users.noreply.github.com> Date: Sun, 7 Jan 2024 21:55:21 +0000 Subject: [PATCH] Custom reports reorganize table graph files (#2153) * reorg * notes * Update upcoming-release-notes/2153.md Co-authored-by: DJ Mountney * merge fixes * fix * another * f --------- Co-authored-by: DJ Mountney --- .../src/components/reports/ChooseGraph.tsx | 8 ++++---- .../reports/{ => graphs/tableGraph}/ReportTable.tsx | 4 ++-- .../{ => graphs/tableGraph}/ReportTableHeader.tsx | 9 ++++----- .../reports/{ => graphs/tableGraph}/ReportTableList.tsx | 6 +++--- .../{ => graphs/tableGraph}/ReportTableTotals.tsx | 9 ++++----- upcoming-release-notes/2153.md | 6 ++++++ 6 files changed, 23 insertions(+), 19 deletions(-) rename packages/desktop-client/src/components/reports/{ => graphs/tableGraph}/ReportTable.tsx (92%) rename packages/desktop-client/src/components/reports/{ => graphs/tableGraph}/ReportTableHeader.tsx (92%) rename packages/desktop-client/src/components/reports/{ => graphs/tableGraph}/ReportTableList.tsx (97%) rename packages/desktop-client/src/components/reports/{ => graphs/tableGraph}/ReportTableTotals.tsx (95%) create mode 100644 upcoming-release-notes/2153.md diff --git a/packages/desktop-client/src/components/reports/ChooseGraph.tsx b/packages/desktop-client/src/components/reports/ChooseGraph.tsx index c7baea09b9b..c1da3e8b8a5 100644 --- a/packages/desktop-client/src/components/reports/ChooseGraph.tsx +++ b/packages/desktop-client/src/components/reports/ChooseGraph.tsx @@ -9,11 +9,11 @@ import { BarLineGraph } from './graphs/BarLineGraph'; import { DonutGraph } from './graphs/DonutGraph'; import { LineGraph } from './graphs/LineGraph'; import { StackedBarGraph } from './graphs/StackedBarGraph'; +import { ReportTable } from './graphs/tableGraph/ReportTable'; +import { ReportTableHeader } from './graphs/tableGraph/ReportTableHeader'; +import { ReportTableList } from './graphs/tableGraph/ReportTableList'; +import { ReportTableTotals } from './graphs/tableGraph/ReportTableTotals'; import { ReportOptions } from './ReportOptions'; -import { ReportTable } from './ReportTable'; -import { ReportTableHeader } from './ReportTableHeader'; -import { ReportTableList } from './ReportTableList'; -import { ReportTableTotals } from './ReportTableTotals'; type ChooseGraphProps = { data: DataEntity; diff --git a/packages/desktop-client/src/components/reports/ReportTable.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx similarity index 92% rename from packages/desktop-client/src/components/reports/ReportTable.tsx rename to packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx index 389d3e8be23..91a5ca1457a 100644 --- a/packages/desktop-client/src/components/reports/ReportTable.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx @@ -6,8 +6,8 @@ import React, { } from 'react'; import { type RefProp } from 'react-spring'; -import { type CSSProperties } from '../../style'; -import { View } from '../common/View'; +import { type CSSProperties } from '../../../../style'; +import { View } from '../../../common/View'; type ReportTableProps = { saveScrollWidth?: (value: number) => void; diff --git a/packages/desktop-client/src/components/reports/ReportTableHeader.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx similarity index 92% rename from packages/desktop-client/src/components/reports/ReportTableHeader.tsx rename to packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx index 57078fe32db..c95fb518f41 100644 --- a/packages/desktop-client/src/components/reports/ReportTableHeader.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx @@ -1,11 +1,10 @@ import React, { type UIEventHandler } from 'react'; import { type RefProp } from 'react-spring'; -import { styles, theme } from '../../style'; -import { View } from '../common/View'; -import { Row, Cell } from '../table'; - -import { type MonthData } from './entities'; +import { styles, theme } from '../../../../style'; +import { View } from '../../../common/View'; +import { Row, Cell } from '../../../table'; +import { type MonthData } from '../../entities'; type ReportTableHeaderProps = { scrollWidth?: number; diff --git a/packages/desktop-client/src/components/reports/ReportTableList.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx similarity index 97% rename from packages/desktop-client/src/components/reports/ReportTableList.tsx rename to packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx index eeb6e6fc2e9..0cda809d6b4 100644 --- a/packages/desktop-client/src/components/reports/ReportTableList.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx @@ -6,9 +6,9 @@ import { integerToCurrency, } from 'loot-core/src/shared/util'; -import { type CSSProperties, styles, theme } from '../../style'; -import { View } from '../common/View'; -import { Row, Cell } from '../table'; +import { type CSSProperties, styles, theme } from '../../../../style'; +import { View } from '../../../common/View'; +import { Row, Cell } from '../../../table'; type TableRowProps = { item: { diff --git a/packages/desktop-client/src/components/reports/ReportTableTotals.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx similarity index 95% rename from packages/desktop-client/src/components/reports/ReportTableTotals.tsx rename to packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx index df0e5b019e3..be418de80c6 100644 --- a/packages/desktop-client/src/components/reports/ReportTableTotals.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx @@ -7,11 +7,10 @@ import { integerToCurrency, } from 'loot-core/src/shared/util'; -import { styles, theme } from '../../style'; -import { View } from '../common/View'; -import { Row, Cell } from '../table'; - -import { type DataEntity } from './entities'; +import { styles, theme } from '../../../../style'; +import { View } from '../../../common/View'; +import { Row, Cell } from '../../../table'; +import { type DataEntity } from '../../entities'; type ReportTableTotalsProps = { data: DataEntity; diff --git a/upcoming-release-notes/2153.md b/upcoming-release-notes/2153.md new file mode 100644 index 00000000000..8fab8116d45 --- /dev/null +++ b/upcoming-release-notes/2153.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [carkom] +--- + +Reorganize tableGraph files for custom reports.