Merged in feat/SW-1370/Guarantee-my-stay-ancillaries (pull request #1545)
Feat/SW-1370/Guarantee my stay ancillaries * feat(SW-1370): guarantee for ancillaries * feat(SW-1370): remove console log * feat(SW-1370): add translations * feat(SW-1370): small fix * feat(SW-1370): fix must be guaranteed * feat(SW-1370): fix logic and comments pr * feat(SW-1370): fix comments pr * feat(SW-1370): fix comments pr * feat(SW-1370): add translation * feat(SW-1370): add translation and fix pr comment * feat(SW-1370): fix pr comment * feat(SW-1370): fix encoding path refId issue * feat(SW-1370): refactor AddAncillaryStore usage and introduce context provider * feat(SW-1370): refactor * feat(SW-1370): refactor ancillaries * feat(SW-1370): fix merge Approved-by: Simon.Emanuelsson
This commit is contained in:
@@ -3,15 +3,13 @@ import type { PaymentMethodEnum } from "@/constants/booking"
|
||||
|
||||
export interface PaymentProps {
|
||||
otherPaymentOptions: PaymentMethodEnum[]
|
||||
mustBeGuaranteed: boolean
|
||||
memberMustBeGuaranteed: boolean
|
||||
supportedCards: PaymentMethodEnum[]
|
||||
isFlexRate: boolean
|
||||
}
|
||||
|
||||
export interface PaymentClientProps
|
||||
extends Omit<PaymentProps, "supportedCards"> {
|
||||
savedCreditCards: CreditCard[] | null
|
||||
isUserLoggedIn: boolean
|
||||
}
|
||||
|
||||
export type PriceChangeData = Array<{
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import type { z } from "zod"
|
||||
|
||||
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
|
||||
import type { User } from "@/types/user"
|
||||
import type { CreditCard, User } from "@/types/user"
|
||||
import type { ancillaryPackagesSchema } from "@/server/routers/hotels/output"
|
||||
|
||||
export type Ancillaries = z.output<typeof ancillaryPackagesSchema>
|
||||
export type Ancillary = Ancillaries[number]
|
||||
export type SelectedAncillary = Ancillary["ancillaryContent"][number]
|
||||
|
||||
export interface AncillariesProps extends Pick<BookingConfirmation, "booking"> {
|
||||
ancillaries: Ancillaries | null
|
||||
user: User | null
|
||||
savedCreditCards: CreditCard[] | null
|
||||
refId: string
|
||||
}
|
||||
|
||||
export interface AddedAncillariesProps {
|
||||
@@ -27,25 +30,39 @@ export interface MyStayProps extends BookingConfirmation {
|
||||
|
||||
export interface AncillaryGridModalProps {
|
||||
ancillaries: Ancillaries
|
||||
selectedCategory: string | null
|
||||
setSelectedCategory: (category: string) => void
|
||||
handleCardClick: (ancillary: Ancillary["ancillaryContent"][number]) => void
|
||||
user: User | null
|
||||
}
|
||||
|
||||
export interface AddAncillaryFlowModalProps
|
||||
extends Pick<BookingConfirmation, "booking"> {
|
||||
isOpen: boolean
|
||||
onClose: () => void
|
||||
refId: string
|
||||
user: User | null
|
||||
savedCreditCards: CreditCard[] | null
|
||||
}
|
||||
|
||||
export type DeliveryTimeOption = {
|
||||
label: string
|
||||
value: string
|
||||
}
|
||||
export interface DeliveryMethodStepProps {
|
||||
deliveryTimeOptions: {
|
||||
label: string
|
||||
value: string
|
||||
}[]
|
||||
deliveryTimeOptions: DeliveryTimeOption[]
|
||||
}
|
||||
|
||||
export interface SelectQuantityStepProps {
|
||||
user: User | null
|
||||
}
|
||||
|
||||
export interface ConfirmationStepProps {
|
||||
savedCreditCards: CreditCard[] | null
|
||||
}
|
||||
|
||||
export interface StepsProps {
|
||||
user: User | null
|
||||
savedCreditCards: CreditCard[] | null
|
||||
}
|
||||
|
||||
export interface ActionButtonsProps {
|
||||
isPriceDetailsOpen: boolean
|
||||
togglePriceDetails: VoidFunction
|
||||
isSubmitting: boolean
|
||||
}
|
||||
|
||||
3
apps/scandic-web/types/contexts/add-ancillary.ts
Normal file
3
apps/scandic-web/types/contexts/add-ancillary.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { createAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow"
|
||||
|
||||
export type AddAncillaryStore = ReturnType<typeof createAddAncillaryStore>
|
||||
@@ -37,6 +37,7 @@ export interface InitialRoomData {
|
||||
roomRate: RoomRate
|
||||
roomType: string
|
||||
roomTypeCode: string
|
||||
memberMustBeGuaranteed?: boolean
|
||||
}
|
||||
|
||||
export type RoomStep = {
|
||||
|
||||
Reference in New Issue
Block a user