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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user