feat: sales pdf preview.

This commit is contained in:
elforjani3
2021-08-18 14:45:54 +02:00
parent a7b0f1a8d2
commit 7234bc4757
29 changed files with 664 additions and 20 deletions

View File

@@ -85,6 +85,11 @@ function InvoicesDataTable({
openDrawer('invoice-detail-drawer', { invoiceId: id });
};
// Handle print invoices.
const handlePrintInvoice = ({ id }) => {
openDialog('invoice-pdf-preview', { invoiceId: id });
};
// Handles fetch data once the table state change.
const handleDataTableFetchData = useCallback(
({ pageSize, pageIndex, sortBy }) => {
@@ -130,6 +135,7 @@ function InvoicesDataTable({
onDrawer: handleDrawerInvoice,
onQuick: handleQuickPaymentReceive,
onViewDetails: handleViewDetailInvoice,
onPrint: handlePrintInvoice,
baseCurrency,
}}
/>