Merge branch 'master' into feature/tracking

This commit is contained in:
Linus Flood
2024-12-03 07:48:59 +01:00
159 changed files with 2609 additions and 1227 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { CountryCode } from "libphonenumber-js/min"
import type { RegisterOptions } from "react-hook-form"
export type LowerCaseCountryCode = Lowercase<CountryCode>
export interface PhoneProps {
ariaLabel?: string
className?: string
disabled?: boolean
label: string
name?: string
placeholder?: string
readOnly?: boolean
registerOptions?: RegisterOptions
}
@@ -8,3 +8,8 @@ export type AboutTheHotelSidePeekProps = {
ecoLabels: Hotel["hotelFacts"]["ecoLabels"]
descriptions: Hotel["hotelContent"]["texts"]
}
export type ContactInformationProps = Omit<
AboutTheHotelSidePeekProps,
"descriptions"
>
@@ -0,0 +1,5 @@
import type { Hotel } from "@/types/hotel"
export type AccessibilityAmenityProps = {
accessibility: Hotel["hotelFacts"]["hotelInformation"]["accessibility"]
}
@@ -0,0 +1,12 @@
import type { Hotel } from "@/types/hotel"
export type AmenitiesSidePeekProps = {
amenitiesList: Hotel["detailedFacilities"]
parking: Hotel["parking"]
checkInInformation: Hotel["hotelFacts"]["checkin"]
accessibility: Hotel["hotelFacts"]["hotelInformation"]["accessibility"]
}
export type FilteredAmenitiesProps = {
filteredAmenities: Hotel["detailedFacilities"]
}
@@ -0,0 +1,5 @@
import type { Hotel } from "@/types/hotel"
export type CheckInAmenityProps = {
checkInInformation: Hotel["hotelFacts"]["checkin"]
}
@@ -1,6 +0,0 @@
import type { AboutTheHotelSidePeekProps } from "./aboutTheHotel"
export type ContactInformationProps = Omit<
AboutTheHotelSidePeekProps,
"descriptions"
>
@@ -0,0 +1,25 @@
import type { Hotel } from "@/types/hotel"
export enum Periods {
day = "Day",
night = "Night",
allDay = "AllDay",
}
export type ParkingAmenityProps = {
parking: Hotel["parking"]
}
export type ParkingListProps = {
numberOfChargingSpaces: Hotel["parking"][number]["numberOfChargingSpaces"]
canMakeReservation: Hotel["parking"][number]["canMakeReservation"]
numberOfParkingSpots: Hotel["parking"][number]["numberOfParkingSpots"]
distanceToHotel: Hotel["parking"][number]["distanceToHotel"]
address: Hotel["parking"][number]["address"]
}
export type ParkingPricesProps = {
data: Hotel["parking"][number]["pricing"]["localCurrency"]["ordinary"]
currency: Hotel["parking"][number]["pricing"]["localCurrency"]["currency"]
freeParking: Hotel["parking"][number]["pricing"]["freeParking"]
}
@@ -0,0 +1,5 @@
export interface PromoProps {
buttonText: string
text: string
title: string
}
@@ -0,0 +1,11 @@
import { RouterOutput } from "@/lib/trpc/client"
export interface RoomProps {
booking: RouterOutput["booking"]["confirmation"]["booking"]
img: NonNullable<
RouterOutput["booking"]["confirmation"]["hotel"]["included"]
>[number]["images"][number]
roomName: NonNullable<
RouterOutput["booking"]["confirmation"]["hotel"]["included"]
>[number]["name"]
}
@@ -1,5 +1,4 @@
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Packages } from "@/types/requests/packages"
import type { RoomAvailability } from "@/types/trpc/routers/hotel/availability"
export interface ClientSummaryProps
@@ -18,3 +18,7 @@ export type HotelData = {
hotelData: Hotel
price: ProductType
}
export interface NullableHotelData extends Omit<HotelData, "hotelData"> {
hotelData: HotelData["hotelData"] | null
}
@@ -56,7 +56,7 @@ export interface HotelCardDialogProps {
}
export interface HotelCardDialogListingProps {
hotels: HotelData[]
hotels: HotelData[] | null
activeCard: string | null | undefined
onActiveCardChange: (hotelName: string | null) => void
}
@@ -1,4 +1,4 @@
import { Hotel, ParkingData } from "@/types/hotel"
import { CheckInData, Hotel, ParkingData } from "@/types/hotel"
export enum AvailabilityEnum {
Available = "Available",
@@ -17,5 +17,21 @@ export interface ContactProps {
}
export interface ParkingProps {
parking: ParkingData
parking: ParkingData[]
}
export interface AccessibilityProps {
accessibilityElevatorPitchText: string
}
export interface RestaurantProps {
restaurantsContentDescriptionMedium: string
}
export interface CheckInCheckOutProps {
checkin: CheckInData
}
export interface MeetingsAndConferencesProps {
meetingDescription: string
}
@@ -0,0 +1,6 @@
import { sidePanelVariants } from "@/components/HotelReservation/SidePanel/variants"
import type { VariantProps } from "class-variance-authority"
export interface SidePanelProps
extends VariantProps<typeof sidePanelVariants> {}
+4 -25
View File
@@ -1,10 +1,6 @@
import { RoomPackageCodeEnum } from "./selectRate/roomFilter"
import type { Packages } from "@/types/requests/packages"
import type { DetailsState, Price } from "@/types/stores/enter-details"
import type { RoomAvailability } from "@/types/trpc/routers/hotel/availability"
import type { BedTypeSchema } from "./enterDetails/bedType"
import type { BreakfastPackage } from "./enterDetails/breakfast"
import type { Child } from "./selectRate/selectRate"
export type RoomsData = Pick<DetailsState, "roomPrice"> &
@@ -15,25 +11,8 @@ export type RoomsData = Pick<DetailsState, "roomPrice"> &
packages: Packages | null
}
interface SharedSummaryProps {
fromDate: string
toDate: string
}
export interface SummaryProps extends SharedSummaryProps {
bedType: BedTypeSchema | undefined
breakfast: BreakfastPackage | false | undefined
showMemberPrice: boolean
room: RoomsData
toggleSummaryOpen?: () => void
totalPrice: Price
}
export interface SummaryPageProps extends SharedSummaryProps {
adults: number
hotelId: string
kids: Child[] | undefined
packageCodes: RoomPackageCodeEnum[] | undefined
rateCode: string
roomTypeCode: string
export interface SummaryProps
extends Pick<RoomAvailability, "cancellationText" | "rateDetails">,
Pick<RoomAvailability["selectedRoom"], "roomType"> {
isMember: boolean
}
+1
View File
@@ -18,4 +18,5 @@ export interface TooltipProps<P extends TooltipPosition = TooltipPosition> {
text?: string
position: P
arrow: ValidArrow<P>
isTouchable?: boolean
}