refactor: url management in hotel reservation flow
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import type { RoomPackageCodeEnum } from "../selectRate/roomFilter"
|
||||
import type { Child } from "../selectRate/selectRate"
|
||||
|
||||
interface Room {
|
||||
adults: number
|
||||
roomTypeCode: string
|
||||
rateCode: string
|
||||
counterRateCode?: string
|
||||
children?: Child[]
|
||||
packages?: RoomPackageCodeEnum[]
|
||||
}
|
||||
export interface BookingData {
|
||||
hotel: string
|
||||
fromDate: string
|
||||
toDate: string
|
||||
rooms: Room[]
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import type { z } from "zod"
|
||||
import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
import type { Location } from "@/types/trpc/routers/hotel/locations"
|
||||
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
|
||||
import type { Child } from "../../bookingWidget/guestsRoomsPicker"
|
||||
import type { Child } from "../selectRate/selectRate"
|
||||
import type { HotelData } from "./hotelCardListingProps"
|
||||
import type { CategorizedFilters, Filter } from "./hotelFilters"
|
||||
import type { SelectHotelSearchParams } from "./selectHotelSearchParams"
|
||||
@@ -66,7 +66,7 @@ export interface HotelCardDialogListingProps {
|
||||
|
||||
export type SelectHotelMapContainerProps = {
|
||||
city: Location
|
||||
searchParams: SelectHotelSearchParams
|
||||
selectHotelParams: SelectHotelSearchParams
|
||||
adultsInRoom: number
|
||||
childrenInRoom: string | undefined
|
||||
child: Child[] | undefined
|
||||
|
||||
@@ -46,8 +46,7 @@ export interface SelectHotelProps {
|
||||
lang: Lang
|
||||
}
|
||||
reservationParams: {
|
||||
selectHotelParams: URLSearchParams | undefined
|
||||
searchParams: SelectHotelSearchParams
|
||||
selectHotelParams: SelectHotelSearchParams
|
||||
adultsInRoom: number
|
||||
childrenInRoom: string | undefined
|
||||
childrenInRoomArray: Child[] | undefined
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
interface Child {
|
||||
bed: string
|
||||
age: number
|
||||
}
|
||||
|
||||
interface Room {
|
||||
adults: number
|
||||
child?: Child[]
|
||||
}
|
||||
import type { Room } from "../selectRate/selectRate"
|
||||
|
||||
export interface SelectHotelSearchParams {
|
||||
city: string
|
||||
fromDate: string
|
||||
toDate: string
|
||||
room: Room[]
|
||||
[key: string]: string | string[] | Room[]
|
||||
rooms: Pick<Room, "adults" | "children">[]
|
||||
[key: string]: string | string[] | Pick<Room, "adults" | "children">[]
|
||||
}
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
import type { Product, RoomConfiguration } from "@/server/routers/hotels/output"
|
||||
import type { ChildBedMapEnum } from "../../bookingWidget/enums"
|
||||
import type { RoomPackageCodeEnum } from "./roomFilter"
|
||||
|
||||
export interface Child {
|
||||
bed: ChildBedMapEnum
|
||||
age: number
|
||||
}
|
||||
|
||||
interface Room {
|
||||
export interface Room {
|
||||
adults: number
|
||||
roomtype: string
|
||||
ratecode: string
|
||||
counterratecode: string
|
||||
child?: Child[]
|
||||
packages?: string
|
||||
roomTypeCode: string
|
||||
rateCode: string
|
||||
counterRateCode: string
|
||||
children?: Child[]
|
||||
packages?: RoomPackageCodeEnum[]
|
||||
}
|
||||
|
||||
export interface SelectRateSearchParams {
|
||||
hotel: string
|
||||
city?: string
|
||||
hotelId: string
|
||||
fromDate: string
|
||||
toDate: string
|
||||
room: Room[]
|
||||
[key: string]: string | string[] | Room[]
|
||||
rooms: Room[]
|
||||
}
|
||||
|
||||
export interface Rate {
|
||||
|
||||
Reference in New Issue
Block a user