mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
enhance booking and contract notification systems
- Added detailed logging for socket connection events in useBookingWindowSocket. - Introduced new notification types for contract status and schedule updates. - Updated notification visuals to include new icons for contract status. - Enhanced notification href resolution for contract status and schedule updates. - Implemented booking lifecycle notifier service for customer and staff notifications. - Created contract notifier service for managing contract lifecycle notifications. - Added end-to-end tests for booking window socket functionality.
This commit is contained in:
@@ -438,6 +438,13 @@ export interface IBooking extends BaseEntity {
|
||||
contractReference?: string | null;
|
||||
trainId?: string | null;
|
||||
status: BookingStatus;
|
||||
/**
|
||||
* Operational status of the assigned train (DRAFT/SCHEDULED/DISPATCHED/
|
||||
* ARRIVED), joined on booking detail. The booking status stays IN_TRANSIT
|
||||
* from dispatch until delivery, so the portal stepper reads arrival from
|
||||
* here.
|
||||
*/
|
||||
trainScheduleStatus?: TrainScheduleStatus | string | null;
|
||||
/** ONE_TIME for normal bookings; GENERAL_CONTRACT for umbrella contracts. */
|
||||
bookingType?: BookingType;
|
||||
/** General contracts only: when ordering closes (null until active / for one-time). */
|
||||
|
||||
@@ -33,6 +33,8 @@ export enum NotificationType {
|
||||
CLEARANCE_DECISION = "CLEARANCE_DECISION",
|
||||
DOCUMENT_ACTION = "DOCUMENT_ACTION",
|
||||
BOOKING_STATUS = "BOOKING_STATUS",
|
||||
CONTRACT_STATUS = "CONTRACT_STATUS",
|
||||
SCHEDULE_UPDATE = "SCHEDULE_UPDATE",
|
||||
INVOICE_ISSUED = "INVOICE_ISSUED",
|
||||
// Backoffice-facing (staff)
|
||||
REQUEST_SUBMITTED = "REQUEST_SUBMITTED",
|
||||
@@ -87,6 +89,8 @@ export interface NotificationRecipients {
|
||||
companyProfileId?: string;
|
||||
/** Backoffice: all current employees of this organization. */
|
||||
organizationId?: string;
|
||||
/** Backoffice: every current employee across all organizations. */
|
||||
allBackoffice?: boolean;
|
||||
}
|
||||
|
||||
/** Input any subsystem passes to `NotificationInboxService.notify(...)`. */
|
||||
|
||||
Reference in New Issue
Block a user