mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
per-user trade-direction access scope
This commit is contained in:
@@ -303,6 +303,22 @@ export const TRADE_DIRECTION_LABELS: Record<ScheduleTradeDirection, string> = {
|
||||
DOMESTIC: "Intercity",
|
||||
};
|
||||
|
||||
/** All trade directions a backoffice user can be scoped to. */
|
||||
export const ALL_TRADE_DIRECTIONS: ScheduleTradeDirection[] = [
|
||||
"IMPORT",
|
||||
"EXPORT",
|
||||
"DOMESTIC",
|
||||
];
|
||||
|
||||
/**
|
||||
* Per-user backoffice data scope: which trade directions the user may see.
|
||||
* A missing config (or all three directions) means unrestricted.
|
||||
*/
|
||||
export interface UserTradeAccessDto {
|
||||
userId: string;
|
||||
directions: ScheduleTradeDirection[];
|
||||
}
|
||||
|
||||
export enum TrainCheckpointKind {
|
||||
Departed = "DEPARTED",
|
||||
Passed = "PASSED",
|
||||
@@ -951,6 +967,16 @@ export interface BookingReferenceYard {
|
||||
name: string;
|
||||
code: string;
|
||||
country: string;
|
||||
/**
|
||||
* Which freight types this yard can take, per side of the trip. False for a
|
||||
* yard with no facility record at all. Forms use these to offer a yard as an
|
||||
* origin or destination only where the selected cargo can actually be
|
||||
* handled.
|
||||
*/
|
||||
hasContainerFacilityOrigin: boolean;
|
||||
hasBulkFacilityOrigin: boolean;
|
||||
hasContainerFacilityDestination: boolean;
|
||||
hasBulkFacilityDestination: boolean;
|
||||
}
|
||||
|
||||
export interface BookingReferenceContainerType {
|
||||
|
||||
Reference in New Issue
Block a user