feat(SW-2116): RefId instead of confirmationNumber

This commit is contained in:
Arvid Norlin
2025-04-25 13:44:49 +02:00
committed by Michael Zetterberg
parent 7eeb0bbcac
commit 74d37dad93
61 changed files with 1032 additions and 843 deletions

View File

@@ -1,12 +1,8 @@
import type { EventAttributes } from "ics"
import type { RouterOutput } from "@/lib/trpc/client"
export interface AddToCalendarProps {
checkInDate: NonNullable<
RouterOutput["booking"]["get"]
>["booking"]["checkInDate"]
checkInDate: Date
event: EventAttributes
hotelName: NonNullable<RouterOutput["booking"]["get"]>["hotel"]["name"]
hotelName: string
renderButton: (onPress: () => Promise<void>) => React.ReactNode
}

View File

@@ -1,3 +1,3 @@
export interface ManageBookingProps {
bookingUrl: string
refId: string
}

View File

@@ -1,23 +1,19 @@
import type { Room } from "@/types/hotel"
import type {
BookingConfirmation,
BookingConfirmationSchema,
BookingSchema,
} from "@/types/trpc/routers/booking/confirmation"
export interface BookingConfirmationProps {
confirmationNumber: string
}
export interface BookingConfirmationRoom extends Room {
bedType: Room["roomTypes"][number]
}
export interface ConfirmationProps
extends Pick<BookingConfirmation, "booking" | "hotel"> {
extends Pick<BookingConfirmation, "booking" | "hotelData"> {
room: BookingConfirmationRoom
refId: string
}
export interface BookingConfirmationAlertsProps {
booking: BookingConfirmationSchema
booking: BookingSchema
}

View File

@@ -1,9 +1,7 @@
import type { MutableRefObject } from "react"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface BookingConfirmationHeaderProps
extends Pick<BookingConfirmation, "booking" | "hotel"> {
mainRef: MutableRefObject<HTMLElement | null>
export interface BookingConfirmationHeaderProps {
booking: BookingConfirmation["booking"]
hotel: BookingConfirmation["hotelData"]["hotel"]
refId: string
}

View File

@@ -1,5 +1,5 @@
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface BookingConfirmationHotelDetailsProps {
hotel: BookingConfirmation["hotel"]
hotel: BookingConfirmation["hotelData"]["hotel"]
}

View File

@@ -1,11 +1,5 @@
import type { z } from "zod"
import type { Room } from "@/types/hotel"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
import type { linkedReservationSchema } from "@/server/routers/booking/output"
export interface LinkedReservationSchema
extends z.output<typeof linkedReservationSchema> {}
export interface BookingConfirmationRoomsProps
extends Pick<BookingConfirmation, "booking"> {
@@ -14,5 +8,4 @@ export interface BookingConfirmationRoomsProps
}
checkInTime: string
checkOutTime: string
linkedReservations: LinkedReservationSchema[]
}

View File

@@ -1,7 +1,7 @@
export interface LinkedReservationProps {
checkInTime: string
checkOutTime: string
confirmationNumber: string
refId: string
roomIndex: number
}

View File

@@ -23,6 +23,7 @@ export interface AncillariesProps extends Pick<BookingConfirmation, "booking"> {
export interface AddedAncillariesProps {
ancillaries: Ancillary["ancillaryContent"][number][] | null
booking: BookingConfirmation["booking"]
refId: string
}
export interface AncillaryProps {

View File

@@ -30,6 +30,7 @@ export type Room = Pick<
| "linkedReservations"
| "multiRoom"
| "rateDefinition"
| "refId"
| "reservationStatus"
| "roomPoints"
| "roomTypeCode"

View File

@@ -2,20 +2,20 @@ import type { z } from "zod"
import type { HotelData, Room } from "@/types/hotel"
import type {
bookingConfirmationSchema,
bookingSchema,
packageSchema,
} from "@/server/routers/booking/output"
export interface BookingConfirmationSchema
extends z.output<typeof bookingConfirmationSchema> {}
export interface BookingSchema extends z.output<typeof bookingSchema> {}
export interface PackageSchema extends z.output<typeof packageSchema> {}
export interface BookingConfirmation extends HotelData {
booking: BookingConfirmationSchema
room:
| (Room & {
bedType: Room["roomTypes"][number]
})
| null
export interface BookingConfirmationRoom extends Room {
bedType: Room["roomTypes"][number]
}
export interface BookingConfirmation {
booking: BookingSchema
hotelData: HotelData
room: BookingConfirmationRoom
}