From 0263ab8c871d05a08aaadc590e7fa1d9786315bf Mon Sep 17 00:00:00 2001 From: Bianca Widstam Date: Thu, 26 Jun 2025 07:29:28 +0000 Subject: [PATCH] Merged in fix/SW-2739-reward-night-CTA-map (pull request #2446) fix(SW-2739): only show not enough points if redemption * fix(SW-2739): only show not enough points if redemption * fix(SW-2739): rename variable Approved-by: Arvid Norlin --- .../ListingHotelCardDialog/index.tsx | 15 ++++++++------- .../StandaloneHotelCardDialog/index.tsx | 16 +++++++++------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx index 7c314a1d3..81aca7296 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx @@ -62,6 +62,7 @@ export default function ListingHotelCardDialog({ const notEnoughPointsLabel = intl.formatMessage({ defaultMessage: "Not enough points", }) + const shouldShowNotEnoughPoints = redemptionPrice && !hasEnoughPoints return (
@@ -216,7 +217,13 @@ export default function ListingHotelCardDialog({ )}
- {hasEnoughPoints ? ( + {shouldShowNotEnoughPoints ? ( +
+ + {notEnoughPointsLabel} + +
+ ) : ( - ) : ( -
- - {notEnoughPointsLabel} - -
)} ) : ( diff --git a/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx index 2ef8441fa..0237873c4 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx @@ -63,6 +63,8 @@ export default function StandaloneHotelCardDialog({ defaultMessage: "Not enough points", }) + const shouldShowNotEnoughPoints = redemptionPrice && !hasEnoughPoints + return (
)}
- {hasEnoughPoints ? ( + {shouldShowNotEnoughPoints ? ( +
+ + {notEnoughPointsLabel} + +
+ ) : ( - ) : ( -
- - {notEnoughPointsLabel} - -
)} ) : (