order status enum changed

This commit is contained in:
hamid zarghami
2025-12-20 11:40:39 +03:30
parent 98be18f09f
commit 566c4cb97b
3 changed files with 23 additions and 35 deletions
@@ -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'
}