Merged in fix/children-availability-fix-2 (pull request #1406)
fix: availability - correct children string * fix: availability - correct children string Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
|||||||
} from "@/server/trpc"
|
} from "@/server/trpc"
|
||||||
import { toApiLang } from "@/server/utils"
|
import { toApiLang } from "@/server/utils"
|
||||||
|
|
||||||
|
import { generateChildrenString } from "@/components/HotelReservation/utils"
|
||||||
import { cache } from "@/utils/cache"
|
import { cache } from "@/utils/cache"
|
||||||
|
|
||||||
import { getHotelPageUrl } from "../contentstack/hotelPage/utils"
|
import { getHotelPageUrl } from "../contentstack/hotelPage/utils"
|
||||||
@@ -510,8 +511,8 @@ export const hotelQueryRouter = router({
|
|||||||
adults: adultCount,
|
adults: adultCount,
|
||||||
...(childArray &&
|
...(childArray &&
|
||||||
childArray.length > 0 && {
|
childArray.length > 0 && {
|
||||||
children: childArray.join(","),
|
children: generateChildrenString(childArray),
|
||||||
}),
|
}),
|
||||||
...(bookingCode && { bookingCode }),
|
...(bookingCode && { bookingCode }),
|
||||||
language: apiLang,
|
language: apiLang,
|
||||||
}
|
}
|
||||||
@@ -754,9 +755,9 @@ export const hotelQueryRouter = router({
|
|||||||
type: matchingRoom.mainBed.type,
|
type: matchingRoom.mainBed.type,
|
||||||
extraBed: matchingRoom.fixedExtraBed
|
extraBed: matchingRoom.fixedExtraBed
|
||||||
? {
|
? {
|
||||||
type: matchingRoom.fixedExtraBed.type,
|
type: matchingRoom.fixedExtraBed.type,
|
||||||
description: matchingRoom.fixedExtraBed.description,
|
description: matchingRoom.fixedExtraBed.description,
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1112,9 +1113,9 @@ export const hotelQueryRouter = router({
|
|||||||
|
|
||||||
return hotelData
|
return hotelData
|
||||||
? {
|
? {
|
||||||
...hotelData,
|
...hotelData,
|
||||||
url,
|
url,
|
||||||
}
|
}
|
||||||
: null
|
: null
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user