print for kitchen
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-04-30 10:53:44 +03:30
parent 333643784e
commit 8177f71b3b
4 changed files with 257 additions and 8 deletions
+14 -8
View File
@@ -2,6 +2,7 @@ import Button from '@/components/Button'
import { type FC, useState, useEffect } from 'react'
interface OrderActionsProps {
onPrint: () => void
showVerifyCashPaymentButton: boolean
showSendToKitchenButton: boolean
showCancelButton: boolean
@@ -21,6 +22,7 @@ interface OrderActionsProps {
}
const OrderActions: FC<OrderActionsProps> = ({
onPrint,
showVerifyCashPaymentButton,
showSendToKitchenButton,
showCancelButton,
@@ -71,11 +73,15 @@ const OrderActions: FC<OrderActionsProps> = ({
onCancelOrder()
}
if (isCanceled) return null
return (
<div className='mt-6 flex flex-col gap-3'>
{showVerifyCashPaymentButton && (
<Button
label='چاپ'
onClick={onPrint}
className='bg-slate-700 hover:bg-slate-800'
/>
{!isCanceled && showVerifyCashPaymentButton && (
<Button
label='تایید پرداخت'
onClick={onVerifyCashPayment}
@@ -84,7 +90,7 @@ const OrderActions: FC<OrderActionsProps> = ({
/>
)}
{showSendToKitchenButton && (
{!isCanceled && showSendToKitchenButton && (
<Button
label='ارسال به آشپزخانه'
onClick={handleSendToKitchen}
@@ -93,7 +99,7 @@ const OrderActions: FC<OrderActionsProps> = ({
/>
)}
{isPreparing && isCourierDelivery && (
{!isCanceled && isPreparing && isCourierDelivery && (
<Button
label='تحویل به پیک'
onClick={handleDeliverToCourier}
@@ -102,7 +108,7 @@ const OrderActions: FC<OrderActionsProps> = ({
/>
)}
{isPreparing && isDineInOrCarDelivery && (
{!isCanceled && isPreparing && isDineInOrCarDelivery && (
<Button
label='تحویل به گارسون'
onClick={handleDeliverToWaiter}
@@ -111,7 +117,7 @@ const OrderActions: FC<OrderActionsProps> = ({
/>
)}
{isPreparing && isCustomerPickup && (
{!isCanceled && isPreparing && isCustomerPickup && (
<Button
label='تحویل به رسپشنیست'
onClick={handleDeliverToReceptionist}
@@ -120,7 +126,7 @@ const OrderActions: FC<OrderActionsProps> = ({
/>
)}
{showCancelButton && (
{!isCanceled && showCancelButton && (
<Button
label='لغو سفارش'
onClick={handleCancelOrder}