feat(webapp): wip printing financial reports

This commit is contained in:
Ahmed Bouhuolia
2024-02-12 19:07:57 +02:00
parent eb4491f44a
commit d229378957
80 changed files with 1424 additions and 25 deletions

View File

@@ -21,6 +21,8 @@ import withAPAgingSummary from './withAPAgingSummary';
import withAPAgingSummaryActions from './withAPAgingSummaryActions';
import { saveInvoke, compose } from '@/utils';
import { DialogsName } from '@/constants/dialogs';
import withDialogActions from '@/containers/Dialog/withDialogActions';
/**
* AP Aging summary sheet - Actions bar.
@@ -32,6 +34,9 @@ function APAgingSummaryActionsBar({
// #withARAgingSummaryActions
toggleAPAgingSummaryFilterDrawer: toggleFilterDrawerDisplay,
// #withDialogActions
openDialog,
//#ownProps
numberFormat,
onNumberFormatSubmit,
@@ -52,6 +57,11 @@ function APAgingSummaryActionsBar({
saveInvoke(onNumberFormatSubmit, numberFormat);
};
// Handle the print button click.
const handlePrintBtnClick = () => {
openDialog(DialogsName.APAgingSummaryPdfPreview);
};
return (
<DashboardActionsBar>
<NavbarGroup>
@@ -106,6 +116,7 @@ function APAgingSummaryActionsBar({
className={Classes.MINIMAL}
icon={<Icon icon="print-16" iconSize={16} />}
text={<T id={'print'} />}
onClick={handlePrintBtnClick}
/>
<Popover
content={<APAgingSummaryExportMenu />}
@@ -129,4 +140,5 @@ export default compose(
withAPAgingSummary(({ APAgingSummaryFilterDrawer }) => ({
isFilterDrawerOpen: APAgingSummaryFilterDrawer,
})),
withDialogActions
)(APAgingSummaryActionsBar);