mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
Package booking inbound seat selection issue resolution
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user