Fix seat class name assignment to ensure consistency with fare engine resolution

This commit is contained in:
Stephanos A
2026-07-15 10:48:36 +03:00
parent b4992546d1
commit 6b84f22a91

View File

@@ -704,7 +704,12 @@ export class SearchService {
scheduleId: schedule.id,
});
return {
seatClassName: fare.seatClassName,
// Use the input seat class name (sc.name) so it always matches what
// buildCoachTypeDetails looks up via coachType.seatClasses. The fare
// engine may resolve a nationality-specific variant (nationalitySeatClass)
// whose name differs from sc.name, which would cause the class to be
// silently dropped from coachTypes and show N/A on the results page.
seatClassName: sc.name,
baseFareMinor: fare.totalMinor,
displayCurrency: fare.billingCurrency as Currency,
displayAmountMinor: fare.totalInBillingCurrency,