mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
feat(bookings): enhance operation request flow and add location selection for first/last mile
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user