intercity fix

This commit is contained in:
Marshal
2026-07-31 10:50:16 +00:00
parent 74b7ee81fc
commit a64af98205
17 changed files with 1174 additions and 182 deletions

View File

@@ -7,7 +7,7 @@ import {
Tabs,
Text,
} from "@mantine/core";
import { ArrowRight, Landmark, Package, Train } from "lucide-react";
import { ArrowRight, FileText, Landmark, MapPin, Package, Train } from "lucide-react";
import type { EligibleContainerBooking, FreightType } from "@/types/trainScheduling";
@@ -18,6 +18,10 @@ export type AssignedBookingRow = {
reference: string;
weightTons?: number;
isGovernment?: boolean;
wagonsRequired?: number | null;
contractReference?: string | null;
origin?: string | null;
destination?: string | null;
};
export function ScheduleBookingsStep({
@@ -94,6 +98,16 @@ export function ScheduleBookingsStep({
{booking.weightTons}T
</Badge>
) : null}
{booking.wagonsRequired != null ? (
<Badge
variant="outline"
size="xs"
color="gray"
leftSection={<Train size={10} />}
>
{booking.wagonsRequired} wagon{booking.wagonsRequired === 1 ? "" : "s"}
</Badge>
) : null}
{booking.isGovernment ? (
<Badge
variant="light"
@@ -105,6 +119,26 @@ export function ScheduleBookingsStep({
</Badge>
) : null}
</Group>
{booking.contractReference || booking.origin || booking.destination ? (
<Group gap="xs">
{booking.contractReference ? (
<Group gap={4}>
<FileText size={12} />
<Text size="xs" c="dimmed">
{booking.contractReference}
</Text>
</Group>
) : null}
{booking.origin || booking.destination ? (
<Group gap={4}>
<MapPin size={12} />
<Text size="xs" c="dimmed">
{booking.origin ?? "?"} {booking.destination ?? "?"}
</Text>
</Group>
) : null}
</Group>
) : null}
<Group gap={6}>
<Text size="xs" c="dimmed">
Assigned to this consist