feat(SW-589): Room selection summary

This commit is contained in:
Pontus Dreij
2024-10-14 16:45:09 +02:00
parent 7a6af05447
commit 72eca90d1b
9 changed files with 131 additions and 21 deletions

View File

@@ -2,6 +2,8 @@ import { z } from "zod"
import { Product, productTypePriceSchema } from "@/server/routers/hotels/output"
import { Rate } from "./selectRate"
type ProductPrice = z.output<typeof productTypePriceSchema>
export type FlexibilityOptionProps = {
@@ -10,6 +12,8 @@ export type FlexibilityOptionProps = {
value: string
paymentTerm: string
priceInformation?: Array<string>
roomType: string
handleSelectRate: (rate: Rate) => void
}
export interface PriceListProps {

View File

@@ -3,10 +3,13 @@ import {
RoomConfiguration,
} from "@/server/routers/hotels/output"
import { Rate } from "./selectRate"
import { RoomData } from "@/types/hotel"
export type RoomCardProps = {
roomConfiguration: RoomConfiguration
rateDefinitions: RateDefinition[]
roomCategories: RoomData[]
handleSelectRate: (rate: Rate) => void
}

View File

@@ -1,8 +1,10 @@
import { RoomsAvailability } from "@/server/routers/hotels/output"
import { RoomData } from "@/types/hotel"
import { User } from "@/types/user"
export interface RoomSelectionProps {
roomConfigurations: RoomsAvailability
roomCategories: RoomData[]
user: User | null
}

View File

@@ -1,5 +1,23 @@
import { Product } from "@/server/routers/hotels/output"
export interface SelectRateSearchParams {
fromDate: string
toDate: string
hotel: string
}
export interface Rate {
roomType: string
priceName: string
public: Product["productType"]["public"]
member: Product["productType"]["member"]
}
export interface State {
selectedRate: Rate | null
}
export type SetSelectedRateAction = {
type: "SET_SELECTED_RATE"
payload: Rate
}