Merge pull request #1091 from Tria-plc/mulufeatures

Adding more detail messages for seat blocking
This commit is contained in:
mulish77
2026-08-03 11:39:09 +03:00
committed by GitHub
7 changed files with 74 additions and 68 deletions

View File

@@ -91,6 +91,8 @@ export interface BlockedSeatLossSchedule {
/** `soldSeats / sellableSeats`, as a percentage rounded to one decimal. */
loadFactorPercent: number;
blockedSeatCount: number;
/** Distinct blockers behind this schedule's blocked seats, in no particular order. */
blockedByNames: string[];
/** Loss at full occupancy — the sum of the fares these seats would have sold for. */
estimatedLossMinor: number;
/** `estimatedLossMinor × loadFactor` — what the train's actual demand supports. */
@@ -160,7 +162,8 @@ export interface BlockedSeatRevenueLossReport {
/** Compact roll-up embedded in `GET /dashboard/backoffice-stats`. */
export interface BlockedSeatRevenueLossStat {
periodDays: number;
/** `null` means the roll-up covers full history — the earliest schedule to the latest. */
periodDays: number | null;
lossByCurrency: BlockedSeatLossByCurrency[];
schedulesAffected: number;
blockedSeatCount: number;