feat: move room charge to top in price details modal
This commit is contained in:
committed by
Michael Zetterberg
parent
194a401a56
commit
a99e434d84
@@ -61,12 +61,29 @@ export default function BookingConfirmationProvider({
|
||||
currencyCode
|
||||
)
|
||||
} else if (totalBookingVouchers) {
|
||||
isVatCurrency = false
|
||||
formattedTotalCost = formatPrice(
|
||||
intl,
|
||||
totalBookingVouchers,
|
||||
CurrencyEnum.Voucher
|
||||
)
|
||||
const room = rooms?.[0]
|
||||
if (room?.packages) {
|
||||
const pkgsSum = room.packages.reduce(
|
||||
(total, pkg) => total + pkg.totalPrice,
|
||||
0
|
||||
)
|
||||
const currency = room.packages.find((pkg) => pkg.currency)?.currency
|
||||
isVatCurrency = false
|
||||
formattedTotalCost = formatPrice(
|
||||
intl,
|
||||
totalBookingVouchers,
|
||||
CurrencyEnum.Voucher,
|
||||
pkgsSum,
|
||||
currency
|
||||
)
|
||||
} else {
|
||||
isVatCurrency = false
|
||||
formattedTotalCost = formatPrice(
|
||||
intl,
|
||||
totalBookingVouchers,
|
||||
CurrencyEnum.Voucher
|
||||
)
|
||||
}
|
||||
}
|
||||
const initialData = {
|
||||
bookingCode,
|
||||
|
||||
Reference in New Issue
Block a user