From 7a014761dc3be120e4143461f58f128dad04b286 Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:37:37 +0200 Subject: [PATCH] unlock all fields in limits tab (#11936) Co-authored-by: CarinaWolli Co-authored-by: Peer Richelsen --- .../components/eventtype/EventLimitsTab.tsx | 75 ++++--------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/apps/web/components/eventtype/EventLimitsTab.tsx b/apps/web/components/eventtype/EventLimitsTab.tsx index 1c91187677..24502bb2b8 100644 --- a/apps/web/components/eventtype/EventLimitsTab.tsx +++ b/apps/web/components/eventtype/EventLimitsTab.tsx @@ -7,7 +7,6 @@ import type { UseFormRegisterReturn } from "react-hook-form"; import { Controller, useFormContext, useWatch } from "react-hook-form"; import type { SingleValue } from "react-select"; -import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager"; import { classNames } from "@calcom/lib"; import type { DurationType } from "@calcom/lib/convertToNewDurationType"; import convertToNewDurationType from "@calcom/lib/convertToNewDurationType"; @@ -141,17 +140,6 @@ export const EventLimitsTab = ({ eventType }: Pick
- + { if (val) onChange(val.value); }} @@ -210,10 +194,7 @@ export const EventLimitsTab = ({ eventType }: Pick
- + { if (val) onChange(val.value); }} @@ -248,20 +228,11 @@ export const EventLimitsTab = ({ eventType }: Pick
- - + +
- + { formMethods.setValue("slotInterval", val && (val.value || 0) > 0 ? val.value : null); }} @@ -305,7 +275,6 @@ export const EventLimitsTab = ({ eventType }: Pick { @@ -323,12 +292,7 @@ export const EventLimitsTab = ({ eventType }: Pick
- +
); @@ -350,7 +314,6 @@ export const EventLimitsTab = ({ eventType }: Pick { if (active) { @@ -365,7 +328,6 @@ export const EventLimitsTab = ({ eventType }: Pick @@ -391,7 +353,6 @@ export const EventLimitsTab = ({ eventType }: Pick formMethods.setValue("periodType", bool ? "ROLLING" : "UNLIMITED")}>
@@ -399,9 +360,7 @@ export const EventLimitsTab = ({ eventType }: Pick formMethods.setValue("periodType", val as PeriodType)}> - {PERIOD_TYPES.filter((opt) => - periodTypeLocked.disabled ? watchPeriodType === opt.type : true - ).map((period) => { + {PERIOD_TYPES.map((period) => { if (period.type === "UNLIMITED") return null; return (
- {!periodTypeLocked.disabled && ( - - - - )} + + + + {period.prefix ? {period.prefix}  : null} {period.type === "ROLLING" && (
@@ -426,14 +384,12 @@ export const EventLimitsTab = ({ eventType }: Pick