Merged in feat/SW-1652-confirmation-page (pull request #1483)
Feat/SW-1652 confirmation page * feat(SW-1652): handle linkedReservations fetching * fix: add missing translations * feat: add linkedReservation retry functionality * chore: align naming Approved-by: Simon.Emanuelsson
This commit is contained in:
+5
-3
@@ -8,10 +8,12 @@ export interface BookingConfirmationProps {
|
||||
confirmationNumber: string
|
||||
}
|
||||
|
||||
export interface BookingConfirmationRoom extends Room {
|
||||
bedType: Room["roomTypes"][number]
|
||||
}
|
||||
|
||||
export interface ConfirmationProps extends BookingConfirmation {
|
||||
room: Room & {
|
||||
bedType: Room["roomTypes"][number]
|
||||
}
|
||||
room: BookingConfirmationRoom
|
||||
}
|
||||
|
||||
export interface BookingConfirmationAlertsProps {
|
||||
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
|
||||
|
||||
export interface BookingConfirmationPaymentDetailsProps
|
||||
extends Pick<BookingConfirmation, "booking"> {
|
||||
linkedReservations: (BookingConfirmation | null)[]
|
||||
}
|
||||
@@ -1,22 +1,3 @@
|
||||
import type { Room } from "@/types/hotel"
|
||||
import type {
|
||||
BookingConfirmation,
|
||||
BookingConfirmationSchema,
|
||||
} from "@/types/trpc/routers/booking/confirmation"
|
||||
|
||||
export interface BookingConfirmationReceiptProps extends BookingConfirmation {}
|
||||
|
||||
interface ReceiptRoom extends Room {
|
||||
bedType: Room["roomTypes"][number]
|
||||
}
|
||||
export interface BookingConfirmationReceiptRoomsProps {
|
||||
booking: BookingConfirmationSchema
|
||||
room: ReceiptRoom
|
||||
linkedReservations: (BookingConfirmation | null)[]
|
||||
}
|
||||
|
||||
export interface BookingConfirmationReceiptRoomProps {
|
||||
booking: BookingConfirmationSchema
|
||||
room: ReceiptRoom
|
||||
roomNumber: number | null
|
||||
roomIndex: number
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
export interface LinkedReservationProps {
|
||||
confirmationNumber: string
|
||||
roomIndex: number
|
||||
}
|
||||
|
||||
export interface RetryProps {
|
||||
handleRefetch: () => void
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import type { createBookingConfirmationStore } from "@/stores/booking-confirmation"
|
||||
|
||||
export type BookingConfirmationStore = ReturnType<
|
||||
typeof createBookingConfirmationStore
|
||||
>
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { Room } from "../stores/booking-confirmation"
|
||||
|
||||
export interface BookingConfirmationProviderProps
|
||||
extends React.PropsWithChildren {
|
||||
currencyCode: string
|
||||
rooms: (Room | null)[]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import type {
|
||||
BookingConfirmation,
|
||||
PackageSchema,
|
||||
} from "../trpc/routers/booking/confirmation"
|
||||
|
||||
export interface Room {
|
||||
adults: number
|
||||
bedDescription: string
|
||||
breakfastIncluded: boolean
|
||||
children?: number
|
||||
confirmationNumber: string
|
||||
fromDate: Date
|
||||
name: string
|
||||
rateDefinition: BookingConfirmation["booking"]["rateDefinition"]
|
||||
roomPrice: number
|
||||
selectedBreakfast?: PackageSchema
|
||||
toDate: Date
|
||||
totalPrice: number
|
||||
}
|
||||
|
||||
export interface InitialState {
|
||||
rooms: (Room | null)[]
|
||||
currencyCode: string
|
||||
}
|
||||
|
||||
export interface BookingConfirmationState {
|
||||
rooms: (Room | null)[]
|
||||
currencyCode: string
|
||||
actions: { setRoom: (room: Room, idx: number) => void }
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
import type { z } from "zod"
|
||||
|
||||
import type { Hotel, Room } from "@/types/hotel"
|
||||
import type { bookingConfirmationSchema } from "@/server/routers/booking/output"
|
||||
import type {
|
||||
bookingConfirmationSchema,
|
||||
packageSchema,
|
||||
} from "@/server/routers/booking/output"
|
||||
|
||||
export interface BookingConfirmationSchema
|
||||
extends z.output<typeof bookingConfirmationSchema> {}
|
||||
|
||||
export interface PackageSchema extends z.output<typeof packageSchema> {}
|
||||
|
||||
export interface BookingConfirmation {
|
||||
booking: BookingConfirmationSchema
|
||||
hotel: Hotel
|
||||
|
||||
Reference in New Issue
Block a user