Merge branch 'develop' into feature/tracking
This commit is contained in:
@@ -10,7 +10,7 @@ export type Child = {
|
||||
|
||||
export type GuestsRoom = {
|
||||
adults: number
|
||||
children: Child[]
|
||||
child: Child[]
|
||||
}
|
||||
|
||||
export interface GuestsRoomsPickerProps {
|
||||
|
||||
@@ -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,7 +15,7 @@ export type BookingWidgetSearchParams = {
|
||||
hotel?: string
|
||||
fromDate?: string
|
||||
toDate?: string
|
||||
room?: string
|
||||
room?: GuestsRoom[]
|
||||
}
|
||||
|
||||
export type BookingWidgetType = VariantProps<
|
||||
@@ -22,13 +24,13 @@ export type BookingWidgetType = VariantProps<
|
||||
|
||||
export interface BookingWidgetProps {
|
||||
type?: BookingWidgetType
|
||||
searchParams?: BookingWidgetSearchParams
|
||||
searchParams?: URLSearchParams
|
||||
}
|
||||
|
||||
export interface BookingWidgetClientProps {
|
||||
locations: Locations
|
||||
type?: BookingWidgetType
|
||||
searchParams?: BookingWidgetSearchParams
|
||||
searchParams?: URLSearchParams
|
||||
}
|
||||
|
||||
export interface BookingWidgetToggleButtonProps {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export type HotelListingItemProps = {
|
||||
imageUrl: string
|
||||
altText: string
|
||||
name: string
|
||||
address: string
|
||||
distanceToCentre: number
|
||||
description: string
|
||||
link: string
|
||||
}
|
||||
@@ -1,5 +1,21 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { breakfastSchema } from "@/components/HotelReservation/EnterDetails/Breakfast/schema"
|
||||
import {
|
||||
breakfastPackageSchema,
|
||||
breakfastPackagesSchema,
|
||||
} from "@/server/routers/hotels/output"
|
||||
|
||||
export interface BreakfastSchema extends z.output<typeof breakfastSchema> {}
|
||||
import { breakfastFormSchema } from "@/components/HotelReservation/EnterDetails/Breakfast/schema"
|
||||
|
||||
export interface BreakfastFormSchema
|
||||
extends z.output<typeof breakfastFormSchema> {}
|
||||
|
||||
export interface BreakfastPackages
|
||||
extends z.output<typeof breakfastPackagesSchema> {}
|
||||
|
||||
export interface BreakfastPackage
|
||||
extends z.output<typeof breakfastPackageSchema> {}
|
||||
|
||||
export interface BreakfastProps {
|
||||
packages: BreakfastPackages | null
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
type FilterChipType = "checkbox" | "radio"
|
||||
|
||||
export interface FilterChipProps {
|
||||
Icon?: React.ElementType
|
||||
iconHeight?: number
|
||||
iconWidth?: number
|
||||
id?: string
|
||||
label: string
|
||||
name: string
|
||||
type: FilterChipType
|
||||
value?: string
|
||||
selected?: boolean
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
export type FilterChipCheckboxProps = Omit<FilterChipProps, "type">
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ImageItem } from "@/types/components/lightbox/lightbox"
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
|
||||
export type PreviewImagesProps = {
|
||||
images: ImageItem[]
|
||||
images: GalleryImage[]
|
||||
hotelName: string
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ export type AvailabilityInput = {
|
||||
roomStayStartDate: string
|
||||
roomStayEndDate: string
|
||||
adults: number
|
||||
children?: number
|
||||
children?: string
|
||||
promotionCode?: string
|
||||
reservationProfileType?: string
|
||||
attachedProfileId?: string
|
||||
|
||||
@@ -18,6 +18,7 @@ export type FlexibilityOptionProps = {
|
||||
priceInformation?: Array<string>
|
||||
roomType: RoomConfiguration["roomType"]
|
||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
||||
features: RoomConfiguration["features"]
|
||||
handleSelectRate: (rate: Rate) => void
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import type { GalleryImages } from "@/types/hotel"
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
|
||||
export type ImageGalleryProps = { images: GalleryImages; title: string }
|
||||
export type ImageGalleryProps = { images: GalleryImage[]; title: string }
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { Rate } from "./selectRate"
|
||||
import type { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||
import type { RoomPackageData } from "./roomFilter"
|
||||
import type { Rate } from "./selectRate"
|
||||
|
||||
export interface RateSummaryProps {
|
||||
rateSummary: Rate
|
||||
isUserLoggedIn: boolean
|
||||
packages: RoomPackageData
|
||||
roomsAvailability: RoomsAvailability
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { getRoomPackagesSchema } from "@/server/routers/hotels/schemas/packages"
|
||||
|
||||
export enum RoomPackageCodeEnum {
|
||||
PET_ROOM = "PETR",
|
||||
ALLERGY_ROOM = "ALLG",
|
||||
ACCESSIBILITY_ROOM = "ACCE",
|
||||
}
|
||||
export interface RoomFilterProps {
|
||||
numberOfRooms: number
|
||||
onFilter: (filter: Record<string, boolean | undefined>) => void
|
||||
filterOptions: RoomPackageData
|
||||
}
|
||||
|
||||
export interface RoomPackageData
|
||||
extends z.output<typeof getRoomPackagesSchema> {}
|
||||
|
||||
export type RoomPackageCodes = RoomPackageData[number]["code"]
|
||||
@@ -1,10 +1,11 @@
|
||||
import { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomData } from "@/types/hotel"
|
||||
import { SafeUser } from "@/types/user"
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
import type { SafeUser } from "@/types/user"
|
||||
import type { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||
import type { RoomPackageData } from "./roomFilter"
|
||||
|
||||
export interface RoomSelectionProps {
|
||||
roomConfigurations: RoomsAvailability
|
||||
roomsAvailability: RoomsAvailability
|
||||
roomCategories: RoomData[]
|
||||
user: SafeUser
|
||||
packages: RoomPackageData
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface PaymentProps {
|
||||
hotelId: string
|
||||
otherPaymentOptions: string[]
|
||||
savedCreditCards: CreditCard[] | null
|
||||
mustBeGuaranteed: boolean
|
||||
}
|
||||
|
||||
export interface SectionPageProps {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Product, RoomConfiguration } from "@/server/routers/hotels/output"
|
||||
|
||||
interface Child {
|
||||
export interface Child {
|
||||
bed: string
|
||||
age: number
|
||||
}
|
||||
@@ -26,4 +26,5 @@ export interface Rate {
|
||||
priceName: string
|
||||
public: Product["productType"]["public"]
|
||||
member: Product["productType"]["member"]
|
||||
features: RoomConfiguration["features"]
|
||||
}
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
export interface ImageItem {
|
||||
url: string
|
||||
alt: string
|
||||
title: string
|
||||
}
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
|
||||
export interface LightboxProps {
|
||||
images: ImageItem[]
|
||||
images: GalleryImage[]
|
||||
dialogTitle: string /* Accessible title for dialog screen readers */
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export interface GalleryProps {
|
||||
images: ImageItem[]
|
||||
images: GalleryImage[]
|
||||
dialogTitle: string
|
||||
onClose: () => void
|
||||
onSelectImage: (image: ImageItem) => void
|
||||
onSelectImage: (image: GalleryImage) => void
|
||||
onImageClick: () => void
|
||||
selectedImage: ImageItem | null
|
||||
selectedImage: GalleryImage | null
|
||||
}
|
||||
|
||||
export interface FullViewProps {
|
||||
image: ImageItem
|
||||
image: GalleryImage
|
||||
onClose: () => void
|
||||
onNext: () => void
|
||||
onPrev: () => void
|
||||
|
||||
Reference in New Issue
Block a user