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} );