mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 08:48:11 +00:00
Enhance overview and train scheduling features
- Updated OverviewContractsTabPanel to include a new donut chart for freight type distribution. - Modified OverviewOperationsTabPanel to improve data visualization with additional charts and refactored data handling. - Introduced CreateScheduleWindowFields component for configuring booking windows in train scheduling. - Added new API endpoints for allocation candidates and booking allocation in trainScheduling.service. - Enhanced BookingRequestsPage to support allocation of paid bookings with a modal for selecting alternative dates. - Updated QUERY_KEYS and URLS constants to accommodate new operations and features. - Improved type definitions for overview and train scheduling to support new functionalities.
This commit is contained in:
@@ -202,15 +202,31 @@ export class OverviewService {
|
||||
};
|
||||
}
|
||||
|
||||
async getOperationsTab(): Promise<OverviewOperationsTabDto> {
|
||||
async getOperationsTab(
|
||||
range: OverviewRangeQuery = '30d',
|
||||
): Promise<OverviewOperationsTabDto> {
|
||||
const days = OVERVIEW_RANGE_DAYS[range];
|
||||
|
||||
const [
|
||||
kpis,
|
||||
departureTrend,
|
||||
scheduleStatusBreakdown,
|
||||
wagonsByType,
|
||||
wagonsByYard,
|
||||
containersBySize,
|
||||
cargoTonnageByType,
|
||||
trainStatusBreakdown,
|
||||
wagonStatusBreakdown,
|
||||
containerStatusBreakdown,
|
||||
cargoStatusBreakdown,
|
||||
] = await Promise.all([
|
||||
this.overviewRepository.getOperationsKpis(),
|
||||
this.overviewRepository.getDepartureTrend(days),
|
||||
this.overviewRepository.getScheduleStatusBreakdown(),
|
||||
this.overviewRepository.getWagonsByType(),
|
||||
this.overviewRepository.getWagonsByYard(8),
|
||||
this.overviewRepository.getContainersBySize(),
|
||||
this.overviewRepository.getCargoTonnageByType(8),
|
||||
this.overviewRepository.getTrainStatusBreakdown(),
|
||||
this.overviewRepository.getWagonStatusBreakdown(),
|
||||
this.overviewRepository.getContainerStatusBreakdown(),
|
||||
@@ -219,6 +235,12 @@ export class OverviewService {
|
||||
|
||||
return {
|
||||
kpis,
|
||||
departureTrend,
|
||||
scheduleStatusBreakdown,
|
||||
wagonsByType,
|
||||
wagonsByYard,
|
||||
containersBySize,
|
||||
cargoTonnageByType,
|
||||
trainStatusBreakdown,
|
||||
wagonStatusBreakdown,
|
||||
containerStatusBreakdown,
|
||||
|
||||
Reference in New Issue
Block a user