payment with card to card
This commit is contained in:
@@ -3,7 +3,6 @@ import { type FC, useState, useEffect } from 'react'
|
||||
|
||||
interface OrderActionsProps {
|
||||
onPrint: () => void
|
||||
showVerifyCashPaymentButton: boolean
|
||||
showSendToKitchenButton: boolean
|
||||
showCancelButton: boolean
|
||||
isPreparing: boolean
|
||||
@@ -11,9 +10,7 @@ interface OrderActionsProps {
|
||||
isDineInOrCarDelivery: boolean
|
||||
isCustomerPickup: boolean
|
||||
isCanceled: boolean
|
||||
isVerifyingPayment: boolean
|
||||
isChangingStatus: boolean
|
||||
onVerifyCashPayment: () => void
|
||||
onSendToKitchen: () => void
|
||||
onDeliverToCourier: () => void
|
||||
onDeliverToWaiter: () => void
|
||||
@@ -23,7 +20,6 @@ interface OrderActionsProps {
|
||||
|
||||
const OrderActions: FC<OrderActionsProps> = ({
|
||||
onPrint,
|
||||
showVerifyCashPaymentButton,
|
||||
showSendToKitchenButton,
|
||||
showCancelButton,
|
||||
isPreparing,
|
||||
@@ -31,9 +27,7 @@ const OrderActions: FC<OrderActionsProps> = ({
|
||||
isDineInOrCarDelivery,
|
||||
isCustomerPickup,
|
||||
isCanceled,
|
||||
isVerifyingPayment,
|
||||
isChangingStatus,
|
||||
onVerifyCashPayment,
|
||||
onSendToKitchen,
|
||||
onDeliverToCourier,
|
||||
onDeliverToWaiter,
|
||||
@@ -43,10 +37,10 @@ const OrderActions: FC<OrderActionsProps> = ({
|
||||
const [loadingAction, setLoadingAction] = useState<string | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (!isChangingStatus && !isVerifyingPayment) {
|
||||
if (!isChangingStatus) {
|
||||
setLoadingAction(null)
|
||||
}
|
||||
}, [isChangingStatus, isVerifyingPayment])
|
||||
}, [isChangingStatus])
|
||||
|
||||
const handleSendToKitchen = () => {
|
||||
setLoadingAction('sendToKitchen')
|
||||
@@ -81,15 +75,6 @@ const OrderActions: FC<OrderActionsProps> = ({
|
||||
className='bg-slate-700 hover:bg-slate-800'
|
||||
/>
|
||||
|
||||
{!isCanceled && showVerifyCashPaymentButton && (
|
||||
<Button
|
||||
label='تایید پرداخت'
|
||||
onClick={onVerifyCashPayment}
|
||||
isloading={isVerifyingPayment}
|
||||
className='bg-green-600 hover:bg-green-700'
|
||||
/>
|
||||
)}
|
||||
|
||||
{!isCanceled && showSendToKitchenButton && (
|
||||
<Button
|
||||
label='ارسال به آشپزخانه'
|
||||
|
||||
Reference in New Issue
Block a user