Merged in revert-pr-1925 (pull request #1927)

Revert "Feat/sw 2323 find booking (pull request #1925)"

Approved-by: Anton Gunnarsson
This commit is contained in:
Linus Flood
2025-05-02 13:05:42 +00:00
parent 87efb72ff2
commit 6979ac0c3b
69 changed files with 883 additions and 1508 deletions
@@ -1,8 +1,12 @@
import type { EventAttributes } from "ics"
import type { RouterOutput } from "@/lib/trpc/client"
export interface AddToCalendarProps {
checkInDate: Date
checkInDate: NonNullable<
RouterOutput["booking"]["get"]
>["booking"]["checkInDate"]
event: EventAttributes
hotelName: string
hotelName: NonNullable<RouterOutput["booking"]["get"]>["hotel"]["name"]
renderButton: (onPress: () => Promise<void>) => React.ReactNode
}
@@ -1,3 +1,3 @@
export interface ManageBookingProps {
refId: string
bookingUrl: string
}
@@ -1,19 +1,23 @@
import type { Room } from "@/types/hotel"
import type {
BookingConfirmation,
BookingSchema,
BookingConfirmationSchema,
} 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" | "hotelData"> {
extends Pick<BookingConfirmation, "booking" | "hotel"> {
room: BookingConfirmationRoom
refId: string
}
export interface BookingConfirmationAlertsProps {
booking: BookingSchema
booking: BookingConfirmationSchema
}
@@ -1,7 +1,9 @@
import type { MutableRefObject } from "react"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface BookingConfirmationHeaderProps {
booking: BookingConfirmation["booking"]
hotel: BookingConfirmation["hotelData"]["hotel"]
export interface BookingConfirmationHeaderProps
extends Pick<BookingConfirmation, "booking" | "hotel"> {
mainRef: MutableRefObject<HTMLElement | null>
refId: string
}
@@ -1,5 +1,5 @@
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface BookingConfirmationHotelDetailsProps {
hotel: BookingConfirmation["hotelData"]["hotel"]
hotel: BookingConfirmation["hotel"]
}
@@ -1,4 +1,8 @@
export interface PromosProps {
hotelId: string
refId: string
}
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface PromosProps
extends Pick<
BookingConfirmation["booking"],
"confirmationNumber" | "hotelId"
>,
Pick<BookingConfirmation["booking"]["guest"], "lastName"> {}
@@ -1,5 +1,11 @@
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"> {
@@ -8,4 +14,5 @@ export interface BookingConfirmationRoomsProps
}
checkInTime: string
checkOutTime: string
linkedReservations: LinkedReservationSchema[]
}
@@ -1,7 +1,7 @@
export interface LinkedReservationProps {
checkInTime: string
checkOutTime: string
refId: string
confirmationNumber: string
roomIndex: number
}
@@ -1,14 +1,9 @@
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface RoomProps {
checkInDate: BookingConfirmation["booking"]["checkInDate"]
checkOutDate: BookingConfirmation["booking"]["checkOutDate"]
booking: BookingConfirmation["booking"]
checkInTime: string
checkOutTime: string
confirmationNumber: string
guest: BookingConfirmation["booking"]["guest"]
guaranteeInfo: BookingConfirmation["booking"]["guaranteeInfo"]
img: NonNullable<BookingConfirmation["room"]>["images"][number]
rateDefinition: BookingConfirmation["booking"]["rateDefinition"]
roomName: NonNullable<BookingConfirmation["room"]>["name"]
}
@@ -23,7 +23,6 @@ export interface AncillariesProps extends Pick<BookingConfirmation, "booking"> {
export interface AddedAncillariesProps {
ancillaries: Ancillary["ancillaryContent"][number][] | null
booking: BookingConfirmation["booking"]
refId: string
}
export interface AncillaryProps {
-1
View File
@@ -30,7 +30,6 @@ export type Room = Pick<
| "linkedReservations"
| "multiRoom"
| "rateDefinition"
| "refId"
| "reservationStatus"
| "roomPoints"
| "roomTypeCode"
@@ -2,20 +2,20 @@ import type { z } from "zod"
import type { HotelData, Room } from "@/types/hotel"
import type {
bookingSchema,
bookingConfirmationSchema,
packageSchema,
} from "@/server/routers/booking/output"
export interface BookingSchema extends z.output<typeof bookingSchema> {}
export interface BookingConfirmationSchema
extends z.output<typeof bookingConfirmationSchema> {}
export interface PackageSchema extends z.output<typeof packageSchema> {}
export interface BookingConfirmationRoom extends Room {
bedType: Room["roomTypes"][number]
}
export interface BookingConfirmation {
booking: BookingSchema
hotelData: HotelData
room: BookingConfirmationRoom
export interface BookingConfirmation extends HotelData {
booking: BookingConfirmationSchema
room:
| (Room & {
bedType: Room["roomTypes"][number]
})
| null
}