Merge branch 'develop' into feature/tracking

This commit is contained in:
Linus Flood
2024-10-17 11:09:33 +02:00
175 changed files with 4058 additions and 1119 deletions
+6
View File
@@ -0,0 +1,6 @@
import type { Accordion } from "@/server/routers/contentstack/schemas/blocks/accordion"
export type AccordionProps = {
accordion: Accordion["accordion"]["accordions"]
title?: string
}
+5
View File
@@ -0,0 +1,5 @@
export enum BedTypeEnum {
IN_ADULTS_BED = 0,
IN_CRIB = 1,
IN_EXTRA_BED = 2,
}
@@ -0,0 +1,44 @@
export type ChildBed = {
label: string
value: number
}
export type Child = {
age: number
bed: number
}
export type GuestsRoom = {
adults: number
children: Child[]
}
export interface GuestsRoomsPickerProps {
closePicker: () => void
}
export type GuestsRoomPickerProps = {
index: number
}
export type AdultSelectorProps = {
roomIndex: number
}
export type ChildSelectorProps = {
roomIndex: number
}
export type ChildInfoSelectorProps = {
child: Child
index: number
roomIndex: number
}
export interface CounterProps {
count: number
handleOnIncrease: () => void
handleOnDecrease: () => void
disableIncrease: boolean
disableDecrease: boolean
}
+7
View File
@@ -0,0 +1,7 @@
import { RegisterOptions } from "react-hook-form"
export interface CheckboxProps
extends React.InputHTMLAttributes<HTMLInputElement> {
name: string
registerOptions?: RegisterOptions
}
+1 -1
View File
@@ -11,7 +11,7 @@ type LangWithoutEn = Lang.da | Lang.de | Lang.fi | Lang.no | Lang.sv
export interface DatePickerProps {
close: () => void
handleOnSelect: (selected: DateRange) => void
handleOnSelect: (selected: Date) => void
locales: Record<LangWithoutEn, Locale>
selectedDate: DateRange
}
+1 -1
View File
@@ -4,7 +4,7 @@ import { detailsSchema } from "@/components/HotelReservation/EnterDetails/Detail
import type { SafeUser } from "@/types/user"
export interface DetailsSchema extends z.output<typeof detailsSchema> {}
export type DetailsSchema = z.output<typeof detailsSchema>
export interface DetailsProps {
user: SafeUser
@@ -0,0 +1,9 @@
import { Hotel } from "@/types/hotel"
export enum SidePeekEnum {
hotelDetails = "hotel-detail-side-peek",
}
export type SidePeekProps = {
hotel: Hotel
}
@@ -7,3 +7,7 @@ export interface RoomCardProps {
subtitle: string
badgeTextTransKey: string | null
}
export type RoomsProps = {
rooms: RoomData[]
}
@@ -2,6 +2,8 @@ import { z } from "zod"
import { Product, productTypePriceSchema } from "@/server/routers/hotels/output"
import { Rate } from "./selectRate"
type ProductPrice = z.output<typeof productTypePriceSchema>
export type FlexibilityOptionProps = {
@@ -10,6 +12,8 @@ export type FlexibilityOptionProps = {
value: string
paymentTerm: string
priceInformation?: Array<string>
roomType: string
handleSelectRate: (rate: Rate) => void
}
export interface PriceListProps {
@@ -0,0 +1,6 @@
import { Rate } from "./selectRate"
export interface RateSummaryProps {
rateSummary: Rate
isUserLoggedIn: boolean
}
@@ -3,10 +3,13 @@ import {
RoomConfiguration,
} from "@/server/routers/hotels/output"
import { Rate } from "./selectRate"
import { RoomData } from "@/types/hotel"
export type RoomCardProps = {
roomConfiguration: RoomConfiguration
rateDefinitions: RateDefinition[]
roomCategories: RoomData[]
handleSelectRate: (rate: Rate) => void
}
@@ -1,8 +1,10 @@
import { RoomsAvailability } from "@/server/routers/hotels/output"
import { RoomData } from "@/types/hotel"
import { SafeUser } from "@/types/user"
export interface RoomSelectionProps {
roomConfigurations: RoomsAvailability
roomCategories: RoomData[]
user: SafeUser
}
@@ -1,5 +1,14 @@
import { Product } from "@/server/routers/hotels/output"
export interface SelectRateSearchParams {
fromDate: string
toDate: string
hotel: string
}
export interface Rate {
roomType: string
priceName: string
public: Product["productType"]["public"]
member: Product["productType"]["member"]
}
+2 -2
View File
@@ -1,11 +1,11 @@
import { HeadingProps } from "@/components/TempDesignSystem/Text/Title/title"
import type { HeadingProps } from "@/components/TempDesignSystem/Text/Title/title"
export type HeaderProps = {
link?: {
href: string
text: string
}
preamble: string | null
preamble?: string | null
textTransform?: HeadingProps["textTransform"]
title: string | null
topTitle?: boolean
+1
View File
@@ -1,5 +1,6 @@
export namespace BlocksEnums {
export const enum block {
Accordion = "Accordion",
CardsGrid = "CardsGrid",
Content = "Content",
DynamicContent = "DynamicContent",
+1
View File
@@ -7,6 +7,7 @@ export namespace CardsGridEnum {
}
export enum CardsGridLayoutEnum {
ONE_COLUMN = "oneColumnGrid",
TWO_COLUMNS = "twoColumnGrid",
THREE_COLUMNS = "threeColumnGrid",
TWO_PLUS_ONE = "twoPlusOne", // Not sure if this is used?
+1
View File
@@ -1,6 +1,7 @@
export namespace ContentPageEnum {
export namespace ContentStack {
export const enum blocks {
Accordion = "ContentPageBlocksAccordion",
CardsGrid = "ContentPageBlocksCardsGrid",
Content = "ContentPageBlocksContent",
DynamicContent = "ContentPageBlocksDynamicContent",
+1
View File
@@ -1,6 +1,7 @@
export namespace HotelPageEnum {
export namespace ContentStack {
export const enum blocks {
Faq = "HotelPageFaq",
ActivitiesCard = "HotelPageContentUpcomingActivitiesCard",
}
}
@@ -4,6 +4,7 @@ import {
blocksSchema,
contentPageRefsSchema,
contentPageSchema,
contentPageSchemaBlocks,
sidebarSchema,
} from "@/server/routers/contentstack/contentPage/output"
+8 -3
View File
@@ -2,14 +2,19 @@ import { z } from "zod"
import {
contentBlock,
hotelPageRefsSchema,
hotelPageSchema,
} from "@/server/routers/contentstack/hotelPage/output"
import { activitiesCard } from "@/server/routers/contentstack/schemas/blocks/activitiesCard"
import { activitiesCardSchema } from "@/server/routers/contentstack/schemas/blocks/activitiesCard"
// Will be extended once we introduce more functionality to our entries.
export interface GetHotelPageData extends z.input<typeof hotelPageSchema> {}
export interface HotelPage extends z.output<typeof hotelPageSchema> {}
export interface ActivitiesCard extends z.output<typeof activitiesCard> {}
export interface ActivitiesCard extends z.output<typeof activitiesCardSchema> {}
export type ActivityCard = ActivitiesCard["upcoming_activities_card"]
export interface ContentBlock extends z.output<typeof contentBlock> {}
export interface GetHotelPageRefsSchema
extends z.input<typeof hotelPageRefsSchema> {}
export interface HotelPageRefs extends z.output<typeof hotelPageRefsSchema> {}