add goverment booking

This commit is contained in:
Marshal
2026-07-31 00:41:51 +00:00
parent 34e4a7d13f
commit 65f18b4796
35 changed files with 913 additions and 88 deletions

View File

@@ -7,7 +7,7 @@ import {
Tabs,
Text,
} from "@mantine/core";
import { ArrowRight, Package, Train } from "lucide-react";
import { ArrowRight, Landmark, Package, Train } from "lucide-react";
import type { EligibleContainerBooking, FreightType } from "@/types/trainScheduling";
@@ -17,6 +17,7 @@ export type AssignedBookingRow = {
id: string;
reference: string;
weightTons?: number;
isGovernment?: boolean;
};
export function ScheduleBookingsStep({
@@ -29,6 +30,7 @@ export function ScheduleBookingsStep({
freightType,
canRemove,
onRemove,
onSwitch,
}: {
assignedBookings: AssignedBookingRow[];
eligibleItems: EligibleContainerBooking[];
@@ -39,6 +41,7 @@ export function ScheduleBookingsStep({
freightType?: FreightType;
canRemove?: boolean;
onRemove?: (bookingId: string) => void;
onSwitch?: (booking: EligibleContainerBooking) => void;
}) {
return (
<Paper p="md" radius="lg" withBorder style={{ borderColor: "var(--mantine-color-gray-2)" }}>
@@ -91,6 +94,16 @@ export function ScheduleBookingsStep({
{booking.weightTons}T
</Badge>
) : null}
{booking.isGovernment ? (
<Badge
variant="light"
size="xs"
color="yellow"
leftSection={<Landmark size={10} />}
>
Government
</Badge>
) : null}
</Group>
<Group gap={6}>
<Text size="xs" c="dimmed">
@@ -130,6 +143,7 @@ export function ScheduleBookingsStep({
onSelectionChange={onSelectionChange}
assignedIds={assignedIds}
freightType={freightType}
onSwitch={onSwitch}
/>
</Tabs.Panel>
</Tabs>