allways show receipt
This commit is contained in:
@@ -109,7 +109,11 @@ const OrderDetails: FC = () => {
|
||||
const isDineInOrCarDelivery = order.deliveryMethod?.method === DeliveryMethodEnum.DineIn || order.deliveryMethod?.method === DeliveryMethodEnum.DeliveryCar
|
||||
const isCustomerPickup = order.deliveryMethod?.method === DeliveryMethodEnum.CustomerPickup
|
||||
|
||||
const showVerifyPaymentBox = (isCashPayment || isCreditCardPayment) && isPaymentPending && !isCanceled
|
||||
const payment = order.payments?.[0]
|
||||
const hasPaymentDescription = Boolean(payment?.description)
|
||||
const hasPaymentAttachments = Boolean(payment?.attachments && payment.attachments.length > 0)
|
||||
const showPaymentReceiptBox = isCreditCardPayment && (hasPaymentDescription || hasPaymentAttachments)
|
||||
const showVerifyPaymentButton = (isCashPayment || isCreditCardPayment) && isPaymentPending && !isCanceled
|
||||
|
||||
// نمایش دکمه ارسال به آشپزخانه
|
||||
// برای pendingPayment با پرداخت نقدی یا برای paid
|
||||
@@ -251,11 +255,12 @@ const OrderDetails: FC = () => {
|
||||
getPaymentStatusTextColor={getPaymentStatusTextColor}
|
||||
getPaymentStatusText={getPaymentStatusText}
|
||||
/>
|
||||
{showVerifyPaymentBox && (
|
||||
{showPaymentReceiptBox && (
|
||||
<PaymentVerificationBox
|
||||
order={order}
|
||||
isVerifyingPayment={isVerifyingPayment}
|
||||
onVerifyPayment={handleVerifyPayment}
|
||||
showVerifyButton={showVerifyPaymentButton}
|
||||
/>
|
||||
)}
|
||||
<OrderActions
|
||||
|
||||
Reference in New Issue
Block a user