mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 10:58:14 +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],
|
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)
|
// 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.
|
// 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 originId = (scheduleForHold as any)?.originStationId || searchCriteria?.originStationId;
|
||||||
const destinationId = (scheduleForHold as any)?.destinationStationId || searchCriteria?.destinationStationId;
|
const destinationId = (scheduleForHold as any)?.destinationStationId || searchCriteria?.destinationStationId;
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ export default function SeatsPage() {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onSuccess: (data: any) => {
|
onSuccess: (data: any) => {
|
||||||
const isInbound = isRoundTrip && currentJourneyType === "inbound";
|
const isInbound = currentJourneyType === "inbound";
|
||||||
if (isInbound) {
|
if (isInbound) {
|
||||||
// Merge the return hold into the existing outbound hold
|
// Merge the return hold into the existing outbound hold
|
||||||
const current = useBookingStore.getState().seatHold;
|
const current = useBookingStore.getState().seatHold;
|
||||||
|
|||||||
Reference in New Issue
Block a user