mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
feat(webapp): wip printing financial reports
This commit is contained in:
@@ -20,6 +20,8 @@ import withSalesByItemsActions from './withSalesByItemsActions';
|
||||
import { compose, saveInvoke } from '@/utils';
|
||||
import { useSalesByItemsContext } from './SalesByItemProvider';
|
||||
import { SalesByItemsSheetExportMenu } from './components';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import { DialogsName } from '@/constants/dialogs';
|
||||
|
||||
function SalesByItemsActionsBar({
|
||||
// #withSalesByItems
|
||||
@@ -28,6 +30,9 @@ function SalesByItemsActionsBar({
|
||||
// #withSalesByItemsActions
|
||||
toggleSalesByItemsFilterDrawer,
|
||||
|
||||
// #withDialogActions
|
||||
openDialog,
|
||||
|
||||
// #ownProps
|
||||
numberFormat,
|
||||
onNumberFormatSubmit,
|
||||
@@ -48,6 +53,11 @@ function SalesByItemsActionsBar({
|
||||
saveInvoke(onNumberFormatSubmit, values);
|
||||
};
|
||||
|
||||
// Handle the print button click.
|
||||
const handlePrintBtnClick = () => {
|
||||
openDialog(DialogsName.SalesByItemsPdfPreview);
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
@@ -108,6 +118,7 @@ function SalesByItemsActionsBar({
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="print-16" iconSize={16} />}
|
||||
text={<T id={'print'} />}
|
||||
onClick={handlePrintBtnClick}
|
||||
/>
|
||||
<Popover
|
||||
content={<SalesByItemsSheetExportMenu />}
|
||||
@@ -131,4 +142,5 @@ export default compose(
|
||||
salesByItemsDrawerFilter,
|
||||
})),
|
||||
withSalesByItemsActions,
|
||||
withDialogActions,
|
||||
)(SalesByItemsActionsBar);
|
||||
|
||||
Reference in New Issue
Block a user