Fare engine updates, seat class amount updates

This commit is contained in:
Stephanos A
2026-07-08 18:16:57 +03:00
parent 9e208861c7
commit 3760bcdb66
15 changed files with 243 additions and 99 deletions

View File

@@ -209,7 +209,8 @@ export class SearchService {
const cutoffHours = await this.getCutoffHours();
const cutoffThreshold = new Date(now.getTime() + cutoffHours * 60 * 60 * 1000);
const earliest = new Date(Math.max((date < now ? now : date).getTime(), cutoffThreshold.getTime()));
const isToday = now.getFullYear() === y && now.getMonth() === m - 1 && now.getDate() === d;
const earliest = isToday ? cutoffThreshold : date;
const schedules = await this.prisma.trainSchedule.findMany({
where: {