payment with card to card

This commit is contained in:
hamid zarghami
2026-06-15 12:18:25 +03:30
parent 1dd639c0b1
commit 22e443cf7b
7 changed files with 221 additions and 200 deletions
+2 -17
View File
@@ -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='ارسال به آشپزخانه'