feat: view details.

This commit is contained in:
elforjani3
2021-07-29 23:18:40 +02:00
parent 720dc5b7d7
commit e04ba7e030
31 changed files with 522 additions and 34 deletions

View File

@@ -79,6 +79,12 @@ function InvoicesDataTable({
const handleQuickPaymentReceive = ({ id }) => {
openDialog('quick-payment-receive', { invoiceId: id });
};
// Handle view detail invoice.
const handleViewDetailInvoice = ({ id }) => {
openDrawer('invoice-detail-drawer', { invoiceId: id });
};
// Handles fetch data once the table state change.
const handleDataTableFetchData = useCallback(
({ pageSize, pageIndex, sortBy }) => {
@@ -123,6 +129,7 @@ function InvoicesDataTable({
onEdit: handleEditInvoice,
onDrawer: handleDrawerInvoice,
onQuick: handleQuickPaymentReceive,
onViewDetails: handleViewDetailInvoice,
baseCurrency,
}}
/>