mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 00:38:11 +00:00
Package booking inbound seat selection issue resolution
This commit is contained in:
@@ -63,8 +63,7 @@ export class PackagesService {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (!pkg || pkg.status !== 'ACTIVE') throw new NotFoundException('Package not available');
|
if (!pkg || pkg.status !== 'ACTIVE') throw new NotFoundException('Package not available');
|
||||||
|
const tier = pkg.priceTiers.find((t) => t.id === tierId);
|
||||||
const tier = pkg.priceTiers.find(t => t.id === tierId);
|
|
||||||
if (!tier) throw new NotFoundException('Price tier not found');
|
if (!tier) throw new NotFoundException('Price tier not found');
|
||||||
|
|
||||||
if (adultCount < 1) throw new BadRequestException('At least one adult passenger required');
|
if (adultCount < 1) throw new BadRequestException('At least one adult passenger required');
|
||||||
@@ -127,12 +126,12 @@ export class PackagesService {
|
|||||||
},
|
},
|
||||||
returnSchedule: pkg.returnSchedule ? {
|
returnSchedule: pkg.returnSchedule ? {
|
||||||
scheduleId: pkg.returnScheduleId,
|
scheduleId: pkg.returnScheduleId,
|
||||||
originStationId: pkg.destinationStationId,
|
originStationId: pkg.returnSchedule.originStationId,
|
||||||
destinationStationId: pkg.originStationId,
|
destinationStationId: pkg.returnSchedule.destinationStationId,
|
||||||
departureAt: pkg.returnSchedule.departureAt,
|
departureAt: pkg.returnSchedule.departureAt,
|
||||||
arrivalAt: pkg.returnSchedule.arrivalAt,
|
arrivalAt: pkg.returnSchedule.arrivalAt,
|
||||||
originStation: pkg.returnSchedule.destinationStation,
|
originStation: pkg.returnSchedule.originStation,
|
||||||
destinationStation: pkg.returnSchedule.originStation,
|
destinationStation: pkg.returnSchedule.destinationStation,
|
||||||
} : null,
|
} : null,
|
||||||
includedServices: pkg.includedServices,
|
includedServices: pkg.includedServices,
|
||||||
busTransferIncluded: pkg.busTransferIncluded,
|
busTransferIncluded: pkg.busTransferIncluded,
|
||||||
|
|||||||
Reference in New Issue
Block a user