feat(bookings): enhance operation request flow and add location selection for first/last mile

This commit is contained in:
Marshal
2026-06-24 00:36:01 +00:00
parent 5be181aba8
commit 7ec06f2ff0

View File

@@ -30,7 +30,6 @@ import {
getRouteDirection,
} from "./schema";
import { SelectField, StepCard, StepHeader, StepLabel } from "./shared";
import { LocationPicker } from "./LocationPicker";
type BookingForm = UseFormReturn<
BookingFormInputValues,
@@ -50,13 +49,6 @@ export function Step4Route({
const originYard = form.watch("originYard");
const destinationYard = form.watch("destinationYard");
const isGeneralContract = form.watch("bookingType") === "general_contract";
const serviceTypeId = form.watch("serviceTypeId");
const firstMileEnabled = form.watch("firstMile.enabled");
const lastMileEnabled = form.watch("lastMile.enabled");
const serviceType = referenceData?.service.find((s) => s.id === serviceTypeId);
const showFirstMile = Boolean(serviceType?.includesFirstMile && firstMileEnabled);
const showLastMile = Boolean(serviceType?.includesLastMile && lastMileEnabled);
const {
fields: extraRoutes,