From e876d19a2e7b83dfebfe883f521147d52c643672 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Mon, 9 Feb 2026 16:50:03 +0330 Subject: [PATCH] Fix build --- src/langs/fa.json | 4 +--- src/pages/orders/Details.tsx | 14 -------------- src/pages/orders/components/OrderActions.tsx | 18 ------------------ src/pages/orders/components/PaymentInfo.tsx | 5 +---- src/pages/shipmentMethod/Create.tsx | 2 -- src/pages/shipmentMethod/Update.tsx | 2 -- src/pages/shipmentMethod/enum/Enum.ts | 2 -- 7 files changed, 2 insertions(+), 45 deletions(-) diff --git a/src/langs/fa.json b/src/langs/fa.json index b15ffb0..2be398e 100644 --- a/src/langs/fa.json +++ b/src/langs/fa.json @@ -71,10 +71,8 @@ "statistics": "گزارشات" }, "shipment": { - "dineIn": "سرو در فروشگاه", "customerPickup": "دریافت از محل", - "deliveryCar": "تحویل به خودرو", - "deliveryCourier": "بیرون بر" + "deliveryCourier": "ارسال با پیک" }, "slider": { "new_slider": "اسلایدر جدید", diff --git a/src/pages/orders/Details.tsx b/src/pages/orders/Details.tsx index f76faab..937e0bf 100644 --- a/src/pages/orders/Details.tsx +++ b/src/pages/orders/Details.tsx @@ -98,7 +98,6 @@ const OrderDetails: FC = () => { // بررسی وضعیت pending (هم enum و هم string literal) const isPaymentPending = paymentStatus === PaymentStatusEnum.Pending || paymentStatus === 'pending' const isCourierDelivery = order.deliveryMethod?.method === DeliveryMethodEnum.DeliveryCourier - const isDineInOrCarDelivery = order.deliveryMethod?.method === DeliveryMethodEnum.DineIn || order.deliveryMethod?.method === DeliveryMethodEnum.DeliveryCar const isCustomerPickup = order.deliveryMethod?.method === DeliveryMethodEnum.CustomerPickup // نمایش دکمه تایید پرداخت نقدی @@ -149,17 +148,6 @@ const OrderDetails: FC = () => { }) } - const handleDeliverToWaiter = () => { - changeOrderStatus({ - orderId: order.id, - status: OrderStatus.DELIVERED_TO_WAITER - }, { - onError: (error) => { - toast.error(extractErrorMessage(error)) - } - }) - } - const handleDeliverToReceptionist = () => { changeOrderStatus({ orderId: order.id, @@ -233,7 +221,6 @@ const OrderDetails: FC = () => { showCancelButton={showCancelButton} isPreparing={isPreparing} isCourierDelivery={isCourierDelivery} - isDineInOrCarDelivery={isDineInOrCarDelivery} isCustomerPickup={isCustomerPickup} isCanceled={isCanceled} isVerifyingPayment={isVerifyingPayment} @@ -241,7 +228,6 @@ const OrderDetails: FC = () => { onVerifyCashPayment={handleVerifyCashPayment} onSendToKitchen={handleSendToKitchen} onDeliverToCourier={handleDeliverToCourier} - onDeliverToWaiter={handleDeliverToWaiter} onDeliverToReceptionist={handleDeliverToReceptionist} onCancelOrder={() => setShowCancelModal(true)} /> diff --git a/src/pages/orders/components/OrderActions.tsx b/src/pages/orders/components/OrderActions.tsx index 6d25c8b..4e1cfb2 100644 --- a/src/pages/orders/components/OrderActions.tsx +++ b/src/pages/orders/components/OrderActions.tsx @@ -7,7 +7,6 @@ interface OrderActionsProps { showCancelButton: boolean isPreparing: boolean isCourierDelivery: boolean - isDineInOrCarDelivery: boolean isCustomerPickup: boolean isCanceled: boolean isVerifyingPayment: boolean @@ -15,7 +14,6 @@ interface OrderActionsProps { onVerifyCashPayment: () => void onSendToKitchen: () => void onDeliverToCourier: () => void - onDeliverToWaiter: () => void onDeliverToReceptionist: () => void onCancelOrder: () => void } @@ -26,7 +24,6 @@ const OrderActions: FC = ({ showCancelButton, isPreparing, isCourierDelivery, - isDineInOrCarDelivery, isCustomerPickup, isCanceled, isVerifyingPayment, @@ -34,7 +31,6 @@ const OrderActions: FC = ({ onVerifyCashPayment, onSendToKitchen, onDeliverToCourier, - onDeliverToWaiter, onDeliverToReceptionist, onCancelOrder }) => { @@ -56,11 +52,6 @@ const OrderActions: FC = ({ onDeliverToCourier() } - const handleDeliverToWaiter = () => { - setLoadingAction('deliverToWaiter') - onDeliverToWaiter() - } - const handleDeliverToReceptionist = () => { setLoadingAction('deliverToReceptionist') onDeliverToReceptionist() @@ -102,15 +93,6 @@ const OrderActions: FC = ({ /> )} - {isPreparing && isDineInOrCarDelivery && ( -