refactor: event limits web wrapper (#16679)
* chore: EventTypeWebWrapper base pr * fixup! chore: EventTypeWebWrapper base pr * fixup! Merge branch 'main' into morgan/cal-4183-eventtypeatom-web-wrapper-base * wip * fix: error * Event type atom wrapper handles app dir * fixup! Merge branch 'main' into morgan/cal-4183-eventtypeatom-web-wrapper-base * fixup! fixup! Merge branch 'main' into morgan/cal-4183-eventtypeatom-web-wrapper-base * remove console log * review comments * refactor: event limits tab for atoms * fixup! review comments --------- Co-authored-by: Morgan Vernay <morgan@cal.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
This commit is contained in:
co-authored by
Morgan Vernay
Morgan
parent
2fb1408dd1
commit
bc34e67191
@@ -23,6 +23,8 @@ import { Button, DateRangePicker, InputField, Label, Select, SettingsToggle, Tex
|
||||
|
||||
type IPeriodType = (typeof PeriodType)[keyof typeof PeriodType];
|
||||
|
||||
export type EventLimitsTabProps = Pick<EventTypeSetupProps, "eventType">;
|
||||
|
||||
/**
|
||||
* We technically have a ROLLING_WINDOW future limit option that isn't shown as a Radio Option. Because UX is better by providing it as a toggle with ROLLING Limit radio option.
|
||||
* Also, ROLLING_WINDOW reuses the same `periodDays` field and `periodCountCalendarDays` fields
|
||||
@@ -286,7 +288,7 @@ const MinimumBookingNoticeInput = React.forwardRef<
|
||||
);
|
||||
});
|
||||
|
||||
export const EventLimitsTab = ({ eventType }: Pick<EventTypeSetupProps, "eventType">) => {
|
||||
export const EventLimitsTab = ({ eventType }: EventLimitsTabProps) => {
|
||||
const { t, i18n } = useLocale();
|
||||
const formMethods = useFormContext<FormValues>();
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { EventLimitsTab } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
import type { EventLimitsTabProps } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
|
||||
const EventLimitsTabWebWrapper = (props: EventLimitsTabProps) => {
|
||||
return <EventLimitsTab {...props} />;
|
||||
};
|
||||
|
||||
export default EventLimitsTabWebWrapper;
|
||||
@@ -50,9 +50,7 @@ const EventTeamAssignmentTab = dynamic(() =>
|
||||
|
||||
const EventLimitsTab = dynamic(() =>
|
||||
// import web wrapper when it's ready
|
||||
import("@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab").then(
|
||||
(mod) => mod.EventLimitsTab
|
||||
)
|
||||
import("./EventLimitsTabWebWrapper").then((mod) => mod)
|
||||
);
|
||||
|
||||
const EventAdvancedTab = dynamic(() =>
|
||||
|
||||
Reference in New Issue
Block a user