Merged in feat/SW-1589-implement-booking-code-enter (pull request #1368)
Feat/SW-1589 implement booking code enter * feat: SW-1589 Booking code rate implementation * feat: SW-1589 Optimized price display * feat: SW-1589 Display standard price * feat: SW-1589 Fixed rate title issue Approved-by: Niclas Edenvin
This commit is contained in:
@@ -258,6 +258,7 @@ export function createDetailsStore(
|
||||
}
|
||||
|
||||
const stateTotalLocalPrice = state.totalPrice.local.price
|
||||
const stateTotalLocalRegularPrice = state.totalPrice.local.regularPrice
|
||||
|
||||
const addToTotalPrice =
|
||||
(currentRoom.room.breakfast === undefined ||
|
||||
@@ -290,7 +291,10 @@ export function createDetailsStore(
|
||||
local: {
|
||||
currency: breakfast.localPrice.currency,
|
||||
price: stateTotalLocalPrice + breakfastTotalPrice,
|
||||
},
|
||||
regularPrice: stateTotalLocalRegularPrice
|
||||
? stateTotalLocalRegularPrice + breakfastTotalPrice
|
||||
: undefined,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,6 +326,9 @@ export function createDetailsStore(
|
||||
if (localPrice < 0) {
|
||||
localPrice = 0
|
||||
}
|
||||
let regularPrice = stateTotalLocalRegularPrice
|
||||
? stateTotalLocalRegularPrice - currentBreakfastTotalPrice
|
||||
: undefined
|
||||
|
||||
state.totalPrice = {
|
||||
requested: state.totalPrice.requested && {
|
||||
@@ -331,6 +338,7 @@ export function createDetailsStore(
|
||||
local: {
|
||||
currency,
|
||||
price: localPrice,
|
||||
regularPrice,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user