mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feat(webapp): wip print preview financial reports
This commit is contained in:
@@ -16,9 +16,11 @@ import NumberFormatDropdown from '@/components/NumberFormatDropdown';
|
||||
|
||||
import withTrialBalance from './withTrialBalance';
|
||||
import withTrialBalanceActions from './withTrialBalanceActions';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import { compose, saveInvoke } from '@/utils';
|
||||
import { useTrialBalanceSheetContext } from './TrialBalanceProvider';
|
||||
import { TrialBalanceSheetExportMenu } from './components';
|
||||
import { DialogsName } from '@/constants/dialogs';
|
||||
|
||||
function TrialBalanceActionsBar({
|
||||
// #withTrialBalance
|
||||
@@ -27,6 +29,9 @@ function TrialBalanceActionsBar({
|
||||
// #withTrialBalanceActions
|
||||
toggleTrialBalanceFilterDrawer: toggleFilterDrawer,
|
||||
|
||||
// #withDialogActions
|
||||
openDialog,
|
||||
|
||||
// #ownProps
|
||||
numberFormat,
|
||||
onNumberFormatSubmit,
|
||||
@@ -48,6 +53,11 @@ function TrialBalanceActionsBar({
|
||||
saveInvoke(onNumberFormatSubmit, values);
|
||||
};
|
||||
|
||||
// Handle print button click.
|
||||
const handlePrintBtnClick = () => {
|
||||
openDialog(DialogsName.TrialBalanceSheetPdfPreview);
|
||||
}
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
@@ -109,6 +119,7 @@ function TrialBalanceActionsBar({
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="print-16" iconSize={16} />}
|
||||
text={<T id={'print'} />}
|
||||
onClick={handlePrintBtnClick}
|
||||
/>
|
||||
<Popover
|
||||
content={<TrialBalanceSheetExportMenu />}
|
||||
@@ -132,4 +143,5 @@ export default compose(
|
||||
trialBalanceDrawerFilter,
|
||||
})),
|
||||
withTrialBalanceActions,
|
||||
withDialogActions,
|
||||
)(TrialBalanceActionsBar);
|
||||
|
||||
Reference in New Issue
Block a user