mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 08:48:11 +00:00
[200~feat: add CustomsPaymentsCard and PaymentsTab components for handling customs payments and payment summaries
This commit is contained in:
@@ -300,6 +300,45 @@ export interface ScheduleHistoryEntry {
|
||||
/** Adjust response: fresh consist + schedule-impact warnings to surface. */
|
||||
export type AdjustConsistResult = ScheduleConsist & { warnings: string[] };
|
||||
|
||||
/** One consist wagon in the schedule-yards tab: where this departure plans it vs where it stands. */
|
||||
export interface ScheduleWagonYardRow {
|
||||
id: string;
|
||||
wagonNumber: string;
|
||||
sequenceNumber: number | null;
|
||||
wagonType: { id: string; code: string; name: string };
|
||||
physicalYardId: string | null;
|
||||
physicalYardLabel: string | null;
|
||||
plannedYardId: string | null;
|
||||
plannedYardLabel: string | null;
|
||||
aligned: boolean;
|
||||
locked: boolean;
|
||||
lockReason: string | null;
|
||||
}
|
||||
|
||||
export interface ScheduleWagonYardStop {
|
||||
yardId: string;
|
||||
label: string;
|
||||
/** Origin or intermediate stop — wagons can board here. The destination cannot. */
|
||||
pickup: boolean;
|
||||
planned: number;
|
||||
physical: number;
|
||||
}
|
||||
|
||||
export interface ScheduleWagonYards {
|
||||
scheduleId: string;
|
||||
train: { id: string; code: string };
|
||||
editable: boolean;
|
||||
stops: ScheduleWagonYardStop[];
|
||||
wagons: ScheduleWagonYardRow[];
|
||||
misaligned: number;
|
||||
}
|
||||
|
||||
export interface UpdateScheduleWagonYardsPayload {
|
||||
moves: Array<{ wagonId: string; yardId: string }>;
|
||||
}
|
||||
|
||||
export type UpdateScheduleWagonYardsResult = ScheduleWagonYards & { warnings: string[] };
|
||||
|
||||
export const trainBuilderService = {
|
||||
list: (filters: BuiltTrainListFilters = {}) =>
|
||||
apiClient.get<BuiltTrainListResponse>(`${BASE}${toQuery(filters)}`),
|
||||
@@ -350,6 +389,15 @@ export const trainBuilderService = {
|
||||
`/train-scheduling/schedules/${scheduleId}/adjust-consist`,
|
||||
payload,
|
||||
),
|
||||
/** Schedule-only wagon yard plan (where THIS departure boards each wagon). */
|
||||
scheduleWagonYards: (scheduleId: string) =>
|
||||
apiClient.get<ScheduleWagonYards>(`/train-scheduling/schedules/${scheduleId}/wagon-yards`),
|
||||
/** Re-plan boarding yards for this schedule; physical wagon yards untouched. */
|
||||
updateScheduleWagonYards: (scheduleId: string, payload: UpdateScheduleWagonYardsPayload) =>
|
||||
apiClient.patch<UpdateScheduleWagonYardsResult>(
|
||||
`/train-scheduling/schedules/${scheduleId}/wagon-yards`,
|
||||
payload,
|
||||
),
|
||||
/** Unified wagon/booking change history for the schedule's History tab. */
|
||||
scheduleHistory: (scheduleId: string) =>
|
||||
apiClient.get<ScheduleHistoryEntry[]>(
|
||||
|
||||
Reference in New Issue
Block a user