feat: add BookingWagonsPanel component for displaying allocated wagons in booking details

- Implemented BookingWagonsPanel to show allocated wagons, their containers, and export functionality.
- Integrated the new panel into BookingRequestDetailPage and BookingRequestsPage.
- Enhanced wagon cancellation modal to support rebooking of wagon cancellations with partner units.
- Updated API service to include a method for downloading wagons workbook.
- Modified types and constants to accommodate new features related to wagons.
- Adjusted various components and pages to ensure compatibility with the new wagon-related functionality.
This commit is contained in:
marshalyordanos
2026-09-03 15:39:27 +03:00
parent 165146c09d
commit 9c57aa1c0c
23 changed files with 1244 additions and 61 deletions

View File

@@ -44,6 +44,18 @@ export function toBookingListRow(booking: BookingDetail): BookingListRow {
booking.serviceType?.name ??
booking.serviceType?.code,
trainScheduleId: booking.trainScheduleId ?? null,
// List rows carry the flat departure date; detail responses carry the fuller
// summary object instead — fall back to it so a row mapped from either shape
// shows the same date.
trainScheduleDepartureDate:
booking.trainScheduleDepartureDate ??
booking.trainScheduleSummary?.scheduledDepartureDate ??
null,
trainScheduleReference:
booking.trainScheduleReference ??
booking.trainScheduleSummary?.reference ??
booking.trainScheduleSummary?.trainNumber ??
null,
isGovernment: booking.isGovernment ?? false,
governmentInstitution: booking.governmentInstitution ?? null,
consolidationPartnerId: booking.consolidationPartnerId ?? null,