Merged in feat/SW-1437-price-change-scenario (pull request #1532)
Feat/SW-1437 price change scenario * wip price change scenario * feat(SW-1437): added updated room prices to summary * fix: spinner not centered on page * fix: feedback fixes Approved-by: Arvid Norlin Approved-by: Simon.Emanuelsson
This commit is contained in:
@@ -14,8 +14,11 @@ export function hasPrepaidRate({ room }: RoomState): boolean {
|
||||
return !room.isFlexRate
|
||||
}
|
||||
|
||||
export function calculateTotalRoomPrice({ room }: RoomState) {
|
||||
let totalPrice = room.roomPrice.perStay.local.price
|
||||
export function calculateTotalRoomPrice(
|
||||
{ room }: RoomState,
|
||||
initialRoomPrice?: number
|
||||
) {
|
||||
let totalPrice = initialRoomPrice ?? room.roomPrice.perStay.local.price
|
||||
|
||||
if (room.breakfast) {
|
||||
totalPrice += Number(room.breakfast.localPrice.totalPrice) * room.adults
|
||||
|
||||
Reference in New Issue
Block a user