mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
refactoring(receipt drawer): receipt drawer.
This commit is contained in:
@@ -65,10 +65,10 @@ function ReceiptsDataTable({
|
||||
openAlert('receipt-close', { receiptId: receipt.id });
|
||||
};
|
||||
|
||||
// Handle drawer receipts.
|
||||
const handleDrawerReceipt = () => {
|
||||
openDrawer('receipt-drawer', {});
|
||||
};
|
||||
// Handle drawer receipts.
|
||||
const handleDrawerReceipt = ({ id }) => {
|
||||
openDrawer('receipt-drawer', { receiptId: id });
|
||||
};
|
||||
|
||||
// Handles the datable fetch data once the state changing.
|
||||
const handleDataTableFetchData = useCallback(
|
||||
@@ -111,7 +111,7 @@ function ReceiptsDataTable({
|
||||
onEdit: handleEditReceipt,
|
||||
onDelete: handleDeleteReceipt,
|
||||
onClose: handleCloseReceipt,
|
||||
onDrawer:handleDrawerReceipt,
|
||||
onDrawer: handleDrawerReceipt,
|
||||
baseCurrency,
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -41,7 +41,7 @@ export function ActionsMenu({
|
||||
<MenuItem
|
||||
icon={<Icon icon={'receipt-24'} iconSize={16} />}
|
||||
text={formatMessage({ id: 'receipt_paper' })}
|
||||
onClick={() => onDrawer()}
|
||||
onClick={safeCallback(onDrawer, receipt)}
|
||||
/>
|
||||
<MenuItem
|
||||
text={formatMessage({ id: 'delete_receipt' })}
|
||||
|
||||
Reference in New Issue
Block a user