fix: persist selection of bed and breakfast if same room
This commit is contained in:
@@ -547,7 +547,7 @@ export const hotelQueryRouter = router({
|
||||
const hotelData = await getHotelData(
|
||||
{
|
||||
hotelId,
|
||||
language: ctx.lang,
|
||||
language: toApiLang(ctx.lang),
|
||||
},
|
||||
ctx.serviceToken
|
||||
)
|
||||
@@ -607,7 +607,11 @@ export const hotelQueryRouter = router({
|
||||
const bedTypes = availableRoomsInCategory
|
||||
.map((availRoom) => {
|
||||
const matchingRoom = hotelData?.included
|
||||
?.find((room) => room.name === availRoom.roomType)
|
||||
?.find((room) =>
|
||||
room.roomTypes
|
||||
.map((roomType) => roomType.code)
|
||||
.includes(availRoom.roomTypeCode)
|
||||
)
|
||||
?.roomTypes.find(
|
||||
(roomType) => roomType.code === availRoom.roomTypeCode
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user