feat: new booking confirmation page

This commit is contained in:
Simon Emanuelsson
2024-11-28 14:22:31 +01:00
parent 329d762917
commit ed1574838a
66 changed files with 1127 additions and 825 deletions

View File

@@ -0,0 +1,5 @@
export interface PromoProps {
buttonText: string
text: string
title: string
}

View File

@@ -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"]
}

View File

@@ -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

View File

@@ -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> {}

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
}