From 682f0c66ff970eda9dd6c0a5057ddef3f25f5aa4 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Fri, 23 Sep 2022 15:00:45 +0100 Subject: [PATCH] Fix min booking notice (#4679) * Fix miniumbookig notice * Fixes minutes field not working properly (#4680) Co-authored-by: Alex van Andel --- apps/web/components/v2/eventtype/EventLimitsTab.tsx | 4 ++-- apps/web/pages/v2/event-types/[type]/index.tsx | 1 + packages/ui/v2/core/form/fields.tsx | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/web/components/v2/eventtype/EventLimitsTab.tsx b/apps/web/components/v2/eventtype/EventLimitsTab.tsx index 9b3710bebb..72881669b1 100644 --- a/apps/web/components/v2/eventtype/EventLimitsTab.tsx +++ b/apps/web/components/v2/eventtype/EventLimitsTab.tsx @@ -6,7 +6,7 @@ import { useFormContext, Controller, useWatch } from "react-hook-form"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { PeriodType } from "@calcom/prisma/client"; -import { Select, Switch, Label, Input, TextField } from "@calcom/ui/v2"; +import { Select, Switch, Label, Input, MinutesField } from "@calcom/ui/v2"; import DateRangePicker from "@calcom/ui/v2/core/form/date-range-picker/DateRangePicker"; export const EventLimitsTab = (props: Pick) => { @@ -113,7 +113,7 @@ export const EventLimitsTab = (props: Pick)
- ) => { endDate: periodDates.endDate, }, schedulingType: eventType.schedulingType, + minimumBookingNotice: eventType.minimumBookingNotice, }, }); diff --git a/packages/ui/v2/core/form/fields.tsx b/packages/ui/v2/core/form/fields.tsx index 99cef80673..72affbe323 100644 --- a/packages/ui/v2/core/form/fields.tsx +++ b/packages/ui/v2/core/form/fields.tsx @@ -26,7 +26,7 @@ export const Input = forwardRef(function Input(pro {...props} ref={ref} className={classNames( - "mb-2 block h-9 w-full rounded-md border border-gray-300 py-2 px-3 text-sm hover:border-gray-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1", + "mb-2 block h-9 w-full rounded-md border border-gray-300 py-2 px-3 text-sm placeholder:text-gray-400 hover:border-gray-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1", props.className )} /> @@ -208,7 +208,7 @@ const InputField = forwardRef(function InputF {addOnLeading || addOnSuffix ? (
); } + +export const MinutesField = forwardRef(function MinutesField(props, ref) { + return ; +});