Merge pull request #640 from Tria-plc/freight_feature/usermanagement

Freight feature/usermanagement
This commit is contained in:
marshal
2026-07-13 08:13:01 +03:00
committed by GitHub
120 changed files with 3798 additions and 1409 deletions

View File

@@ -32,9 +32,22 @@ export interface BookingWindowPhaseEvent {
scheduledDepartureDate: string | null;
}
/**
* Payload pushed whenever server-side state behind a schedule's batch board
* changes outside a phase transition (payment settled, allocation run, batch
* fill, reservation expiry, doc review, …). Carries no board data — clients
* refetch the views they hold; `reason` exists for debugging/telemetry only.
*/
export interface BatchBoardChangedEvent {
scheduleId: string;
reason: string;
at: string;
}
/** Socket.io event names pushed server → client on the booking-windows namespace. */
export const BOOKING_WINDOW_WS_EVENTS = {
PHASE: "booking-window:phase",
BATCH_CHANGED: "batch-board:changed",
} as const;
/** Socket.io namespace the booking-window gateway listens on. */

View File

@@ -604,6 +604,16 @@ export interface IBooking extends BaseEntity {
latestChangeRequestNote?: string | null;
contractSummary?: string | null;
pricingBreakdown?: PricingBreakdown | null;
/**
* The customer paid a partial batch offer and this booking was reduced to
* the offered part. On a ONE_TIME contract this frees the single-booking
* slot for the remainder: the next booking must take the whole leftover
* quantity (the contract kind itself never changes).
*/
isSplit?: boolean;
/** What this booking carried before it was reduced by a split (bulk tons / units per size). */
preSplitQuantities?: { bulkTons?: number; bySize?: Record<string, number> } | null;
}
export interface PricingBreakdownLineItem {