Merged in fix/SW-933-incorrect-ratecode (pull request #947)

Fix/SW-933 incorrect ratecode when creating booking as a member

* fix(SW-933): Added check if member to select correct rate code in create booking

* fix(SW-933): set member price in summary when "join" is true

* fix(SW-933): change "price" -> "amount" and fix bool expression

* fix(SW-933): added check for membership number in summary


Approved-by: Christel Westerberg
This commit is contained in:
Tobias Johansson
2024-11-21 09:00:06 +00:00
parent 8b66c16e17
commit 7221e77fa0
11 changed files with 100 additions and 68 deletions

View File

@@ -7,6 +7,7 @@ interface Room {
adults: number
roomTypeCode: string
rateCode: string
counterRateCode: string
children?: Child[]
packages?: RoomPackageCodeEnum[]
}
@@ -18,14 +19,24 @@ export interface BookingData {
}
type Price = {
price: number
amount: number
currency: string
}
export type RoomsData = {
roomType: string
localPrice: Price
euroPrice: Price | undefined
prices: {
public: {
local: Price
euro: Price | undefined
}
member:
| {
local: Price
euro: Price | undefined
}
| undefined
}
adults: number
children?: Child[]
rateDetails?: string[]

View File

@@ -1,4 +1,4 @@
import { CreditCard } from "@/types/user"
import { CreditCard, SafeUser } from "@/types/user"
export interface SectionProps {
nextPath: string
@@ -28,6 +28,7 @@ export interface BreakfastSelectionProps extends SectionProps {
export interface DetailsProps extends SectionProps {}
export interface PaymentProps {
user: SafeUser
roomPrice: { publicPrice: number; memberPrice: number | undefined }
otherPaymentOptions: string[]
savedCreditCards: CreditCard[] | null

View File

@@ -11,7 +11,7 @@ interface Room {
adults: number
roomtype: string
ratecode: string
counterratecode?: string
counterratecode: string
child?: Child[]
packages?: string
}