fix(SW-1042): fix comment
This commit is contained in:
@@ -14,7 +14,10 @@ import {
|
|||||||
type RoomPackageCodes,
|
type RoomPackageCodes,
|
||||||
} from "@/types/components/hotelReservation/selectRate/roomFilter"
|
} from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||||
import type { SelectRateProps } from "@/types/components/hotelReservation/selectRate/roomSelection"
|
import type { SelectRateProps } from "@/types/components/hotelReservation/selectRate/roomSelection"
|
||||||
import type { Rate } from "@/types/components/hotelReservation/selectRate/selectRate"
|
import type {
|
||||||
|
Rate,
|
||||||
|
RateCode,
|
||||||
|
} from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||||
import type { RoomConfiguration } from "@/server/routers/hotels/output"
|
import type { RoomConfiguration } from "@/server/routers/hotels/output"
|
||||||
|
|
||||||
export default function Rooms({
|
export default function Rooms({
|
||||||
@@ -25,15 +28,9 @@ export default function Rooms({
|
|||||||
}: SelectRateProps) {
|
}: SelectRateProps) {
|
||||||
const visibleRooms: RoomConfiguration[] =
|
const visibleRooms: RoomConfiguration[] =
|
||||||
filterDuplicateRoomTypesByLowestPrice(roomsAvailability.roomConfigurations)
|
filterDuplicateRoomTypesByLowestPrice(roomsAvailability.roomConfigurations)
|
||||||
const [selectedRate, setSelectedRate] = useState<
|
const [selectedRate, setSelectedRate] = useState<RateCode | undefined>(
|
||||||
| {
|
undefined
|
||||||
publicRateCode: string
|
)
|
||||||
roomTypeCode: string
|
|
||||||
name: string
|
|
||||||
paymentTerm: string
|
|
||||||
}
|
|
||||||
| undefined
|
|
||||||
>(undefined)
|
|
||||||
const [selectedPackages, setSelectedPackages] = useState<RoomPackageCodes[]>(
|
const [selectedPackages, setSelectedPackages] = useState<RoomPackageCodes[]>(
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import {
|
|||||||
|
|
||||||
import { RoomPackage } from "./roomFilter"
|
import { RoomPackage } from "./roomFilter"
|
||||||
|
|
||||||
|
import type { RateCode } from "./selectRate"
|
||||||
|
|
||||||
type ProductPrice = z.output<typeof productTypePriceSchema>
|
type ProductPrice = z.output<typeof productTypePriceSchema>
|
||||||
export type RoomPriceSchema = z.output<typeof priceSchema>
|
export type RoomPriceSchema = z.output<typeof priceSchema>
|
||||||
|
|
||||||
@@ -20,17 +22,7 @@ export type FlexibilityOptionProps = {
|
|||||||
priceInformation?: Array<string>
|
priceInformation?: Array<string>
|
||||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
||||||
petRoomPackage: RoomPackage | undefined
|
petRoomPackage: RoomPackage | undefined
|
||||||
handleSelectRate: React.Dispatch<
|
handleSelectRate: React.Dispatch<React.SetStateAction<RateCode | undefined>>
|
||||||
React.SetStateAction<
|
|
||||||
| {
|
|
||||||
publicRateCode: string
|
|
||||||
roomTypeCode: string
|
|
||||||
name: string
|
|
||||||
paymentTerm: string
|
|
||||||
}
|
|
||||||
| undefined
|
|
||||||
>
|
|
||||||
>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PriceListProps {
|
export interface PriceListProps {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import {
|
|||||||
} from "@/server/routers/hotels/output"
|
} from "@/server/routers/hotels/output"
|
||||||
|
|
||||||
import { RoomPriceSchema } from "./flexibilityOption"
|
import { RoomPriceSchema } from "./flexibilityOption"
|
||||||
import { Rate } from "./selectRate"
|
|
||||||
|
|
||||||
import type { RoomData } from "@/types/hotel"
|
import type { RoomData } from "@/types/hotel"
|
||||||
import type { RoomPackageCodes, RoomPackageData } from "./roomFilter"
|
import type { RoomPackageCodes, RoomPackageData } from "./roomFilter"
|
||||||
|
import type { RateCode } from "./selectRate"
|
||||||
|
|
||||||
export type RoomCardProps = {
|
export type RoomCardProps = {
|
||||||
hotelId: string
|
hotelId: string
|
||||||
@@ -19,17 +19,7 @@ export type RoomCardProps = {
|
|||||||
roomCategories: RoomData[]
|
roomCategories: RoomData[]
|
||||||
selectedPackages: RoomPackageCodes[]
|
selectedPackages: RoomPackageCodes[]
|
||||||
packages: RoomPackageData | undefined
|
packages: RoomPackageData | undefined
|
||||||
handleSelectRate: React.Dispatch<
|
handleSelectRate: React.Dispatch<React.SetStateAction<RateCode | undefined>>
|
||||||
React.SetStateAction<
|
|
||||||
| {
|
|
||||||
publicRateCode: string
|
|
||||||
roomTypeCode: string
|
|
||||||
name: string
|
|
||||||
paymentTerm: string
|
|
||||||
}
|
|
||||||
| undefined
|
|
||||||
>
|
|
||||||
>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type RoomPackagePriceSchema = z.output<typeof packagePriceSchema>
|
type RoomPackagePriceSchema = z.output<typeof packagePriceSchema>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { RoomData } from "@/types/hotel"
|
|||||||
import type { SafeUser } from "@/types/user"
|
import type { SafeUser } from "@/types/user"
|
||||||
import type { RoomsAvailability } from "@/server/routers/hotels/output"
|
import type { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||||
import type { RoomPackageCodes, RoomPackageData } from "./roomFilter"
|
import type { RoomPackageCodes, RoomPackageData } from "./roomFilter"
|
||||||
import type { Rate } from "./selectRate"
|
import type { Rate, RateCode } from "./selectRate"
|
||||||
|
|
||||||
export interface RoomSelectionProps {
|
export interface RoomSelectionProps {
|
||||||
roomsAvailability: RoomsAvailability
|
roomsAvailability: RoomsAvailability
|
||||||
@@ -10,17 +10,7 @@ export interface RoomSelectionProps {
|
|||||||
user: SafeUser
|
user: SafeUser
|
||||||
availablePackages: RoomPackageData | undefined
|
availablePackages: RoomPackageData | undefined
|
||||||
selectedPackages: RoomPackageCodes[]
|
selectedPackages: RoomPackageCodes[]
|
||||||
setRateCode: React.Dispatch<
|
setRateCode: React.Dispatch<React.SetStateAction<RateCode | undefined>>
|
||||||
React.SetStateAction<
|
|
||||||
| {
|
|
||||||
publicRateCode: string
|
|
||||||
roomTypeCode: string
|
|
||||||
name: string
|
|
||||||
paymentTerm: string
|
|
||||||
}
|
|
||||||
| undefined
|
|
||||||
>
|
|
||||||
>
|
|
||||||
rateSummary: Rate | null
|
rateSummary: Rate | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,3 +33,10 @@ export interface Rate {
|
|||||||
member?: Product["productType"]["member"]
|
member?: Product["productType"]["member"]
|
||||||
features: RoomConfiguration["features"]
|
features: RoomConfiguration["features"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type RateCode = {
|
||||||
|
publicRateCode: string
|
||||||
|
roomTypeCode: string
|
||||||
|
name: string
|
||||||
|
paymentTerm: string
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user