Merge pull request #797 from Tria-plc/quick-fix

Build issue resolution
This commit is contained in:
Stephanos A.
2026-07-18 19:53:28 +03:00
committed by GitHub
2 changed files with 2 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ export class ReportsService {
where: { departureAt: { gte: dateFrom, lte: dateTo } },
include: {
coachAssignments: { include: { coach: { include: { seats: true } } } },
bookings: { include: { seats: true } },
bookings: { include: { seats: { where: { scheduleId: schedule.id } } } },
},
});
@@ -212,6 +212,7 @@ export class ReportsService {
where: { status: { in: ['CONFIRMED', 'BOARDED'] } },
include: {
seats: {
where: { scheduleId },
include: {
seat: { include: { coach: { include: { coachType: true } } } },
},

View File

@@ -9,10 +9,7 @@ import { formatDateTime } from '@/lib/utils';
interface ScheduleOption { id: string; label: string; }
interface ScheduleOption { id: string; label: string; }
interface PassengersReport {
schedule: { id: string; trainName: string; origin: string; destination: string; departureAt: string; arrivalAt: string; };
schedule: { id: string; trainName: string; origin: string; destination: string; departureAt: string; arrivalAt: string; };
summary: { totalSeats: number; totalPassengers: number; occupancyRate: number };
byCoach: { coachNumber: string; coachType: string; totalSeats: number; booked: number; occupancyRate: number }[];