diff --git a/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetail.js b/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetail.js index 0816976d2..b1ab566c3 100644 --- a/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetail.js +++ b/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetail.js @@ -10,7 +10,7 @@ import { useReceiptDetailDrawerContext } from './ReceiptDetailDrawerProvider'; * Receipt view detail. */ export default function ReceiptDetail() { - const { transactions, receiptId } = useReceiptDetailDrawerContext(); + const { transactions } = useReceiptDetailDrawerContext(); return (
@@ -18,7 +18,7 @@ export default function ReceiptDetail() { } + panel={} /> { + return receiptId + ? (history.push(`/receipts/${receiptId}/edit`), + closeDrawer('receipt-detail-drawer')) + : null; + }; + + // Handle delete sale receipt. + const onDeleteReceipt = () => { + return receiptId + ? (openAlert('receipt-delete', { receiptId }), + closeDrawer('receipt-detail-drawer')) + : null; + }; + // Handle print receipt. + const onPrintReceipt = () => { + openDialog('receipt-pdf-preview', { receiptId }); + }; + return ( + + +