Merge pull request #1280 from Tria-plc/freight/nati-2

Freight/nati 2
This commit is contained in:
Nathnael Wondisha
2026-08-13 22:16:04 +03:00
committed by GitHub
25 changed files with 1837 additions and 121 deletions

View File

@@ -218,6 +218,34 @@ export interface IOverviewTonnagePoint {
tons: number;
}
/**
* One cell of a two-dimensional breakdown — `group` is the bucket on the
* category axis (wagon type, yard, port), `series` the stacked slice (status).
*/
export interface IOverviewMatrixCell {
group: string;
series: string;
count: number;
}
/** One scheduled train's wagon allocation and load against its own capacity. */
export interface IOverviewTrainLoad {
scheduleId: string;
trainNumber: string;
/** Scheduled departure date, YYYY-MM-DD. */
date: string;
direction: string;
wagonsAllocated: number;
wagonsTotal: number;
tons: number;
}
/** Departure-to-departure gap for one train set, in hours. */
export interface IOverviewTurnaround {
trainSet: string;
hours: number;
}
export interface IOverviewOperationsTab {
kpis: IOverviewOperationsKpis;
departureTrend: IOverviewDirectionTrendPoint[];
@@ -230,6 +258,36 @@ export interface IOverviewOperationsTab {
wagonStatusBreakdown: IOverviewStatusCount[];
containerStatusBreakdown: IOverviewStatusCount[];
cargoStatusBreakdown: IOverviewStatusCount[];
/** Bookings per port yard (import → origin, export → destination). */
bookingsByPort: IOverviewLabelCount[];
/** Same ports, split by booking status. */
bookingStatusByPort: IOverviewMatrixCell[];
/** Recent/upcoming trains with their wagon fill and tonnage. */
trainLoads: IOverviewTrainLoad[];
generatedAt: string;
}
export interface IOverviewFleetTab {
wagonStatusBreakdown: IOverviewStatusCount[];
wagonStatusByType: IOverviewMatrixCell[];
wagonStatusByYard: IOverviewMatrixCell[];
locomotiveStatusBreakdown: IOverviewStatusCount[];
locomotivesByYard: IOverviewMatrixCell[];
locomotivesByType: IOverviewLabelCount[];
/** Mean departure-to-departure gap across all train sets, null when < 2 departures. */
avgTurnaroundHours: number | null;
turnaroundByTrain: IOverviewTurnaround[];
generatedAt: string;
}
/** Document and invoice queues the GL desks and marketing work through. */
export interface IOverviewClearanceTab {
bookingDocumentsByStatus: IOverviewStatusCount[];
contractDocumentsByStatus: IOverviewStatusCount[];
invoicesByStatus: IOverviewStatusCount[];
invoicesByType: IOverviewLabelCount[];
/** Signed vs pending handover papers, per mile. */
handoversByMile: IOverviewMatrixCell[];
generatedAt: string;
}
@@ -238,6 +296,8 @@ export interface IOverviewCustomersTab {
customerGrowthTrend: IOverviewTrendPoint[];
customersByType: IOverviewLabelCount[];
topCustomersByBookings: IOverviewLabelCount[];
/** Company profiles per type × status — active vs pending vs suspended. */
profilesByTypeStatus: IOverviewMatrixCell[];
generatedAt: string;
}