Merged in feat/sw-452-select-room-form-submit (pull request #711)

Feat/sw 452 select room form submit

Approved-by: Simon.Emanuelsson
This commit is contained in:
Pontus Dreij
2024-10-17 11:46:49 +00:00
9 changed files with 107 additions and 24 deletions

View File

@@ -1,6 +1,10 @@
import { z } from "zod"
import { Product, productTypePriceSchema } from "@/server/routers/hotels/output"
import {
Product,
productTypePriceSchema,
RoomConfiguration,
} from "@/server/routers/hotels/output"
import { Rate } from "./selectRate"
@@ -12,7 +16,8 @@ export type FlexibilityOptionProps = {
value: string
paymentTerm: string
priceInformation?: Array<string>
roomType: string
roomType: RoomConfiguration["roomType"]
roomTypeCode: RoomConfiguration["roomTypeCode"]
handleSelectRate: (rate: Rate) => void
}

View File

@@ -1,13 +1,28 @@
import { Product } from "@/server/routers/hotels/output"
import { Product, RoomConfiguration } from "@/server/routers/hotels/output"
interface Child {
bed: string
age: number
}
interface Room {
adults: number
roomtypecode: string
ratecode: string
child: Child[]
}
export interface SelectRateSearchParams {
fromDate: string
toDate: string
hotel: string
fromdate: string
todate: string
room: Room[]
[key: string]: string | string[] | Room[]
}
export interface Rate {
roomType: string
roomType: RoomConfiguration["roomType"]
roomTypeCode: RoomConfiguration["roomTypeCode"]
priceName: string
public: Product["productType"]["public"]
member: Product["productType"]["member"]