From f7ee5409124479a2205b56e9f6dd92bf439d7a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matilda=20Landstr=C3=B6m?= Date: Mon, 12 Jan 2026 08:31:38 +0000 Subject: [PATCH] Merged in fix(STAY-151)-ancillary-limit (pull request #3412) fix(STAY-151)-limit-ancillary-quantity * fix(STAY-151)-limit-ancillary-quantity Approved-by: Emma Zettervall Approved-by: Linus Flood --- .../PaymentOption/index.tsx | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx index 5b02893f4..ff9f2a39d 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx @@ -9,6 +9,8 @@ import { Typography } from "@scandic-hotels/design-system/Typography" import styles from "./paymentOption.module.css" +const MAX_NR_ITEMS = 6 + type PaymentCardProps = { totalCostMessage: string icon: React.ReactNode @@ -119,12 +121,20 @@ function InnerPaymentOption({ handleOnIncrease={handleOnIncrease} handleOnDecrease={handleOnDecrease} disableDecrease={quantity <= 0} - disableIncrease={hasReachedMax} - disabledMessage={intl.formatMessage({ - id: "myPages.myStay.ancillaries.reachedMaxPointsStepperMessage", - defaultMessage: - "You’ve reached your points limit and can’t add more items with points.", - })} + disableIncrease={hasReachedMax || quantity >= MAX_NR_ITEMS} + disabledMessage={ + hasReachedMax + ? intl.formatMessage({ + id: "myPages.myStay.ancillaries.reachedMaxPointsStepperMessage", + defaultMessage: + "You’ve reached your points limit and can’t add more items with points.", + }) + : intl.formatMessage({ + id: "myPages.myStay.ancillaries.reachedMaxItemsStepperMessage", + defaultMessage: + "Maximum quantity reached for this item.", + }) + } /> )}