mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 11:08:12 +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,
|
getRouteDirection,
|
||||||
} from "./schema";
|
} from "./schema";
|
||||||
import { SelectField, StepCard, StepHeader, StepLabel } from "./shared";
|
import { SelectField, StepCard, StepHeader, StepLabel } from "./shared";
|
||||||
import { LocationPicker } from "./LocationPicker";
|
|
||||||
|
|
||||||
type BookingForm = UseFormReturn<
|
type BookingForm = UseFormReturn<
|
||||||
BookingFormInputValues,
|
BookingFormInputValues,
|
||||||
@@ -50,13 +49,6 @@ export function Step4Route({
|
|||||||
const originYard = form.watch("originYard");
|
const originYard = form.watch("originYard");
|
||||||
const destinationYard = form.watch("destinationYard");
|
const destinationYard = form.watch("destinationYard");
|
||||||
const isGeneralContract = form.watch("bookingType") === "general_contract";
|
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 {
|
const {
|
||||||
fields: extraRoutes,
|
fields: extraRoutes,
|
||||||
|
|||||||
Reference in New Issue
Block a user