From e8b7c124126e67b5373e661095bd955e720b9ef9 Mon Sep 17 00:00:00 2001 From: Stephanos A Date: Sun, 5 Jul 2026 21:09:30 +0300 Subject: [PATCH] Package booking inbound seat selection issue resolution --- .../edr-passenger-web/portal/src/app/booking/seats/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/edr-passenger-web/portal/src/app/booking/seats/page.tsx b/apps/edr-passenger-web/portal/src/app/booking/seats/page.tsx index 9d289bbe5..f0e765f33 100644 --- a/apps/edr-passenger-web/portal/src/app/booking/seats/page.tsx +++ b/apps/edr-passenger-web/portal/src/app/booking/seats/page.tsx @@ -198,11 +198,11 @@ export default function SeatsPage() { seatId: seatIds[i], })); - const isInbound = isRoundTrip && currentJourneyType === "inbound"; + const isInbound = currentJourneyType === "inbound"; // Always use the schedule's own station IDs (set from schedule.origin.id / schedule.destination.id) // so they are guaranteed to exist in the trip's TripStopTime records. - const scheduleForHold = isInbound ? inboundSchedule : (isRoundTrip ? outboundSchedule : selectedSchedule); + const scheduleForHold = isInbound && inboundSchedule ? inboundSchedule : (outboundSchedule || selectedSchedule); const originId = (scheduleForHold as any)?.originStationId || searchCriteria?.originStationId; const destinationId = (scheduleForHold as any)?.destinationStationId || searchCriteria?.destinationStationId; @@ -215,7 +215,7 @@ export default function SeatsPage() { }); }, onSuccess: (data: any) => { - const isInbound = isRoundTrip && currentJourneyType === "inbound"; + const isInbound = currentJourneyType === "inbound"; if (isInbound) { // Merge the return hold into the existing outbound hold const current = useBookingStore.getState().seatHold;