fix(SW-1042)(SW-1114)(SW-1123): fix select room bugs
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
} from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomPackage } from "./roomFilter"
|
||||
import { Rate } from "./selectRate"
|
||||
|
||||
type ProductPrice = z.output<typeof productTypePriceSchema>
|
||||
export type RoomPriceSchema = z.output<typeof priceSchema>
|
||||
@@ -23,10 +22,17 @@ export type FlexibilityOptionProps = {
|
||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
||||
features: RoomConfiguration["features"]
|
||||
petRoomPackage: RoomPackage | undefined
|
||||
handleSelectRate: (rateCode: {
|
||||
publicRateCode: string
|
||||
roomTypeCode: string
|
||||
}) => void
|
||||
handleSelectRate: React.Dispatch<
|
||||
React.SetStateAction<
|
||||
| {
|
||||
publicRateCode: string
|
||||
roomTypeCode: string
|
||||
name: string
|
||||
paymentTerm: string
|
||||
}
|
||||
| undefined
|
||||
>
|
||||
>
|
||||
}
|
||||
|
||||
export interface PriceListProps {
|
||||
|
||||
@@ -19,10 +19,17 @@ export type RoomCardProps = {
|
||||
roomCategories: RoomData[]
|
||||
selectedPackages: RoomPackageCodes[]
|
||||
packages: RoomPackageData | undefined
|
||||
handleSelectRate: (rateCode: {
|
||||
publicRateCode: string
|
||||
roomTypeCode: string
|
||||
}) => void
|
||||
handleSelectRate: React.Dispatch<
|
||||
React.SetStateAction<
|
||||
| {
|
||||
publicRateCode: string
|
||||
roomTypeCode: string
|
||||
name: string
|
||||
paymentTerm: string
|
||||
}
|
||||
| undefined
|
||||
>
|
||||
>
|
||||
}
|
||||
|
||||
type RoomPackagePriceSchema = z.output<typeof packagePriceSchema>
|
||||
|
||||
@@ -10,10 +10,17 @@ export interface RoomSelectionProps {
|
||||
user: SafeUser
|
||||
availablePackages: RoomPackageData | undefined
|
||||
selectedPackages: RoomPackageCodes[]
|
||||
setRateCode: (rateCode: {
|
||||
publicRateCode: string
|
||||
roomTypeCode: string
|
||||
}) => void
|
||||
setRateCode: React.Dispatch<
|
||||
React.SetStateAction<
|
||||
| {
|
||||
publicRateCode: string
|
||||
roomTypeCode: string
|
||||
name: string
|
||||
paymentTerm: string
|
||||
}
|
||||
| undefined
|
||||
>
|
||||
>
|
||||
rateSummary: Rate | null
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ export interface SelectRateSearchParams {
|
||||
export interface Rate {
|
||||
roomType: RoomConfiguration["roomType"]
|
||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
||||
priceName: string
|
||||
priceName?: string
|
||||
priceTerm?: string
|
||||
public: Product["productType"]["public"]
|
||||
member?: Product["productType"]["member"]
|
||||
features: RoomConfiguration["features"]
|
||||
|
||||
Reference in New Issue
Block a user