fix: make sure calculations in booking flow are correct
This commit is contained in:
committed by
Michael Zetterberg
parent
3e0f503314
commit
a222ecfc5c
@@ -71,6 +71,7 @@ export function createRatesStore({
|
||||
const roomConfiguration = roomConfigurations?.[idx]
|
||||
const selectedRoom = findSelectedRate(
|
||||
room.rateCode,
|
||||
room.counterRateCode,
|
||||
room.roomTypeCode,
|
||||
roomConfiguration
|
||||
)
|
||||
@@ -79,7 +80,11 @@ export function createRatesStore({
|
||||
continue
|
||||
}
|
||||
|
||||
const product = findProductInRoom(room.rateCode, selectedRoom)
|
||||
const product = findProductInRoom(
|
||||
room.rateCode,
|
||||
selectedRoom,
|
||||
room.counterRateCode
|
||||
)
|
||||
if (product) {
|
||||
rateSummary[idx] = {
|
||||
features: selectedRoom.features,
|
||||
@@ -121,13 +126,18 @@ export function createRatesStore({
|
||||
const selectedRate =
|
||||
findSelectedRate(
|
||||
room.rateCode,
|
||||
room.counterRateCode,
|
||||
room.roomTypeCode,
|
||||
roomConfiguration
|
||||
) ?? null
|
||||
|
||||
let product = null
|
||||
if (selectedRate) {
|
||||
product = findProductInRoom(room.rateCode, selectedRate)
|
||||
product = findProductInRoom(
|
||||
room.rateCode,
|
||||
selectedRate,
|
||||
room.counterRateCode
|
||||
)
|
||||
}
|
||||
|
||||
// Since features are fetched async based on query string, we need to read from query string to apply correct filtering
|
||||
|
||||
Reference in New Issue
Block a user