fix: Hide opt-out option for ancillary email

This commit is contained in:
Christel Westerberg
2025-11-03 15:46:54 +01:00
parent b8d887f82d
commit a2e0f7244a
6 changed files with 1 additions and 17 deletions

View File

@@ -237,17 +237,6 @@ export default function ConfirmationStep({
</span>
</Typography>
</Checkbox>
<Checkbox name="optInEmail">
<Typography variant="Body/Supporting text (caption)/smRegular">
<span>
{intl.formatMessage({
id: "addAncillary.confirmationStep.optInForEmail",
defaultMessage:
"I want to receive an updated booking confirmation email reflecting this add-on",
})}
</span>
</Typography>
</Checkbox>
</div>
</div>
)

View File

@@ -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,
},

View File

@@ -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)

View File

@@ -56,7 +56,6 @@ export default function GuaranteeAncillaryHandler({
ancillaryDeliveryTime: selectedAncillary.requiresDeliveryTime
? formData.deliveryTime
: undefined,
emailOptOut: !formData.optInEmail,
packages,
language: lang,
},

View File

@@ -14,7 +14,6 @@ export const addPackageInput = z.object({
comment: z.string().optional(),
})
),
emailOptOut: z.boolean(),
language: z.nativeEnum(Lang).transform((val) => langToApiLang[val]),
})

View File

@@ -145,7 +145,7 @@ export const bookingMutationRouter = router({
headers,
body: body,
},
{ language, emailOptOut: input.emailOptOut }
{ language }
)
if (!apiResponse.ok) {