Merged in feat/SW-755-price-change-non-happy (pull request #957)

Feat/SW-755 price change non happy

* fix(SW-755): dont show field error if checkbox has no children

* feat(SW-755): Price change route + dialog WIP

* fix(SW-755): minor refactoring

* fix(SW-755): added logging to price change route

* fix(SW-755): remove redundant search param logic

* fix(SW-755): moved enum cast to zod instead

* fix(SW-755): move prop type to types folder

* fix(SW-755): Added suspense to Payment and refactored payment options hook

* fix(SW-755): seperated terms and conditions copy from the checkbox label

* fix(SW-755): add currency format and fixed wrong translation

* fix(SW-755): change from undefined to null

* fix(SW-755): added extra type safety to payment options


Approved-by: Christian Andolf
Approved-by: Simon.Emanuelsson
This commit is contained in:
Tobias Johansson
2024-11-26 09:06:41 +00:00
parent 9fc65b6e53
commit 70000afe1f
22 changed files with 577 additions and 217 deletions

View File

@@ -0,0 +1,8 @@
export type PriceChangeDialogProps = {
isOpen: boolean
oldPrice: number
newPrice: number
currency: string
onCancel: () => void
onAccept: () => void
}

View File

@@ -1,3 +1,5 @@
import { PaymentMethodEnum } from "@/constants/booking"
import { CreditCard, SafeUser } from "@/types/user"
export interface SectionProps {
@@ -30,7 +32,7 @@ export interface DetailsProps extends SectionProps {}
export interface PaymentProps {
user: SafeUser
roomPrice: { publicPrice: number; memberPrice: number | undefined }
otherPaymentOptions: string[]
otherPaymentOptions: PaymentMethodEnum[]
savedCreditCards: CreditCard[] | null
mustBeGuaranteed: boolean
}