From 057d68709b93c6fcfc89dcf3e1fe78244cd05d0d Mon Sep 17 00:00:00 2001 From: Stephanos A Date: Wed, 12 Aug 2026 13:44:52 +0300 Subject: [PATCH] Backoffice build issue resolution --- .../backoffice/src/app/reports/overall/page.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/edr-passenger-web/backoffice/src/app/reports/overall/page.tsx b/apps/edr-passenger-web/backoffice/src/app/reports/overall/page.tsx index 0ecc7a885..9e88bdd5f 100644 --- a/apps/edr-passenger-web/backoffice/src/app/reports/overall/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/reports/overall/page.tsx @@ -110,6 +110,20 @@ export default function ReportsPage() { const totalBookingsCount = confirmedBookings.length; const totalTicketsCount = confirmedBookings.reduce((sum, b: any) => sum + getBookingTicketCount(b), 0); + const totalRegularTicketsCount = confirmedBookings + .filter((b: any) => { + const bookingType = String(b.bookingType || '').toUpperCase(); + return bookingType !== 'PACKAGE' && !b.packageId; + }) + .reduce((sum: number, b: any) => sum + getBookingTicketCount(b), 0); + + const totalPackageTicketsCount = confirmedBookings + .filter((b: any) => { + const bookingType = String(b.bookingType || '').toUpperCase(); + return bookingType === 'PACKAGE' || Boolean(b.packageId); + }) + .reduce((sum: number, b: any) => sum + getBookingTicketCount(b), 0); + const byDate = confirmedBookings.reduce((acc: Record, b: any) => { const date = new Date(b.createdAt).toISOString().split('T')[0]; if (!acc[date]) acc[date] = { totalMinor: 0, count: 0 };