update the Consolidation and wagon filling on booking and Add GET /bookings/reference-data endpoint for booking form catalog (yards, containers, services, shipping lines, cargo types)

This commit is contained in:
marshal
2026-05-30 12:45:52 +03:00
parent badeeff345
commit 6b6a1d56d6
5 changed files with 290 additions and 52 deletions

View File

@@ -42,7 +42,7 @@ export class BookingsController {
summary: "Create a new freight booking",
description:
"Accepts all booking fields as form fields + dynamic file keys (e.g. passport, license). " +
"Auto-enables consolidation when containerType=20FT and odd quantity.",
"Auto-enables consolidation when container quantity does not fill a whole wagon; attempts partner match or PENDING_CONSOLIDATION.",
})
@ApiBody({
description:
@@ -150,8 +150,8 @@ export class BookingsController {
@ApiOperation({
summary: "Request freight consolidation",
description:
"Searches for a compatible 20FT partner (same origin, destination, tradeDirection). " +
"If a partner is found, both bookings are paired. If not, the booking enters the consolidation queue.",
"Searches for a partner whose container quantity complements yours to fill whole wagon(s) " +
"(same route, same container type). Pairs on match or sets PENDING_CONSOLIDATION with a status message.",
})
requestConsolidation(@Param("id", ParseUUIDPipe) id: string) {
return this.bookingsService.requestConsolidation(id);