order status enum changed
This commit is contained in:
+6
-9
@@ -846,17 +846,14 @@
|
||||
"payment_methods_update": "ویرایش روش پرداخت"
|
||||
},
|
||||
"order_status": {
|
||||
"pending": "در انتظار تایید",
|
||||
"pendingPayment": "در انتظار پرداخت",
|
||||
"paid": "پرداخت شده",
|
||||
"confirmed": "تایید شده",
|
||||
"preparing": "در حال آماده سازی",
|
||||
"rejectedByRestaurant": "رد شده توسط رستوران",
|
||||
"cancelledByUser": "لغو شده توسط کاربر",
|
||||
"cancelledBySystem": "لغو شده توسط سیستم",
|
||||
"readyForCustomerPickup": "آماده برای دریافت مشتری",
|
||||
"readyForDineIn": "آماده برای سرو در محل",
|
||||
"readyForDeliveryCar": "آماده برای تحویل با ماشین",
|
||||
"readyForDeliveryCourier": "آماده برای تحویل با پیک",
|
||||
"delivered": "تحویل داده شده"
|
||||
"ready": "آماده",
|
||||
"shipped": "ارسال شده",
|
||||
"completed": "تکمیل شده",
|
||||
"canceled": "لغو شده"
|
||||
},
|
||||
"reviews": {
|
||||
"reviews": "نظرات",
|
||||
|
||||
@@ -16,17 +16,14 @@ interface GetOrderTableColumnsParams {
|
||||
|
||||
const getStatusVariant = (status: string): 'success' | 'error' | 'warning' | 'info' | 'pending' => {
|
||||
const variantMap: Record<string, 'success' | 'error' | 'warning' | 'info' | 'pending'> = {
|
||||
'pending': 'pending',
|
||||
'pendingPayment': 'pending',
|
||||
'paid': 'info',
|
||||
'confirmed': 'info',
|
||||
'preparing': 'warning',
|
||||
'rejectedByRestaurant': 'error',
|
||||
'cancelledByUser': 'error',
|
||||
'cancelledBySystem': 'error',
|
||||
'readyForCustomerPickup': 'info',
|
||||
'readyForDineIn': 'info',
|
||||
'readyForDeliveryCar': 'info',
|
||||
'readyForDeliveryCourier': 'info',
|
||||
'delivered': 'success',
|
||||
'ready': 'info',
|
||||
'shipped': 'info',
|
||||
'completed': 'success',
|
||||
'canceled': 'error',
|
||||
}
|
||||
return variantMap[status] || 'pending'
|
||||
}
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
export const enum OrderStatus {
|
||||
Pending = "pending",
|
||||
|
||||
Confirmed = "confirmed",
|
||||
Preparing = "preparing",
|
||||
|
||||
RejectedByRestaurant = "rejectedByRestaurant",
|
||||
CancelledByUser = "cancelledByUser",
|
||||
CancelledBySystem = "cancelledBySystem",
|
||||
|
||||
ReadyForCustomerPickup = "readyForCustomerPickup",
|
||||
ReadyForDineIn = "readyForDineIn",
|
||||
ReadyForDeliveryCar = "readyForDeliveryCar",
|
||||
ReadyForDeliveryCourier = "readyForDeliveryCourier",
|
||||
|
||||
Delivered = "delivered",
|
||||
export enum OrderStatus {
|
||||
PENDING_PAYMENT = "pendingPayment",
|
||||
PAID = "paid",
|
||||
CONFIRMED = "confirmed",
|
||||
PREPARING = "preparing",
|
||||
READY = "ready",
|
||||
SHIPPED = "shipped",
|
||||
COMPLETED = "completed",
|
||||
CANCELED = "canceled",
|
||||
}
|
||||
|
||||
export const enum PaymentStatusEnum {
|
||||
export enum PaymentStatusEnum {
|
||||
Pending = "pending",
|
||||
Paid = "paid",
|
||||
Failed = "failed",
|
||||
Refunded = "refunded",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user