Merged in feat(SW-1279)-mystay-multirum-cancelling (pull request #1443)
Feat(SW-1279) mystay multirum cancelling * feat(SW-1279) Cancelation text if non-user on room 2-4 * feat(SW-1279) cancel mystay multiroom * feat(SW-1279): Added cancellation for multiroom on mystay Approved-by: Niclas Edenvin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { RegisterOptions } from "react-hook-form"
|
||||
import type { RegisterOptions } from "react-hook-form"
|
||||
|
||||
export interface CheckboxProps
|
||||
extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import type { Hotel } from "@/types/hotel"
|
||||
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
|
||||
|
||||
export const cancelStaySchema = z.object({
|
||||
rooms: z.array(
|
||||
z.object({
|
||||
id: z.string().optional(),
|
||||
checked: z.boolean().optional(),
|
||||
confirmationNumber: z.string().nullable().optional(),
|
||||
})
|
||||
),
|
||||
})
|
||||
|
||||
export interface CancelStayProps {
|
||||
booking: BookingConfirmation["booking"]
|
||||
hotel: Hotel
|
||||
setBookingStatus: () => void
|
||||
handleCloseModal: () => void
|
||||
handleBackToManageStay: () => void
|
||||
}
|
||||
|
||||
export type FormValues = z.infer<typeof cancelStaySchema>
|
||||
|
||||
export interface RoomDetails {
|
||||
id: string
|
||||
roomName: string
|
||||
roomTypeCode: string
|
||||
rateDefinition: {
|
||||
breakfastIncluded: boolean
|
||||
cancellationRule: string | null
|
||||
cancellationText: string | null
|
||||
generalTerms: string[]
|
||||
isMemberRate: boolean
|
||||
mustBeGuaranteed: boolean
|
||||
rateCode: string | null
|
||||
title: string | null
|
||||
}
|
||||
isMainBooking?: boolean
|
||||
}
|
||||
|
||||
export interface StayDetails {
|
||||
checkInDate: string
|
||||
checkOutDate: string
|
||||
nightsText: string
|
||||
adultsText: string
|
||||
childrenText: string
|
||||
}
|
||||
|
||||
export interface CancelStayConfirmationProps {
|
||||
hotel: Hotel
|
||||
booking: BookingConfirmation["booking"]
|
||||
stayDetails: StayDetails
|
||||
roomDetails?: RoomDetails[]
|
||||
}
|
||||
|
||||
export interface FinalConfirmationProps {
|
||||
booking: BookingConfirmation["booking"]
|
||||
stayDetails: StayDetails
|
||||
}
|
||||
|
||||
export interface PriceContainerProps {
|
||||
booking: BookingConfirmation["booking"]
|
||||
stayDetails: StayDetails
|
||||
}
|
||||
Reference in New Issue
Block a user