feat(bookings): enhance booking process with customs clearing and document handling

- Update bookings service to prioritize uploaded documents over profile snapshots.
- Refactor pricing data seeder to remove unused service types and streamline cargo type seeding.
- Add customs clearing information to BookingRouteServiceCard, displaying agent details if applicable.
- Extend BookingDetail type to include customs clearing options.
- Modify NewBookingPage to remove the scheduling step, integrating estimated shipment date into the route step.
- Update StepIndicator to reflect the new step structure.
- Revise document handling in StepDocuments to allow for user uploads while displaying onboarding documents.
- Adjust Step2ServiceType to manage customs clearing agent input based on service type.
- Implement shipment date input in Step4Route for one-time bookings.
- Revise Step8Review to reflect changes in document handling and scheduling.
This commit is contained in:
Marshal
2026-06-24 23:37:55 +00:00
parent d7688fce21
commit 15ab9f906e
11 changed files with 566 additions and 224 deletions

View File

@@ -1,4 +1,4 @@
import { Train, MapPin, ArrowRight } from "lucide-react";
import { Train, MapPin, ArrowRight, FileText } from "lucide-react";
import { Group, Stack, Text, Badge, Box, SimpleGrid } from "@mantine/core";
import type { BookingDetail } from "@/types/booking";
@@ -44,6 +44,8 @@ export function BookingRouteServiceCard({
const serviceLabel =
booking.serviceType?.label ?? booking.serviceType?.code ?? "Rail service";
const includesCustoms = booking.serviceType?.includesCustoms;
const metrics = [
{ label: "Trade direction", value: booking.tradeDirection },
{ label: "Freight type", value: booking.freightType },
@@ -96,6 +98,47 @@ export function BookingRouteServiceCard({
<MetricTile key={m.label} label={m.label} value={m.value} />
))}
</SimpleGrid>
{includesCustoms ? (
<Box
mt="md"
px={14}
py={10}
style={{
borderRadius: 10,
border: "1.5px solid #CDEBDD",
background: "#F6FBF8",
}}
>
<Group gap={10} align="center">
<FileText size={15} color="#0A6F4D" />
<Text fz={13} fw={600} c="#0A6F4D">
Customs clearing included automatically
</Text>
</Group>
</Box>
) : booking.customsClearingAgent ? (
<Box
mt="md"
px={14}
py={10}
style={{
borderRadius: 10,
border: "1.5px solid #E6ECF2",
background: "#F8FAFC",
}}
>
<Group gap={10} align="center">
<FileText size={15} color="#64748B" />
<Text fz={13} fw={500} c="#374151">
Customs clearing agent:{" "}
<Text component="span" fw={700} c="#10202F">
{booking.customsClearingAgent}
</Text>
</Text>
</Group>
</Box>
) : null}
</SectionCard>
);
}