From c67338bb3fd50a12a80c334997054735337bd80f Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Thu, 26 May 2022 11:24:19 -0400 Subject: [PATCH] Fix bug to check opt in bookings (#2889) * Fix bug to check opt in bookings * Implemented value, onChange instead of form access Co-authored-by: Alex van Andel --- apps/web/pages/event-types/[type].tsx | 9 +++------ apps/web/public/static/locales/en/common.json | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index ca4e604d9b..a3c58c4bf7 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -1439,9 +1439,8 @@ const EventTypePage = (props: inferSSRProps) => { ( + render={({ field: { value, onChange } }) => ( ) => { description={t("opt_in_booking_description")} defaultChecked={eventType.requiresConfirmation} disabled={enableSeats} - checked={formMethods.watch("disableGuests")} - onChange={(e) => { - formMethods.setValue("requiresConfirmation", e?.target.checked); - }} + checked={value} + onChange={(e) => onChange(e?.target.checked)} /> )} /> diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index 67ca80eedb..ebc9f89142 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -768,7 +768,7 @@ "redirect_url_upgrade_description": "In order to use this feature, you need to upgrade to a Pro account.", "duplicate": "Duplicate", "offer_seats": "Offer seats", - "offer_seats_description": "Offer seats to bookings (This disables guests)", + "offer_seats_description": "Offer seats to bookings (This disables guests & opt in bookings)", "seats_available": "Seats available", "number_of_seats": "Number of seats per booking", "enter_number_of_seats": "Enter number of seats",