diff --git a/src/pages/orders/Details.tsx b/src/pages/orders/Details.tsx index f76faab..21cf632 100644 --- a/src/pages/orders/Details.tsx +++ b/src/pages/orders/Details.tsx @@ -17,6 +17,7 @@ import PaymentInfo from './components/PaymentInfo' import OrderActions from './components/OrderActions' import { toast } from 'react-toastify' import { extractErrorMessage } from '@/config/func' +import { printOrderReceipt } from './print/orderReceiptPrint' const OrderDetails: FC = () => { const { id } = useParams() @@ -197,6 +198,10 @@ const OrderDetails: FC = () => { setShowRefundModal(false) } + const handlePrintOrder = () => { + printOrderReceipt(order) + } + return (
@@ -228,6 +233,7 @@ const OrderDetails: FC = () => { getPaymentStatusText={getPaymentStatusText} /> void showVerifyCashPaymentButton: boolean showSendToKitchenButton: boolean showCancelButton: boolean @@ -21,6 +22,7 @@ interface OrderActionsProps { } const OrderActions: FC = ({ + onPrint, showVerifyCashPaymentButton, showSendToKitchenButton, showCancelButton, @@ -71,11 +73,15 @@ const OrderActions: FC = ({ onCancelOrder() } - if (isCanceled) return null - return (
- {showVerifyCashPaymentButton && ( +