Merge branch 'master' into feature/tracking

This commit is contained in:
Linus Flood
2024-11-21 07:53:58 +01:00
213 changed files with 3486 additions and 1990 deletions
+40
View File
@@ -0,0 +1,40 @@
import type { BedTypeSchema } from "@/types/components/hotelReservation/enterDetails/bedType"
import type { BookingData } from "@/types/components/hotelReservation/enterDetails/bookingData"
import type { BreakfastPackage } from "@/types/components/hotelReservation/enterDetails/breakfast"
import type { DetailsSchema } from "@/types/components/hotelReservation/enterDetails/details"
import { StepEnum } from "@/types/enums/step"
export interface DetailsState {
actions: {
setIsSubmittingDisabled: (isSubmittingDisabled: boolean) => void
setTotalPrice: (totalPrice: TotalPrice) => void
toggleSummaryOpen: () => void
updateBedType: (data: BedTypeSchema) => void
updateBreakfast: (data: BreakfastPackage | false) => void
updateDetails: (data: DetailsSchema) => void
updateValidity: (property: StepEnum, isValid: boolean) => void
}
data: DetailsSchema & {
bedType: BedTypeSchema | undefined
breakfast: BreakfastPackage | false | undefined
booking: BookingData
}
isSubmittingDisabled: boolean
isSummaryOpen: boolean
isValid: Record<StepEnum, boolean>
totalPrice: TotalPrice
}
export interface InitialState extends Partial<DetailsState> {
booking: BookingData
}
interface Price {
currency: string
price: number
}
export interface TotalPrice {
euro: Price | undefined
local: Price
}
+10
View File
@@ -0,0 +1,10 @@
import { StepEnum } from "@/types/enums/step"
export interface StepState {
completeStep: () => void
navigate: (step: StepEnum) => void
setStep: (step: StepEnum) => void
currentStep: StepEnum
steps: StepEnum[]
}