feat(sw-452): added children

This commit is contained in:
Pontus Dreij
2024-10-17 10:25:04 +02:00
parent f25af8382e
commit 0238e9e07e
2 changed files with 3 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ export default async function SelectRatePage({
const selecetRoomParamsObject =
getHotelReservationQueryParams(selecetRoomParams)
const adults = selecetRoomParamsObject.room[0].adults // TODO: Handle multiple rooms
const children = selecetRoomParamsObject.room[0].child.length // TODO: Handle multiple rooms
const [hotelData, roomConfigurations, user] = await Promise.all([
serverClient().hotel.hotelData.get({
@@ -32,6 +33,7 @@ export default async function SelectRatePage({
roomStayStartDate: searchParams.fromDate,
roomStayEndDate: searchParams.toDate,
adults: adults,
children: children,
}),
getProfileSafely(),
])

View File

@@ -236,7 +236,7 @@ export const hotelQueryRouter = router({
hotels: serviceProcedure
.input(getHotelsAvailabilityInputSchema)
.query(async ({ input, ctx }) => {
const { lang, uid } = ctx
const { lang } = ctx
const apiLang = toApiLang(lang)
const {
cityId,