Merged in feat/SW-717-multiroom-select-hotel-api (pull request #1225)

Feat/SW-717 multiroom select hotel api
This commit is contained in:
Pontus Dreij
2025-02-07 13:15:07 +00:00
11 changed files with 185 additions and 116 deletions

View File

@@ -55,6 +55,7 @@ import {
} from "./utils"
import type { BedTypeSelection } from "@/types/components/hotelReservation/enterDetails/bedType"
import { AvailabilityEnum } from "@/types/components/hotelReservation/selectHotel/selectHotel"
import { BreakfastPackageEnum } from "@/types/enums/breakfast"
import { HotelTypeEnum } from "@/types/enums/hotelType"
import type { RequestOptionsWithOutBody } from "@/types/fetch"
@@ -675,14 +676,14 @@ export const hotelQueryRouter = router({
validateAvailabilityData.data.roomConfigurations.filter((room) => {
if (packageCodes) {
return (
room.status === "Available" &&
room.status === AvailabilityEnum.Available &&
room.features.some(
(feature) =>
packageCodes.includes(feature.code) && feature.inventory > 0
)
)
}
return room.status === "Available"
return room.status === AvailabilityEnum.Available
})
const selectedRoom = availableRooms.find(