mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 23:35:42 +00:00
feat: ( reports ) add fleet seat overview to seat status landing page
This commit is contained in:
@@ -60,6 +60,23 @@ export class ReportsController {
|
||||
return this.service.getSeatStatusReport(scheduleId);
|
||||
}
|
||||
|
||||
// Two segments, so `@Get(":reportId")` below cannot shadow it whatever the order.
|
||||
@Get("seat-status/overview")
|
||||
@ApiOperation({
|
||||
summary: "Fleet-wide seat status across a departure window",
|
||||
description:
|
||||
"Landing view for the seat status report, shown before a schedule is picked. Returns the same four " +
|
||||
"counters as the per-schedule report (paid, unpaid, expired holds, blocked) rolled up over a window of " +
|
||||
"departures, plus per-day buckets and 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 apply the same rules as `GET /reports/seat-status`, so a schedule's row here equals what the " +
|
||||
"drill-down shows after selecting it.",
|
||||
})
|
||||
getSeatStatusOverview(@Query('days') days?: string) {
|
||||
return this.service.getSeatStatusOverview(days ? Number(days) : undefined);
|
||||
}
|
||||
|
||||
@Get("boarding")
|
||||
@ApiOperation({ summary: "Boarding report for a schedule — boarded vs not-boarded passengers" })
|
||||
getBoardingReport(@Query('scheduleId') scheduleId: string) {
|
||||
|
||||
Reference in New Issue
Block a user