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:
@@ -8,7 +8,6 @@ import type {
|
||||
Product,
|
||||
RedemptionProduct,
|
||||
} from "@scandic-hotels/trpc/types/roomAvailability"
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
import type { Price } from "@/types/components/hotelReservation/price"
|
||||
import type { Rate } from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||
@@ -214,8 +213,7 @@ export function calculateCorporateChequePrice(selectedRateSummary: Rate[]) {
|
||||
export function getTotalPrice(
|
||||
mainRoomProduct: Rate | null,
|
||||
rateSummary: Array<Rate | null>,
|
||||
isUserLoggedIn: boolean,
|
||||
intl: IntlShape
|
||||
isUserLoggedIn: boolean
|
||||
): Price | null {
|
||||
const summaryArray = rateSummary.filter((rate): rate is Rate => rate !== null)
|
||||
|
||||
@@ -235,9 +233,6 @@ export function getTotalPrice(
|
||||
}
|
||||
if ("voucher" in product) {
|
||||
const voucherPrice = calculateVoucherPrice(summaryArray)
|
||||
voucherPrice.local.currency = intl.formatMessage({
|
||||
defaultMessage: "Voucher",
|
||||
}) as CurrencyEnum
|
||||
return voucherPrice
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user