From 5f770a9789a8385c4e29e638f531b5ec7559a227 Mon Sep 17 00:00:00 2001 From: Romit Gabani <85230081+romitg2@users.noreply.github.com> Date: Thu, 8 May 2025 10:39:11 +0530 Subject: [PATCH] fix: hiding And connect with specific team members option for non org teams (#21083) * fix: hiding And connect with specific team members option for non org teams * removed console logs * added comment --------- Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com> --- .../routing-forms/pages/route-builder/[...appPages].tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx b/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx index 9d3c1e90fe..ccd06bf80a 100644 --- a/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx +++ b/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx @@ -11,6 +11,7 @@ import type { UseFormReturn } from "react-hook-form"; import { Toaster } from "sonner"; import type { z } from "zod"; +import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; import { areTheySiblingEntitites } from "@calcom/lib/entityPermissionUtils"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { buildEmptyQueryValue, raqbQueryValueUtils } from "@calcom/lib/raqb/raqbUtils"; @@ -385,6 +386,9 @@ const Route = ({ const { eventOptions } = buildEventsData({ eventTypesByGroup, form, route }); + const orgBranding = useOrgBranding(); + const isOrganization = !!orgBranding; + // /team/{TEAM_SLUG}/{EVENT_SLUG} -> /team/{TEAM_SLUG} const eventTypePrefix = eventOptions.length !== 0 @@ -554,7 +558,8 @@ const Route = ({ : null; const attributesQueryBuilder = - route.action?.type === RouteActionType.EventTypeRedirectUrl && isTeamForm ? ( + // team member attributes are only available for organization teams + route.action?.type === RouteActionType.EventTypeRedirectUrl && isTeamForm && isOrganization ? (