feat(SW-717) use of AvailabilityEnum instead of strings
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user