Merge branch 'master' into feature/tracking
This commit is contained in:
@@ -13,26 +13,23 @@ export type GuestsRoom = {
|
||||
child: Child[]
|
||||
}
|
||||
|
||||
export interface GuestsRoomsPickerProps {
|
||||
closePicker: () => void
|
||||
}
|
||||
|
||||
export type GuestsRoomPickerProps = {
|
||||
index: number
|
||||
}
|
||||
|
||||
export type AdultSelectorProps = {
|
||||
roomIndex: number
|
||||
}
|
||||
|
||||
export type ChildSelectorProps = {
|
||||
export type SelectorProps = {
|
||||
roomIndex: number
|
||||
currentAdults: number
|
||||
currentChildren: Child[]
|
||||
childrenInAdultsBed: number
|
||||
}
|
||||
|
||||
export type ChildInfoSelectorProps = {
|
||||
child: Child
|
||||
adults: number
|
||||
index: number
|
||||
roomIndex: number
|
||||
childrenInAdultsBed: number
|
||||
}
|
||||
|
||||
export interface CounterProps {
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
import { FormState, UseFormReturn } from "react-hook-form"
|
||||
|
||||
import type {
|
||||
BookingWidgetSchema,
|
||||
BookingWidgetType,
|
||||
} from "@/types/components/bookingWidget"
|
||||
import type { BookingWidgetType } from "@/types/components/bookingWidget"
|
||||
import type { Location, Locations } from "@/types/trpc/routers/hotel/locations"
|
||||
|
||||
export interface BookingWidgetFormProps {
|
||||
locations: Locations
|
||||
type?: BookingWidgetType
|
||||
setIsOpen: (isOpen: boolean) => void
|
||||
}
|
||||
|
||||
export interface BookingWidgetFormContentProps {
|
||||
|
||||
@@ -11,6 +11,7 @@ export interface FilterChipProps {
|
||||
value?: string
|
||||
selected?: boolean
|
||||
disabled?: boolean
|
||||
hasTooltip?: boolean
|
||||
}
|
||||
|
||||
export type FilterChipCheckboxProps = Omit<FilterChipProps, "type">
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import type { LinkProps } from "@/components/TempDesignSystem/Link/link"
|
||||
import type { LinkProps } from "next/link"
|
||||
|
||||
export interface HeaderLinkProps extends React.PropsWithChildren<LinkProps> {}
|
||||
import type { IconName } from "../icon"
|
||||
|
||||
export interface HeaderLinkProps extends React.PropsWithChildren {
|
||||
href: LinkProps["href"]
|
||||
iconName: IconName | null
|
||||
iconSize?: number
|
||||
}
|
||||
|
||||
@@ -4,4 +4,5 @@ import type { Header } from "@/types/trpc/routers/contentstack/header"
|
||||
export interface MobileMenuProps {
|
||||
languageUrls: LanguageSwitcherData
|
||||
topLink: Header["header"]["topLink"]
|
||||
isLoggedIn: boolean
|
||||
}
|
||||
|
||||
7
types/components/header/topLink.ts
Normal file
7
types/components/header/topLink.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { Header } from "@/types/trpc/routers/contentstack/header"
|
||||
|
||||
export interface TopLinkProps {
|
||||
isLoggedIn: boolean
|
||||
topLink: Header["header"]["topLink"]
|
||||
iconSize?: number
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
import { RoomPackageCodeEnum } from "../selectRate/roomFilter"
|
||||
import { Child } from "../selectRate/selectRate"
|
||||
|
||||
import { Packages } from "@/types/requests/packages"
|
||||
|
||||
interface Room {
|
||||
adults: number
|
||||
roomTypeCode: string
|
||||
@@ -16,8 +18,8 @@ export interface BookingData {
|
||||
}
|
||||
|
||||
type Price = {
|
||||
price?: string
|
||||
currency?: string
|
||||
price: number
|
||||
currency: string
|
||||
}
|
||||
|
||||
export type RoomsData = {
|
||||
@@ -27,4 +29,5 @@ export type RoomsData = {
|
||||
adults: number
|
||||
children?: Child[]
|
||||
cancellationText: string
|
||||
packages: Packages | null
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ export type HotelSidePeekProps = {
|
||||
hotel: Hotel
|
||||
activeSidePeek: SidePeekEnum
|
||||
close: () => void
|
||||
showCTA: boolean
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import type { HotelsAvailabilityPrices } from "@/server/routers/hotels/output"
|
||||
|
||||
export type HotelPriceListProps = {
|
||||
price: HotelsAvailabilityPrices
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Hotel } from "@/types/hotel"
|
||||
|
||||
export type HotelLogoProps = {
|
||||
hotelId: Hotel["operaId"]
|
||||
hotelType: Hotel["hotelType"]
|
||||
}
|
||||
@@ -13,15 +13,13 @@ import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
export interface HotelListingProps {
|
||||
hotels: HotelData[]
|
||||
activeHotelPin?: string | null
|
||||
onHotelCardHover?: (hotelName: string | null) => void
|
||||
setActiveHotelPin: (hotelName: string | null) => void
|
||||
}
|
||||
|
||||
export interface SelectHotelMapProps {
|
||||
apiKey: string
|
||||
coordinates: Coordinates
|
||||
hotelPins: HotelPin[]
|
||||
mapId: string
|
||||
isModal: boolean
|
||||
hotels: HotelData[]
|
||||
}
|
||||
|
||||
@@ -40,6 +38,7 @@ export type HotelPin = {
|
||||
}[]
|
||||
amenities: Filter[]
|
||||
ratings: number | null
|
||||
operaId: string
|
||||
}
|
||||
|
||||
export interface HotelListingMapContentProps {
|
||||
@@ -50,6 +49,12 @@ export interface HotelListingMapContentProps {
|
||||
|
||||
export interface HotelCardDialogProps {
|
||||
isOpen: boolean
|
||||
pin: HotelPin
|
||||
data: HotelPin
|
||||
handleClose: (event: { stopPropagation: () => void }) => void
|
||||
}
|
||||
|
||||
export interface HotelCardDialogListingProps {
|
||||
hotels: HotelData[]
|
||||
activeCard: string | null | undefined
|
||||
onActiveCardChange: (hotelName: string | null) => void
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export type PriceCardProps = {
|
||||
currency: string
|
||||
memberAmount?: string | undefined
|
||||
regularAmount?: string | undefined
|
||||
}
|
||||
@@ -9,6 +9,7 @@ export interface ReadMoreProps {
|
||||
label: string
|
||||
hotelId: string
|
||||
hotel: Hotel
|
||||
showCTA: boolean
|
||||
}
|
||||
|
||||
export interface ContactProps {
|
||||
|
||||
@@ -2,4 +2,5 @@ import type { HotelData } from "@/types/hotel"
|
||||
|
||||
export type HotelInfoCardProps = {
|
||||
hotelData: HotelData | null
|
||||
noAvailability: boolean
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
|
||||
export type ImageGalleryProps = { images: GalleryImage[]; title: string }
|
||||
export type ImageGalleryProps = { images?: GalleryImage[]; title: string }
|
||||
|
||||
@@ -5,6 +5,6 @@ import type { Rate } from "./selectRate"
|
||||
export interface RateSummaryProps {
|
||||
rateSummary: Rate
|
||||
isUserLoggedIn: boolean
|
||||
packages: RoomPackageData
|
||||
packages: RoomPackageData | undefined
|
||||
roomsAvailability: RoomsAvailability
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
packagePriceSchema,
|
||||
RateDefinition,
|
||||
RoomConfiguration,
|
||||
} from "@/server/routers/hotels/output"
|
||||
import { packagePriceSchema } from "@/server/routers/hotels/schemas/packages"
|
||||
|
||||
import { RoomPriceSchema } from "./flexibilityOption"
|
||||
import { Rate } from "./selectRate"
|
||||
@@ -18,7 +18,7 @@ export type RoomCardProps = {
|
||||
rateDefinitions: RateDefinition[]
|
||||
roomCategories: RoomData[]
|
||||
selectedPackages: RoomPackageCodes[]
|
||||
packages: RoomPackageData
|
||||
packages: RoomPackageData | undefined
|
||||
handleSelectRate: (rate: Rate) => void
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { z } from "zod"
|
||||
import {
|
||||
getRoomPackagesSchema,
|
||||
packagesSchema,
|
||||
} from "@/server/routers/hotels/schemas/packages"
|
||||
} from "@/server/routers/hotels/output"
|
||||
|
||||
export enum RoomPackageCodeEnum {
|
||||
PET_ROOM = "PETR",
|
||||
@@ -16,9 +16,7 @@ export interface RoomFilterProps {
|
||||
filterOptions: RoomPackageData
|
||||
}
|
||||
|
||||
export interface RoomPackageData
|
||||
extends z.output<typeof getRoomPackagesSchema> {}
|
||||
|
||||
export type RoomPackageCodes = RoomPackageData[number]["code"]
|
||||
|
||||
export type RoomPackage = z.output<typeof packagesSchema>
|
||||
export interface RoomPackageData extends Array<RoomPackage> {}
|
||||
|
||||
export type RoomPackageCodes = RoomPackage["code"]
|
||||
|
||||
@@ -2,11 +2,21 @@ import type { RoomData } from "@/types/hotel"
|
||||
import type { SafeUser } from "@/types/user"
|
||||
import type { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||
import type { RoomPackageCodes, RoomPackageData } from "./roomFilter"
|
||||
import type { Rate } from "./selectRate"
|
||||
|
||||
export interface RoomSelectionProps {
|
||||
roomsAvailability: RoomsAvailability
|
||||
roomCategories: RoomData[]
|
||||
user: SafeUser
|
||||
packages: RoomPackageData
|
||||
packages: RoomPackageData | undefined
|
||||
selectedPackages: RoomPackageCodes[]
|
||||
setRateSummary: (rateSummary: Rate) => void
|
||||
rateSummary: Rate | null
|
||||
}
|
||||
|
||||
export interface SelectRateProps {
|
||||
roomsAvailability: RoomsAvailability
|
||||
roomCategories: RoomData[]
|
||||
user: SafeUser
|
||||
packages: RoomPackageData
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export interface BreakfastSelectionProps extends SectionProps {
|
||||
export interface DetailsProps extends SectionProps {}
|
||||
|
||||
export interface PaymentProps {
|
||||
roomPrice: string
|
||||
roomPrice: number
|
||||
otherPaymentOptions: string[]
|
||||
savedCreditCards: CreditCard[] | null
|
||||
mustBeGuaranteed: boolean
|
||||
|
||||
@@ -29,6 +29,6 @@ export interface Rate {
|
||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
||||
priceName: string
|
||||
public: Product["productType"]["public"]
|
||||
member: Product["productType"]["member"]
|
||||
member?: Product["productType"]["member"]
|
||||
features: RoomConfiguration["features"]
|
||||
}
|
||||
|
||||
3
types/components/hotelReservation/tripAdvisorProps.ts
Normal file
3
types/components/hotelReservation/tripAdvisorProps.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export type TripAdvisorProps = {
|
||||
rating: number
|
||||
}
|
||||
@@ -82,6 +82,7 @@ export enum IconName {
|
||||
Phone = "Phone",
|
||||
Plus = "Plus",
|
||||
PlusCircle = "PlusCircle",
|
||||
PriceTag = "PriceTag",
|
||||
Restaurant = "Restaurant",
|
||||
RoomService = "RoomService",
|
||||
Sauna = "Sauna",
|
||||
|
||||
9
types/components/imageGallery.ts
Normal file
9
types/components/imageGallery.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
|
||||
export type ImageGalleryProps = {
|
||||
images?: GalleryImage[]
|
||||
title: string
|
||||
fill?: boolean
|
||||
width?: number
|
||||
height?: number
|
||||
}
|
||||
@@ -3,12 +3,12 @@ import type { GalleryImage } from "@/types/hotel"
|
||||
export interface LightboxProps {
|
||||
images: GalleryImage[]
|
||||
dialogTitle: string /* Accessible title for dialog screen readers */
|
||||
children: React.ReactNode
|
||||
onClose: () => void
|
||||
isOpen: boolean
|
||||
}
|
||||
|
||||
export interface GalleryProps {
|
||||
images: GalleryImage[]
|
||||
dialogTitle: string
|
||||
onClose: () => void
|
||||
onSelectImage: (image: GalleryImage) => void
|
||||
onImageClick: () => void
|
||||
|
||||
@@ -7,6 +7,6 @@ export type HeaderProps = {
|
||||
}
|
||||
preamble?: string | null
|
||||
textTransform?: HeadingProps["textTransform"]
|
||||
title: string | null
|
||||
title?: string | null
|
||||
topTitle?: boolean
|
||||
}
|
||||
|
||||
5
types/enums/hotelType.ts
Normal file
5
types/enums/hotelType.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export enum HotelTypeEnum {
|
||||
Signature = "signature",
|
||||
ScandicGo = "scandicgo",
|
||||
Regular = "regular",
|
||||
}
|
||||
7
types/enums/signatureHotel.ts
Normal file
7
types/enums/signatureHotel.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export enum SignatureHotelEnum {
|
||||
DowntownCamper = "879",
|
||||
GrandHotelOslo = "340",
|
||||
Haymarket = "890",
|
||||
HotelNorge = "785",
|
||||
Marski = "605",
|
||||
}
|
||||
@@ -1,6 +1,15 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { getBreakfastPackageInputSchema } from "@/server/routers/hotels/input"
|
||||
import {
|
||||
getBreakfastPackageInputSchema,
|
||||
getRoomPackagesInputSchema,
|
||||
} from "@/server/routers/hotels/input"
|
||||
import { getRoomPackagesSchema } from "@/server/routers/hotels/output"
|
||||
|
||||
export interface BreackfastPackagesInput
|
||||
extends z.input<typeof getBreakfastPackageInputSchema> {}
|
||||
|
||||
export interface PackagesInput
|
||||
extends z.input<typeof getRoomPackagesInputSchema> {}
|
||||
|
||||
export interface Packages extends z.output<typeof getRoomPackagesSchema> {}
|
||||
|
||||
Reference in New Issue
Block a user