mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 18:48:11 +00:00
exclude self from container clash
This commit is contained in:
@@ -961,7 +961,7 @@ export default function GlCreateBookingForm() {
|
||||
// modal falls back to the contract unit-rate estimate while it loads.
|
||||
const validateShipmentMutation = useMutation({
|
||||
mutationFn: (dto: Freight.CreateBookingUnderContractDto) =>
|
||||
contractsService.validateShipment(id ?? "", dto),
|
||||
contractsService.validateShipment(id ?? "", dto, completeBookingId),
|
||||
});
|
||||
const validation = validateShipmentMutation.data ?? null;
|
||||
|
||||
|
||||
@@ -673,8 +673,16 @@ export const contractsService = {
|
||||
validateShipment: (
|
||||
id: string,
|
||||
payload: Freight.CreateBookingUnderContractDto,
|
||||
// Completion/resubmit preview: exclude this booking's own containers from
|
||||
// the same-train clash check.
|
||||
excludeBookingId?: string,
|
||||
) =>
|
||||
postContract<ShipmentValidation>(C.VALIDATE_SHIPMENT(id), payload),
|
||||
postContract<ShipmentValidation>(
|
||||
excludeBookingId
|
||||
? `${C.VALIDATE_SHIPMENT(id)}?bookingId=${excludeBookingId}`
|
||||
: C.VALIDATE_SHIPMENT(id),
|
||||
payload,
|
||||
),
|
||||
|
||||
/** Remaining bookable quantity per cargo line (GENERAL draw-down cap). */
|
||||
getCapacity: async (id: string): Promise<Freight.ContractCapacityLine[]> => {
|
||||
|
||||
Reference in New Issue
Block a user