From e8408b4fb22d3169630b1f703779280cf78be865 Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Mon, 9 Jun 2025 12:27:10 +0000 Subject: [PATCH] Merged in fix/SW-2555-bookings-voucher-unable-date (pull request #2305) Fix: SW-2555 Fixed change date for voucher bookings * Fix: SW-2555 Fixed change date for voucher bookings Approved-by: Tobias Johansson --- .../ManageStay/Actions/ChangeDates/Steps/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/index.tsx index 99d5aaf63..bb21575cd 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/index.tsx @@ -74,7 +74,7 @@ export default function Steps({ closeModal }: ChangeDatesStepsProps) { setNewPrice(formatPrice(intl, pricePerStay + extraPrice, currency)) } else if ( "corporateCheque" in data.product && - data.product.corporateCheque.localPrice.additionalPricePerStay + data.product.corporateCheque.localPrice.numberOfCheques ) { const { additionalPricePerStay, currency, numberOfCheques } = data.product.corporateCheque.localPrice @@ -87,6 +87,12 @@ export default function Steps({ closeModal }: ChangeDatesStepsProps) { currency?.toString() ?? pkgsSum.currency ?? currencyCode ) ) + } else if ( + "voucher" in data.product && + data.product.voucher.numberOfVouchers + ) { + const { numberOfVouchers } = data.product.voucher + setNewPrice(formatPrice(intl, numberOfVouchers, CurrencyEnum.Voucher)) } else if ( "redemption" in data.product && data.product.redemption.localPrice.additionalPricePerStay