mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-06 15:55:02 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user