sub-task/ SW-695 Prefill Guests data in booking widget

This commit is contained in:
Hrishikesh Vaipurkar
2024-10-25 08:50:23 +02:00
parent 31da31b72d
commit 05d353e224
18 changed files with 342 additions and 182 deletions

View File

@@ -10,7 +10,7 @@ export type Child = {
export type GuestsRoom = {
adults: number
children: Child[]
child: Child[]
}
export interface GuestsRoomsPickerProps {

View File

@@ -4,6 +4,8 @@ import { z } from "zod"
import { bookingWidgetSchema } from "@/components/Forms/BookingWidget/schema"
import { bookingWidgetVariants } from "@/components/Forms/BookingWidget/variants"
import { GuestsRoom } from "./guestsRoomsPicker"
import type { Locations } from "@/types/trpc/routers/hotel/locations"
export type BookingWidgetSchema = z.output<typeof bookingWidgetSchema>
@@ -13,22 +15,27 @@ export type BookingWidgetSearchParams = {
hotel?: string
fromDate?: string
toDate?: string
room?: string
room?: GuestsRoom[]
[key: string]: string | string[] | GuestsRoom[] | undefined
}
export type BookingWidgetType = VariantProps<
typeof bookingWidgetVariants
>["type"]
export interface BookingWidgetPageProps {
searchParams?: URLSearchParams
}
export interface BookingWidgetProps {
type?: BookingWidgetType
searchParams?: BookingWidgetSearchParams
searchParams?: URLSearchParams
}
export interface BookingWidgetClientProps {
locations: Locations
type?: BookingWidgetType
searchParams?: BookingWidgetSearchParams
searchParams?: URLSearchParams
}
export interface BookingWidgetToggleButtonProps {