Adding more detail messages for seat blocking

This commit is contained in:
Mulu Mehari
2026-08-03 11:37:16 +03:00
parent f0295f401a
commit 8594d75164
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;