From f242471d1a0b6021fefa485c4e6b8088fa936169 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Wed, 22 Nov 2023 23:29:10 +0200 Subject: [PATCH] feat(webapp): balance sheet export csv/xlsx --- packages/server/src/utils/xlsx.ts | 0 .../BalanceSheet/BalanceSheetActionsBar.tsx | 21 ++-- .../BalanceSheet/components.tsx | 109 +++++++++++++++++- .../src/hooks/query/financialReports.tsx | 30 ++++- packages/webapp/src/hooks/useDownloadFile.ts | 72 ++++++++++++ 5 files changed, 219 insertions(+), 13 deletions(-) create mode 100644 packages/server/src/utils/xlsx.ts create mode 100644 packages/webapp/src/hooks/useDownloadFile.ts diff --git a/packages/server/src/utils/xlsx.ts b/packages/server/src/utils/xlsx.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/webapp/src/containers/FinancialStatements/BalanceSheet/BalanceSheetActionsBar.tsx b/packages/webapp/src/containers/FinancialStatements/BalanceSheet/BalanceSheetActionsBar.tsx index dd50cd5416..0421ea2aea 100644 --- a/packages/webapp/src/containers/FinancialStatements/BalanceSheet/BalanceSheetActionsBar.tsx +++ b/packages/webapp/src/containers/FinancialStatements/BalanceSheet/BalanceSheetActionsBar.tsx @@ -1,5 +1,4 @@ // @ts-nocheck -import React from 'react'; import { NavbarGroup, Button, @@ -13,11 +12,12 @@ import classNames from 'classnames'; import { DashboardActionsBar, FormattedMessage as T, Icon } from '@/components'; import NumberFormatDropdown from '@/components/NumberFormatDropdown'; +import { BalanceSheetExportMenu } from './components'; -import { compose, saveInvoke } from '@/utils'; import { useBalanceSheetContext } from './BalanceSheetProvider'; import withBalanceSheet from './withBalanceSheet'; import withBalanceSheetActions from './withBalanceSheetActions'; +import { compose, saveInvoke } from '@/utils'; /** * Balance sheet - actions bar. @@ -114,11 +114,18 @@ function BalanceSheetActionsBar({ icon={} text={} /> -