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:
Hrishikesh Vaipurkar
2025-03-05 09:32:32 +00:00
parent 43d3713f59
commit 39b6774269
17 changed files with 139 additions and 11 deletions

View File

@@ -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,
},
}
}