feat: SW-1583 Implemented Reward nights on city search

This commit is contained in:
Hrishikesh Vaipurkar
2025-03-03 16:39:10 +01:00
parent 51b70f3032
commit 5058180c41
25 changed files with 176 additions and 12 deletions

View File

@@ -36,8 +36,9 @@ const hotelFacilitiesFilterNames = [
export async function fetchAvailableHotels(
input: AvailabilityInput
): Promise<NullableHotelData[]> {
const availableHotels =
await serverClient().hotel.availability.hotelsByCity(input)
const availableHotels = input.redemption
? await serverClient().hotel.availability.hotelsByCityWithRedemption(input)
: await serverClient().hotel.availability.hotelsByCity(input)
if (!availableHotels) return []

View File

@@ -28,6 +28,7 @@ interface HotelSearchDetails<T> {
childrenInRoomString?: string
childrenInRoom?: Child[]
bookingCode?: string
redemption?: boolean
}
export async function getHotelSearchDetails<
@@ -105,5 +106,6 @@ export async function getHotelSearchDetails<
childrenInRoomString,
childrenInRoom,
bookingCode: selectHotelParams.bookingCode ?? undefined,
redemption: selectHotelParams.searchType === "redemption",
}
}