mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 09:30:59 +00:00
Merge pull request #963 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
This commit is contained in:
@@ -285,13 +285,23 @@ export type IContractDocumentChange =
|
||||
toOrder: number;
|
||||
}
|
||||
| { kind: 'DOCUMENT_TITLE_CHANGED'; title: string; fromTitle: string | null }
|
||||
| { kind: 'WHEREAS_CHANGED'; added: number; removed: number };
|
||||
| { kind: 'WHEREAS_CHANGED'; added: number; removed: number }
|
||||
/** A contract field (not a document article) changed on a customer edit. */
|
||||
| {
|
||||
kind: 'FIELD_CHANGED';
|
||||
field: string;
|
||||
label: string;
|
||||
from: string | null;
|
||||
to: string | null;
|
||||
};
|
||||
|
||||
/** An audit entry for one edit to a contract's document. */
|
||||
export interface IContractDocumentRevision {
|
||||
id: string;
|
||||
contractId: string;
|
||||
actorId: string | null;
|
||||
/** Who made the edit, captured at the time (survives renames/deletions). */
|
||||
actorName?: string | null;
|
||||
/** The approval step's required role at the time of the edit. */
|
||||
actorRole: string | null;
|
||||
stepId: string | null;
|
||||
@@ -451,6 +461,9 @@ export interface ContractClearanceView {
|
||||
roHold?: boolean;
|
||||
roHoldReason?: string | null;
|
||||
vesselDepartureDate?: string | null;
|
||||
/** Import DO: vessel arrival + DO collection dates, recorded by GL Djibouti. */
|
||||
vesselArrivalDate?: string | null;
|
||||
doCollectedDate?: string | null;
|
||||
roAmendmentRequestedAt?: string | null;
|
||||
bookingReady?: boolean;
|
||||
preClearanceFinalized?: boolean;
|
||||
@@ -464,12 +477,32 @@ export interface ContractClearanceView {
|
||||
linkedBookingReviewNote?: string | null;
|
||||
/** Shipment day the booking holds; the default when GL resubmits it. */
|
||||
linkedBookingScheduledDate?: string | null;
|
||||
/**
|
||||
* Pre-declaration handshake with GL Djibouti: who handles the shipment in
|
||||
* transit. `name` stays null until Djibouti answers, and GL Ethiopia cannot
|
||||
* file the customs declaration before it is set.
|
||||
*/
|
||||
transitAssignee?: {
|
||||
requestedAt: string | null;
|
||||
requestNote: string | null;
|
||||
name: string | null;
|
||||
assignedAt: string | null;
|
||||
} | null;
|
||||
dutyAdvice?: {
|
||||
amount: number;
|
||||
currency: string;
|
||||
declarationSerial?: string | null;
|
||||
noticeFile?: { id: string; name: string; url: string } | null;
|
||||
} | null;
|
||||
/**
|
||||
* The customer's open objection to the advised duty. Present only until GL
|
||||
* re-advises; `rounds` counts how many times it has been sent back.
|
||||
*/
|
||||
dutyDispute?: {
|
||||
note: string;
|
||||
raisedAt: string;
|
||||
rounds: number;
|
||||
} | null;
|
||||
/** Phased customs uploads (IM4, DO, transit permit, etc.) with friendly labels. */
|
||||
workflowFiles?: import("./clearance-files.catalog").ClearanceWorkflowFile[];
|
||||
/** Import post-allocation T1 transit document state (null until a booking is linked). */
|
||||
@@ -887,6 +920,8 @@ export interface CreateBulkLineDto {
|
||||
export interface CreateBookingUnderContractDto {
|
||||
/** Required for GENERAL multi-route contracts; ONE_TIME auto-selected. */
|
||||
contractRouteId?: string;
|
||||
/** Billing currency for this shipment. Intercity is always ETB. */
|
||||
paymentCurrency?: string;
|
||||
/** Binding shipment day. Omitted for intercity (DOMESTIC) bookings — staff assign a passing train later. */
|
||||
scheduledDate?: string;
|
||||
/** "WITH_RETURN" | "WITHOUT_RETURN" — per-shipment override; falls back to the contract's equipment return. */
|
||||
@@ -936,6 +971,8 @@ export interface IBookingRequest extends BaseEntity {
|
||||
scheduledDate?: string | null;
|
||||
status: BookingRequestStatus;
|
||||
requestedLines: RequestedShipmentLines;
|
||||
/** Billing currency the customer chose; GL books the shipment in it. */
|
||||
paymentCurrency?: string | null;
|
||||
notes?: string | null;
|
||||
/** Set when GL accepts and creates the booking. */
|
||||
createdBookingId?: string | null;
|
||||
@@ -992,6 +1029,8 @@ export interface CreateBookingRequestDto {
|
||||
itemCount?: number;
|
||||
hazardousQuantity?: number;
|
||||
};
|
||||
/** Billing currency for the shipment GL will book. Intercity is always ETB. */
|
||||
paymentCurrency?: string;
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -348,24 +348,44 @@ export interface IWagonMovement extends BaseEntity {
|
||||
* wagons); OCC staff later pick the physical wagons and execute the move.
|
||||
*/
|
||||
export enum WagonTransferRequestStatus {
|
||||
/** Awaiting OCC fulfilment. */
|
||||
/** Awaiting OCC fulfilment — nothing moved yet. */
|
||||
Pending = "PENDING",
|
||||
/** OCC picked the wagons and executed the transfer. */
|
||||
/**
|
||||
* Some of the asked-for wagons have moved and the request is still open. OCC
|
||||
* keeps sending more, any number at any time, until the full count is met.
|
||||
*/
|
||||
PartiallyFulfilled = "PARTIALLY_FULFILLED",
|
||||
/** The full requested count has moved. */
|
||||
Fulfilled = "FULFILLED",
|
||||
/** Requester or OCC withdrew it before fulfilment. */
|
||||
/**
|
||||
* OCC ended the request with fewer wagons than asked for — the source yard
|
||||
* has no more to give. The shortfall must be requested from another yard.
|
||||
*/
|
||||
ClosedShort = "CLOSED_SHORT",
|
||||
/** Requester or OCC withdrew it before anything moved. */
|
||||
Cancelled = "CANCELLED",
|
||||
}
|
||||
|
||||
/** Statuses where OCC can still move wagons against the request. */
|
||||
export const OPEN_WAGON_TRANSFER_STATUSES: WagonTransferRequestStatus[] = [
|
||||
WagonTransferRequestStatus.Pending,
|
||||
WagonTransferRequestStatus.PartiallyFulfilled,
|
||||
];
|
||||
|
||||
export interface IWagonTransferRequest extends BaseEntity {
|
||||
fromYardId: string;
|
||||
toYardId: string;
|
||||
wagonTypeId: string;
|
||||
/** How many wagons of `wagonTypeId` to move out of `fromYardId`. */
|
||||
quantity: number;
|
||||
/** How many have actually moved so far — 0 until the first transfer. */
|
||||
fulfilledQuantity: number;
|
||||
status: WagonTransferRequestStatus;
|
||||
requestedByUserId?: string | null;
|
||||
fulfilledByUserId?: string | null;
|
||||
fulfilledAt?: string | null;
|
||||
/** Set when OCC ended the request short of the asked-for count. */
|
||||
closedShortAt?: string | null;
|
||||
/** Why the wagons are needed — required for new requests, shown on the OCC queue. */
|
||||
reason?: string | null;
|
||||
note?: string | null;
|
||||
@@ -754,6 +774,9 @@ export interface ClearanceView {
|
||||
roHold?: boolean;
|
||||
roHoldReason?: string | null;
|
||||
vesselDepartureDate?: string | null;
|
||||
/** Import DO: vessel arrival + DO collection dates, recorded by GL Djibouti. */
|
||||
vesselArrivalDate?: string | null;
|
||||
doCollectedDate?: string | null;
|
||||
roAmendmentRequestedAt?: string | null;
|
||||
/** Boundary milestone complete — customer may proceed to operations. */
|
||||
operationReady?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user