mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 09:58:12 +00:00
Merge pull request #1277 from Tria-plc/alpha
feat: ( reports ) add fleet passenger overview to passengers landing …
This commit is contained in:
@@ -37,6 +37,24 @@ export class ReportsController {
|
||||
return this.service.getPassengerList(scheduleId);
|
||||
}
|
||||
|
||||
// Two segments, so `@Get(":reportId")` below cannot shadow it whatever the order.
|
||||
@Get("passengers/overview")
|
||||
@ApiOperation({
|
||||
summary: "Fleet-wide passenger mix across a departure window",
|
||||
description:
|
||||
"Landing view for the passengers report, shown before a schedule is picked. Returns passenger volume per " +
|
||||
"departure day, nationality split, passenger-category mix and the busiest origin→destination pairs across " +
|
||||
"the window, plus one row per schedule.\n\n" +
|
||||
"The window is forward-looking — the next `days` days. If nothing is departing in that window, it falls " +
|
||||
"back to the most recent `days` of departures on record and says so via `window.direction`.\n\n" +
|
||||
"Counts CONFIRMED and BOARDED seats only, matching `GET /reports/passengers`. Carries no occupancy figure " +
|
||||
"by design: this report and the seat status report measure capacity differently, so a shared occupancy " +
|
||||
"number would contradict one of them.",
|
||||
})
|
||||
getPassengerOverview(@Query('days') days?: string) {
|
||||
return this.service.getPassengerOverview(days ? Number(days) : undefined);
|
||||
}
|
||||
|
||||
@Get("passengers")
|
||||
@ApiOperation({ summary: "Passengers report for a specific schedule" })
|
||||
getOccupancyReport(@Query("scheduleId") scheduleId: string) {
|
||||
|
||||
Reference in New Issue
Block a user