order status enum changed
This commit is contained in:
@@ -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