BIG-32: fix close drawer when delete sale receipt.

This commit is contained in:
elforjani3
2021-09-12 15:48:11 +02:00
parent 823bbd94b7
commit 0eccd4da8e
2 changed files with 11 additions and 15 deletions

View File

@@ -34,18 +34,13 @@ function ReceiptDetailActionBar({
// Handle edit sale receipt.
const onEditReceipt = () => {
return receiptId
? (history.push(`/receipts/${receiptId}/edit`),
closeDrawer('receipt-detail-drawer'))
: null;
history.push(`/receipts/${receiptId}/edit`);
closeDrawer('receipt-detail-drawer');
};
// Handle delete sale receipt.
const onDeleteReceipt = () => {
return receiptId
? (openAlert('receipt-delete', { receiptId }),
closeDrawer('receipt-detail-drawer'))
: null;
openAlert('receipt-delete', { receiptId });
};
// Handle print receipt.
const onPrintReceipt = () => {