Merged in feat/SW-1813 (pull request #1516)

Feat/SW-1813

* feat(SW-1652): handle linkedReservations fetching

* feat: add linkedReservation retry functionality

* chore: align naming

* feat(SW-1813): Add booking confirmation PriceDetailsModal


Approved-by: Simon.Emanuelsson
This commit is contained in:
Arvid Norlin
2025-03-14 13:49:22 +00:00
parent 66682be4d2
commit 540402b969
21 changed files with 414 additions and 65 deletions
@@ -1,5 +1,5 @@
import type { BreakfastPackage } from "@/types/components/hotelReservation/breakfast"
import type { BedTypeSchema } from "@/types/components/hotelReservation/enterDetails/bedType"
import type { BreakfastPackage } from "@/types/components/hotelReservation/enterDetails/breakfast"
import type { DetailsSchema } from "@/types/components/hotelReservation/enterDetails/details"
import type { StepEnum } from "@/types/enums/step"
import type { RoomState } from "@/types/stores/enter-details"
@@ -2,6 +2,10 @@ import type { Room } from "../stores/booking-confirmation"
export interface BookingConfirmationProviderProps
extends React.PropsWithChildren {
bookingCode: string | null
currencyCode: string
fromDate: Date
rooms: (Room | null)[]
toDate: Date
vat: number
}
@@ -1,6 +1,6 @@
import type { Room } from "@/types/providers/details/room"
import type { SafeUser } from "@/types/user"
import type { BreakfastPackages } from "../components/hotelReservation/enterDetails/breakfast"
import type { BreakfastPackages } from "../components/hotelReservation/breakfast"
import type { SelectRateSearchParams } from "../components/hotelReservation/selectRate/selectRate"
export interface DetailsProviderProps extends React.PropsWithChildren {
@@ -1,30 +1,48 @@
import type { ChildBedTypeEnum } from "@/constants/booking"
import type {
BookingConfirmation,
PackageSchema,
} from "../trpc/routers/booking/confirmation"
export interface ChildBedPreference {
quantity: number
bedType: ChildBedTypeEnum
}
export interface Room {
adults: number
bedDescription: string
breakfast?: PackageSchema
breakfastIncluded: boolean
children?: number
childBedPreferences: ChildBedPreference[]
confirmationNumber: string
fromDate: Date
name: string
rateDefinition: BookingConfirmation["booking"]["rateDefinition"]
roomFeatures?: PackageSchema[] | null
roomPrice: number
selectedBreakfast?: PackageSchema
toDate: Date
totalPrice: number
totalPriceExVat: number
vatAmount: number
}
export interface InitialState {
bookingCode: string | null
fromDate: Date
rooms: (Room | null)[]
toDate: Date
currencyCode: string
vat: number
}
export interface BookingConfirmationState {
bookingCode: string | null
rooms: (Room | null)[]
currencyCode: string
vat: number
fromDate: Date
toDate: Date
actions: { setRoom: (room: Room, idx: number) => void }
}
@@ -1,11 +1,11 @@
import type {
BreakfastPackage,
BreakfastPackages,
} from "@/types/components/hotelReservation/breakfast"
import type {
BedTypeSchema,
BedTypeSelection,
} from "@/types/components/hotelReservation/enterDetails/bedType"
import type {
BreakfastPackage,
BreakfastPackages,
} from "@/types/components/hotelReservation/enterDetails/breakfast"
import type {
DetailsSchema,
MultiroomDetailsSchema,