From 739442c9bc93c79ae01e715c41c1828d4c9a1b8b Mon Sep 17 00:00:00 2001 From: natib21 Date: Sat, 20 Jun 2026 09:19:08 +0000 Subject: [PATCH] fix data table --- .../backoffice/src/components/fleet/fleetFormat.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/edr-freight-web/backoffice/src/components/fleet/fleetFormat.tsx b/apps/edr-freight-web/backoffice/src/components/fleet/fleetFormat.tsx index b050da449..e07b2a49f 100644 --- a/apps/edr-freight-web/backoffice/src/components/fleet/fleetFormat.tsx +++ b/apps/edr-freight-web/backoffice/src/components/fleet/fleetFormat.tsx @@ -26,6 +26,7 @@ export const formatFleetCell = ( const status = value == null || value === "" ? "—" : String(value); const getStatusColor = (st: string): string => { const s = st.toUpperCase(); + console.log('Status for color mapping:', s); if (s === "ACTIVE") return "green"; if (s === "INACTIVE") return "gray"; if (s === "SUSPENDED" || s === "OUT_OF_SERVICE") return "red"; @@ -33,8 +34,10 @@ export const formatFleetCell = ( if (s === "RETIRED") return "gray"; return "gray"; }; + const color = getStatusColor(status); + console.log('Assigned color:', color, 'for status:', status); return ( - + {status} );