Scheduling infrastructure for absolutely everyone.
feat: remove Cal.ai tab from navigation while preserving URL access (#23894)
Peer Richelsen4d51873140e2
diff --git a/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsx b/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsxindex c5d27b56cdd..0a9db5a1ffa 100644--- a/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsx+++ b/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsx@@ -71,12 +71,14 @@ export const useTabsNavigations = ({const enabledWorkflowsNumber = allActiveWorkflows ? allActiveWorkflows.length : 0;+ const eventTypeId = formMethods.getValues("id");+const EventTypeTabs = useMemo(() => {const navigation: VerticalTabItemProps[] = getNavigation({t,length,multipleDuration,- id: formMethods.getValues("id"),+ id: eventTypeId,enabledAppsNumber,installedAppsNumber,enabledWorkflowsNumber,@@ -87,7 +89,7 @@ export const useTabsNavigations = ({if (!requirePayment) {navigation.splice(3, 0, {name: t("recurring"),- href: `/event-types/${formMethods.getValues("id")}?tabName=recurring`,+ href: `/event-types/${eventTypeId}?tabName=recurring`,icon: "repeat",info: t(`recurring_event_tab_description`),"data-testid": "recurring",@@ -95,7 +97,7 @@ export const useTabsNavigations = ({}navigation.splice(1, 0, {name: t("availability"),- href: `/event-types/${formMethods.getValues("id")}?tabName=availability`,+ href: `/event-types/${eventTypeId}?tabName=availability`,icon: "calendar",info:isManagedEventType || isChildrenManagedEventType@@ -115,7 +117,7 @@ export const useTabsNavigations = ({if (team) {navigation.splice(2, 0, {name: t("assignment"),- href: `/event-types/${formMethods.getValues("id")}?tabName=team`,+ href: `/event-types/${eventTypeId}?tabName=team`,icon: "users",info: `${t(watchSchedulingType?.toLowerCase() ?? "")}${isManagedEventType ? ` - ${t("number_member", { count: watchChildrenCount || 0 })}` : ""@@ -137,21 +139,11 @@ export const useTabsNavigations = ({}navigation.push({name: t("webhooks"),- href: `/event-types/${formMethods.getValues("id")}?tabName=webhooks`,+ href: `/event-types/${eventTypeId}?tabName=webhooks`,icon: "webhook",info: `${activeWebhooksNumber} ${t("active")}`,"data-testid": "webhooks",});- const hidden = true; // hidden while in alpha trial. you can access it with tabName=ai- if (team && hidden) {- navigation.push({- name: "Cal.ai",- href: `/event-types/${eventType.id}?tabName=ai`,- icon: "sparkles",- info: t("cal_ai_event_tab_description"), // todo `cal_ai_event_tab_description`,- "data-testid": "Cal.ai",- });- }return navigation;}, [t,@@ -165,11 +157,13 @@ export const useTabsNavigations = ({length,requirePayment,multipleDuration,- formMethods.getValues("id"),+ eventTypeId,watchSchedulingType,watchChildrenCount,activeWebhooksNumber,canReadWorkflows,+ eventType.id,+ formMethods,]);return { tabsNavigation: EventTypeTabs };diff --git a/yarn.lock b/yarn.lockindex 1185e7dd554..c48c438a8d4 100644--- a/yarn.lock+++ b/yarn.lock@@ -3409,6 +3409,24 @@ __metadata:languageName: unknownlinkType: soft+"@calcom/fonio-ai@workspace:packages/app-store/fonio-ai":+ version: 0.0.0-use.local+ resolution: "@calcom/fonio-ai@workspace:packages/app-store/fonio-ai"+ dependencies:+ "@calcom/lib": "*"+ "@calcom/types": "*"+ languageName: unknown+ linkType: soft++"@calcom/framer@workspace:packages/app-store/framer":+ version: 0.0.0-use.local+ resolution: "@calcom/framer@workspace:packages/app-store/framer"+ dependencies:+ "@calcom/lib": "workspace:*"+ "@calcom/types": "workspace:*"+ languageName: unknown+ linkType: soft+"@calcom/ga4@workspace:packages/app-store/ga4":version: 0.0.0-use.localresolution: "@calcom/ga4@workspace:packages/app-store/ga4"@@ -4117,7 +4135,7 @@ __metadata:languageName: unknownlinkType: soft-"@calcom/types@workspace:*, @calcom/types@workspace:packages/types":+"@calcom/types@*, @calcom/types@workspace:*, @calcom/types@workspace:packages/types":version: 0.0.0-use.localresolution: "@calcom/types@workspace:packages/types"dependencies: