mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 13:38:20 +00:00
Enhance booking and signature functionalities
- Updated MySignaturePage title to Signature
This commit is contained in:
@@ -155,12 +155,17 @@ export class IntercityService {
|
||||
return {
|
||||
...this.mapBooking(booking, need),
|
||||
need,
|
||||
wagonBreakdown: capacity?.breakdownFor(booking) ?? [],
|
||||
fits: Boolean(need && capacity && leg && capacity.budget.fits(need, leg)),
|
||||
};
|
||||
}),
|
||||
accepted: accepted.map((booking) => {
|
||||
const need = capacity?.needFor(booking) ?? null;
|
||||
return { ...this.mapBooking(booking, need), need };
|
||||
return {
|
||||
...this.mapBooking(booking, need),
|
||||
need,
|
||||
wagonBreakdown: capacity?.breakdownFor(booking) ?? [],
|
||||
};
|
||||
}),
|
||||
};
|
||||
}
|
||||
@@ -200,7 +205,9 @@ export class IntercityService {
|
||||
where: { id: bookingId },
|
||||
relations: {
|
||||
bookingContainers: { containerType: true },
|
||||
cargoType: true,
|
||||
// wagonTypes drives the break-bulk items-per-wagon fit — the accept
|
||||
// check must size the booking exactly as the candidate list did.
|
||||
cargoType: { wagonTypes: true },
|
||||
},
|
||||
});
|
||||
if (!booking) {
|
||||
@@ -326,6 +333,10 @@ export class IntercityService {
|
||||
.leftJoinAndSelect('booking.bookingContainers', 'bookingContainer')
|
||||
.leftJoinAndSelect('bookingContainer.containerType', 'containerType')
|
||||
.leftJoinAndSelect('booking.cargoType', 'cargoType')
|
||||
// The allowed wagon-type list is what sizes a break-bulk (PER_ITEM)
|
||||
// booking: without it `bulkItemsFitFor` reads no items-per-wagon fit and
|
||||
// the wagon count silently degrades to tonnage-only.
|
||||
.leftJoinAndSelect('cargoType.wagonTypes', 'cargoWagonType')
|
||||
.leftJoinAndSelect('booking.originYard', 'originYard')
|
||||
.leftJoinAndSelect('booking.destinationYard', 'destinationYard')
|
||||
.where(`booking.trade_direction = 'DOMESTIC'`)
|
||||
@@ -355,6 +366,10 @@ export class IntercityService {
|
||||
.leftJoinAndSelect('booking.bookingContainers', 'bookingContainer')
|
||||
.leftJoinAndSelect('bookingContainer.containerType', 'containerType')
|
||||
.leftJoinAndSelect('booking.cargoType', 'cargoType')
|
||||
// The allowed wagon-type list is what sizes a break-bulk (PER_ITEM)
|
||||
// booking: without it `bulkItemsFitFor` reads no items-per-wagon fit and
|
||||
// the wagon count silently degrades to tonnage-only.
|
||||
.leftJoinAndSelect('cargoType.wagonTypes', 'cargoWagonType')
|
||||
.leftJoinAndSelect('booking.originYard', 'originYard')
|
||||
.leftJoinAndSelect('booking.destinationYard', 'destinationYard')
|
||||
.where(`booking.trade_direction = 'DOMESTIC'`)
|
||||
|
||||
Reference in New Issue
Block a user