Merged in fix/SW-3083-alternative-hotels-page-not-found (pull request #2396)
fix(SW-3083): alternative hotels compare locations with cityIdentifier * fix(SW-3083): alternative hotels compare locations with cityIdentifier * fix(SW-3083): rename cityName * fix(SW-3083): rename to cityIdentifier Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -42,7 +42,7 @@ export default async function AlternativeHotelsPage(
|
||||
bookingCode,
|
||||
childrenInRoom,
|
||||
city,
|
||||
cityName,
|
||||
cityIdentifier,
|
||||
hotel: isAlternativeFor,
|
||||
noOfRooms,
|
||||
redemption,
|
||||
@@ -98,7 +98,7 @@ export default async function AlternativeHotelsPage(
|
||||
noOfRooms,
|
||||
hotels?.[0]?.hotel.address.country,
|
||||
hotels?.[0]?.hotel.address.city,
|
||||
cityName,
|
||||
cityIdentifier,
|
||||
bookingCode,
|
||||
isBookingCodeRateAvailable,
|
||||
redemption,
|
||||
|
||||
@@ -35,7 +35,7 @@ export default async function SelectHotelPage(
|
||||
bookingCode,
|
||||
childrenInRoom,
|
||||
city,
|
||||
cityName,
|
||||
cityIdentifier,
|
||||
noOfRooms,
|
||||
redemption,
|
||||
} = searchDetails
|
||||
@@ -88,7 +88,7 @@ export default async function SelectHotelPage(
|
||||
noOfRooms,
|
||||
hotels?.[0]?.hotel.address.country,
|
||||
hotels?.[0]?.hotel.address.city,
|
||||
cityName,
|
||||
cityIdentifier,
|
||||
bookingCode,
|
||||
isBookingCodeRateAvailable,
|
||||
redemption,
|
||||
|
||||
@@ -38,7 +38,7 @@ export async function SelectHotelMapContainer({
|
||||
bookingCode,
|
||||
childrenInRoom,
|
||||
city,
|
||||
cityName,
|
||||
cityIdentifier,
|
||||
hotel: isAlternativeFor,
|
||||
noOfRooms,
|
||||
redemption,
|
||||
@@ -90,7 +90,7 @@ export async function SelectHotelMapContainer({
|
||||
noOfRooms,
|
||||
hotels?.[0]?.hotel.address.country,
|
||||
hotels?.[0]?.hotel.address.city,
|
||||
cityName,
|
||||
cityIdentifier,
|
||||
bookingCode,
|
||||
isBookingCodeRateAvailable,
|
||||
redemption,
|
||||
|
||||
@@ -24,7 +24,7 @@ interface HotelSearchDetails {
|
||||
childrenInRoom: ChildrenInRoom
|
||||
childrenInRoomString: ChildrenInRoomString
|
||||
city: Location | null
|
||||
cityName: string | undefined
|
||||
cityIdentifier: string | undefined
|
||||
hotel: HotelLocation | null
|
||||
noOfRooms: number
|
||||
redemption?: boolean
|
||||
@@ -61,15 +61,16 @@ export async function getHotelSearchDetails(
|
||||
return notFound()
|
||||
}
|
||||
|
||||
const cityName = isAlternativeHotels
|
||||
? hotel?.relationships.city.name
|
||||
const cityIdentifier = isAlternativeHotels
|
||||
? hotel?.relationships.city.cityIdentifier
|
||||
: params.city
|
||||
|
||||
const city = cityName
|
||||
const city = cityIdentifier
|
||||
? (locations.find(
|
||||
(location) =>
|
||||
"cityIdentifier" in location &&
|
||||
location.cityIdentifier?.toLowerCase() === cityName.toLowerCase()
|
||||
location.cityIdentifier?.toLowerCase() ===
|
||||
cityIdentifier.toLowerCase()
|
||||
) ?? null)
|
||||
: null
|
||||
|
||||
@@ -97,7 +98,7 @@ export async function getHotelSearchDetails(
|
||||
childrenInRoom,
|
||||
childrenInRoomString,
|
||||
city,
|
||||
cityName,
|
||||
cityIdentifier,
|
||||
hotel,
|
||||
noOfRooms: rooms?.length ?? 0,
|
||||
redemption: params.searchType === REDEMPTION,
|
||||
|
||||
Reference in New Issue
Block a user