fix: Hide opt-out option for ancillary email
This commit is contained in:
@@ -237,17 +237,6 @@ export default function ConfirmationStep({
|
|||||||
</span>
|
</span>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Checkbox>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ export default function AddAncillaryFlowModal({
|
|||||||
deliveryTime: defaultDeliveryTime,
|
deliveryTime: defaultDeliveryTime,
|
||||||
optionalText: "",
|
optionalText: "",
|
||||||
termsAndConditions: false,
|
termsAndConditions: false,
|
||||||
optInEmail: false,
|
|
||||||
paymentMethod: booking.guaranteeInfo
|
paymentMethod: booking.guaranteeInfo
|
||||||
? PaymentMethodEnum.card
|
? PaymentMethodEnum.card
|
||||||
: savedCreditCards?.length
|
: savedCreditCards?.length
|
||||||
@@ -153,7 +152,6 @@ export default function AddAncillaryFlowModal({
|
|||||||
ancillaryDeliveryTime: selectedAncillary?.requiresDeliveryTime
|
ancillaryDeliveryTime: selectedAncillary?.requiresDeliveryTime
|
||||||
? data.deliveryTime
|
? data.deliveryTime
|
||||||
: undefined,
|
: undefined,
|
||||||
emailOptOut: !data.optInEmail,
|
|
||||||
packages: packages,
|
packages: packages,
|
||||||
language: lang,
|
language: lang,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ export const ancillaryFormSchema = z
|
|||||||
termsAndConditions: z
|
termsAndConditions: z
|
||||||
.boolean()
|
.boolean()
|
||||||
.refine((value) => value === true, ancillaryError.TERMS_NOT_ACCEPTED),
|
.refine((value) => value === true, ancillaryError.TERMS_NOT_ACCEPTED),
|
||||||
optInEmail: z.boolean(),
|
|
||||||
paymentMethod: nullableStringValidator,
|
paymentMethod: nullableStringValidator,
|
||||||
})
|
})
|
||||||
.merge(quantitySchemaWithoutRefine)
|
.merge(quantitySchemaWithoutRefine)
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ export default function GuaranteeAncillaryHandler({
|
|||||||
ancillaryDeliveryTime: selectedAncillary.requiresDeliveryTime
|
ancillaryDeliveryTime: selectedAncillary.requiresDeliveryTime
|
||||||
? formData.deliveryTime
|
? formData.deliveryTime
|
||||||
: undefined,
|
: undefined,
|
||||||
emailOptOut: !formData.optInEmail,
|
|
||||||
packages,
|
packages,
|
||||||
language: lang,
|
language: lang,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ export const addPackageInput = z.object({
|
|||||||
comment: z.string().optional(),
|
comment: z.string().optional(),
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
emailOptOut: z.boolean(),
|
|
||||||
language: z.nativeEnum(Lang).transform((val) => langToApiLang[val]),
|
language: z.nativeEnum(Lang).transform((val) => langToApiLang[val]),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export const bookingMutationRouter = router({
|
|||||||
headers,
|
headers,
|
||||||
body: body,
|
body: body,
|
||||||
},
|
},
|
||||||
{ language, emailOptOut: input.emailOptOut }
|
{ language }
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!apiResponse.ok) {
|
if (!apiResponse.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user