diff --git a/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingRouteCard.tsx b/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingRouteCard.tsx index 05fa58100..76478bc4f 100644 --- a/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingRouteCard.tsx +++ b/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingRouteCard.tsx @@ -17,9 +17,8 @@ export function BookingRouteCard({ booking }: BookingRouteCardProps) { Origin - {booking.originYard?.label} - - {booking.originYard?.code} + + {booking.originYard?.label ?? booking.originYard?.code} @@ -57,10 +56,7 @@ export function BookingRouteCard({ booking }: BookingRouteCardProps) { Destination - {booking.destinationYard?.label} - - - {booking.destinationYard?.code} + {booking.destinationYard?.label ?? booking.destinationYard?.code} diff --git a/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx b/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx index 6a70596aa..ec31e2f03 100644 --- a/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx @@ -67,8 +67,11 @@ const emptyForm = (): RouteFormState => ({ /** Order-insensitive pair key — yard distances are symmetric. */ const pairKey = (a: string, b: string) => (a < b ? `${a}|${b}` : `${b}|${a}`); +// Yards are identified to operators by name, not by their internal code: the +// yard coded KALITY is universally called GMP / Gelan Multipurpose Port, and +// showing both read as two different places. The code stays in the data. const yardLabel = (yard?: YardRef | null) => - yard ? `${yard.label} (${yard.code})` : "—"; + yard ? (yard.label ?? yard.code) : "—"; const statusColor = (status: RouteStatus) => { switch (status) { @@ -232,7 +235,7 @@ export default function RoutesPage() { () => (yardsQuery.data ?? []).map((yard) => ({ value: yard.id, - label: `${yard.label} (${yard.code})`, + label: yard.label ?? yard.code, })), [yardsQuery.data], ); diff --git a/apps/edr-freight-web/backoffice/src/pages/ruleEngine/YardDesksModal.tsx b/apps/edr-freight-web/backoffice/src/pages/ruleEngine/YardDesksModal.tsx index 5a9b6ccf6..18aa450ff 100644 --- a/apps/edr-freight-web/backoffice/src/pages/ruleEngine/YardDesksModal.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/ruleEngine/YardDesksModal.tsx @@ -83,7 +83,7 @@ export function YardDesksModal({