From a2e0f7244a83fc3fea53ec8f586f12703a0fc8aa Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Mon, 3 Nov 2025 15:46:54 +0100 Subject: [PATCH] fix: Hide opt-out option for ancillary email --- .../Steps/ConfirmationStep/index.tsx | 11 ----------- .../AddAncillaryFlow/AddAncillaryFlowModal/index.tsx | 2 -- .../MyStay/Ancillaries/AddAncillaryFlow/schema.ts | 1 - .../MyStay/Ancillaries/GuaranteeCallback/index.tsx | 1 - packages/trpc/lib/routers/booking/input.ts | 1 - packages/trpc/lib/routers/booking/mutation/index.ts | 2 +- 6 files changed, 1 insertion(+), 17 deletions(-) diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx index b749665c9..f109f8c3c 100755 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx @@ -237,17 +237,6 @@ export default function ConfirmationStep({ - - - - {intl.formatMessage({ - id: "addAncillary.confirmationStep.optInForEmail", - defaultMessage: - "I want to receive an updated booking confirmation email reflecting this add-on", - })} - - - ) diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/index.tsx index 08c391f37..6e7edc4bd 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/index.tsx @@ -97,7 +97,6 @@ export default function AddAncillaryFlowModal({ deliveryTime: defaultDeliveryTime, optionalText: "", termsAndConditions: false, - optInEmail: false, paymentMethod: booking.guaranteeInfo ? PaymentMethodEnum.card : savedCreditCards?.length @@ -153,7 +152,6 @@ export default function AddAncillaryFlowModal({ ancillaryDeliveryTime: selectedAncillary?.requiresDeliveryTime ? data.deliveryTime : undefined, - emailOptOut: !data.optInEmail, packages: packages, language: lang, }, diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/schema.ts b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/schema.ts index 8ee928fc4..74d01c260 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/schema.ts +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/schema.ts @@ -31,7 +31,6 @@ export const ancillaryFormSchema = z termsAndConditions: z .boolean() .refine((value) => value === true, ancillaryError.TERMS_NOT_ACCEPTED), - optInEmail: z.boolean(), paymentMethod: nullableStringValidator, }) .merge(quantitySchemaWithoutRefine) diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/GuaranteeCallback/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/GuaranteeCallback/index.tsx index b781857a1..2b9f92443 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/GuaranteeCallback/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/GuaranteeCallback/index.tsx @@ -56,7 +56,6 @@ export default function GuaranteeAncillaryHandler({ ancillaryDeliveryTime: selectedAncillary.requiresDeliveryTime ? formData.deliveryTime : undefined, - emailOptOut: !formData.optInEmail, packages, language: lang, }, diff --git a/packages/trpc/lib/routers/booking/input.ts b/packages/trpc/lib/routers/booking/input.ts index 990a7d666..7cca42f3e 100644 --- a/packages/trpc/lib/routers/booking/input.ts +++ b/packages/trpc/lib/routers/booking/input.ts @@ -14,7 +14,6 @@ export const addPackageInput = z.object({ comment: z.string().optional(), }) ), - emailOptOut: z.boolean(), language: z.nativeEnum(Lang).transform((val) => langToApiLang[val]), }) diff --git a/packages/trpc/lib/routers/booking/mutation/index.ts b/packages/trpc/lib/routers/booking/mutation/index.ts index e864048b4..2878db24f 100644 --- a/packages/trpc/lib/routers/booking/mutation/index.ts +++ b/packages/trpc/lib/routers/booking/mutation/index.ts @@ -145,7 +145,7 @@ export const bookingMutationRouter = router({ headers, body: body, }, - { language, emailOptOut: input.emailOptOut } + { language } ) if (!apiResponse.ok) {