Merged in fix/SW-3021-vouchers (pull request #2719)
fix(SW-3021): add pluralization support for vouchers * fix(SW-3021): add pluralization support for vouchers Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -3,7 +3,6 @@ import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
||||
import { sumPackages } from "@/components/HotelReservation/utils"
|
||||
|
||||
import type { RedemptionProduct } from "@scandic-hotels/trpc/types/roomAvailability"
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
import type {
|
||||
AvailabilityWithRoomInfo,
|
||||
@@ -32,11 +31,9 @@ type SelectedRate = {
|
||||
export function getTotalPrice({
|
||||
selectedRates,
|
||||
useMemberPrices,
|
||||
intl,
|
||||
}: {
|
||||
selectedRates: Array<SelectedRate | null>
|
||||
useMemberPrices: boolean
|
||||
intl: IntlShape
|
||||
}): Price | null {
|
||||
const mainRoom = selectedRates[0]
|
||||
const mainRoomRate = mainRoom?.rate
|
||||
@@ -63,10 +60,6 @@ export function getTotalPrice({
|
||||
}
|
||||
if ("voucher" in mainRoomRate) {
|
||||
const voucherPrice = calculateVoucherPrice(summaryArray)
|
||||
// TODO: This is a workaround, should be handled where we print the price.
|
||||
voucherPrice.local.currency = intl.formatMessage({
|
||||
defaultMessage: "Voucher",
|
||||
}) as CurrencyEnum
|
||||
return voucherPrice
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user