Merged in feat/SW-1281-ancillaries-add-flow (pull request #1399)

Feat/SW-1281 ancillaries add flow

* feat(SW-1546): update design

* feat(SW-1546): show points only if logged in

* feat(SW-1546): always show points

* feat(SW-1281): ancillary add flow initial

* feat(SW-1546): add api call

* feat(SW-1281): refactor naming and break out components

* feat(SW-1281): handle back button

* feat(SW-1281): make mobile cards clickable

* feat(SW-1281): refactor spread ancillaries

* feat(SW-1281): add deliverytimes

* feat(SW-1281): rebase master

* feat(SW-1281): add design for logged in or not

* feat(SW-1281): add design

* feat(SW-1281): add mobile design

* feat(SW-1281): fix carousel

* feat(SW-1281): show deliverytime only if ancillary has not been added

* feat(SW-1281): add design

* feat(SW-1281): add translations

* feat(SW-1281): add translations

* feat(SW-1281): add translations

* feat(SW-1281): base dates on check in date only

* feat(SW-1281): fix show correct toast when no valid data

* feat(SW-1281): hande logic if deliverytime is not required

* feat(SW-1281): fix max width for mobile

* feat(SW-1281): refactor after pr comment


Approved-by: Niclas Edenvin
Approved-by: Linus Flood
This commit is contained in:
Bianca Widstam
2025-02-26 07:20:45 +00:00
committed by Linus Flood
parent 341f0c54ed
commit 541b91e34c
32 changed files with 1208 additions and 129 deletions
+6
View File
@@ -19,3 +19,9 @@ export interface BreakfastChoiceCardProps extends AncillaryCardProps {
id?: string
value: string
}
export interface AncillaryChoiceCardProps extends AncillaryCardProps {
name: string
id?: string
value: string
}
+28 -1
View File
@@ -1,13 +1,15 @@
import type { z } from "zod"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
import type { 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 interface AncillariesProps {
export interface AncillariesProps extends Pick<BookingConfirmation, "booking"> {
ancillaries: Ancillaries | null
user: User | null
}
export interface AncillaryProps {
@@ -17,3 +19,28 @@ export interface AncillaryProps {
export interface MyStayProps extends BookingConfirmation {
ancillaries: Ancillaries | null
}
export interface AncillaryGridModalProps {
ancillaries: Ancillaries
selectedCategory: string | null
setSelectedCategory: (category: string) => void
handleCardClick: (ancillary: Ancillary["ancillaryContent"][number]) => void
}
export interface AddAncillaryFlowModalProps
extends Pick<BookingConfirmation, "booking"> {
isOpen: boolean
onClose: () => void
user: User | null
}
export interface DeliveryMethodStepProps {
deliveryTimeOptions: {
label: string
value: string
}[]
}
export interface SelectQuantityStepProps {
user: User | null
}
+1
View File
@@ -188,3 +188,4 @@ export type TrackingPosition =
| "hamburger menu"
| "join scandic friends sidebar"
| "enter details"
| "my stay"