diff --git a/apps/web/components/eventtype/EventAdvancedTab.tsx b/apps/web/components/eventtype/EventAdvancedTab.tsx index d6eaa871b3..1e4f8af1dd 100644 --- a/apps/web/components/eventtype/EventAdvancedTab.tsx +++ b/apps/web/components/eventtype/EventAdvancedTab.tsx @@ -279,6 +279,7 @@ export const EventAdvancedTab = ({ eventType, team }: Pick ; requiresConfirmation: boolean; + requiresConfirmationWillBlockSlot: boolean; onRequiresConfirmation: Dispatch>; seatsEnabled: boolean; eventType: EventTypeSetup; @@ -56,6 +57,8 @@ export default function RequiresConfirmationController({ opt.value === (metadata?.requiresConfirmationThreshold?.unit ?? defaultRequiresConfirmationSetup.unit) ); + const requiresConfirmationWillBlockSlot = formMethods.getValues("requiresConfirmationWillBlockSlot"); + return (
@@ -80,6 +83,10 @@ export default function RequiresConfirmationController({ LockedIcon={requiresConfirmationLockedProps.LockedIcon} onCheckedChange={(val) => { formMethods.setValue("requiresConfirmation", val, { shouldDirty: true }); + // If we uncheck requires confirmation, we also uncheck the "will block slot" checkbox + if (!val) { + formMethods.setValue("requiresConfirmationWillBlockSlot", false, { shouldDirty: true }); + } onRequiresConfirmation(val); }}>
@@ -121,73 +128,86 @@ export default function RequiresConfirmationController({ )} {(requiresConfirmationSetup !== undefined || !requiresConfirmationLockedProps.disabled) && ( - - - { - const val = Number(evt.target?.value); - setRequiresConfirmationSetup({ - unit: - requiresConfirmationSetup?.unit ?? - defaultRequiresConfirmationSetup.unit, - time: val, - }); - formMethods.setValue( - "metadata.requiresConfirmationThreshold.time", - val, - { shouldDirty: true } - ); - }} - className="border-default !m-0 block w-16 rounded-r-none border-r-0 text-sm [appearance:textfield] focus:z-10 focus:border-r" - defaultValue={metadata?.requiresConfirmationThreshold?.time || 30} - /> - -
- ), - }} - /> - - } - id="notice" - value="notice" - /> +