mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 06:28:12 +00:00
add goverment booking
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user