fix: Hide opt-out option for ancillary email
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -56,7 +56,6 @@ export default function GuaranteeAncillaryHandler({
|
||||
ancillaryDeliveryTime: selectedAncillary.requiresDeliveryTime
|
||||
? formData.deliveryTime
|
||||
: undefined,
|
||||
emailOptOut: !formData.optInEmail,
|
||||
packages,
|
||||
language: lang,
|
||||
},
|
||||
|
||||
@@ -14,7 +14,6 @@ export const addPackageInput = z.object({
|
||||
comment: z.string().optional(),
|
||||
})
|
||||
),
|
||||
emailOptOut: z.boolean(),
|
||||
language: z.nativeEnum(Lang).transform((val) => langToApiLang[val]),
|
||||
})
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ export const bookingMutationRouter = router({
|
||||
headers,
|
||||
body: body,
|
||||
},
|
||||
{ language, emailOptOut: input.emailOptOut }
|
||||
{ language }
|
||||
)
|
||||
|
||||
if (!apiResponse.ok) {
|
||||
|
||||
Reference in New Issue
Block a user