{name}
{!props.member.accepted &&
}
diff --git a/packages/features/ee/organizations/pages/settings/attributes/attributes-create-view.tsx b/packages/features/ee/organizations/pages/settings/attributes/attributes-create-view.tsx
index 3c5da8911759eb..16f8518c9549d8 100644
--- a/packages/features/ee/organizations/pages/settings/attributes/attributes-create-view.tsx
+++ b/packages/features/ee/organizations/pages/settings/attributes/attributes-create-view.tsx
@@ -6,7 +6,6 @@ import { useFormContext } from "react-hook-form";
import { z } from "zod";
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
-import SettingsLayout from "@calcom/features/settings/layouts/SettingsLayout";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, useMeta, showToast } from "@calcom/ui";
@@ -89,8 +88,5 @@ function CreateAttributeHeader(props: { isPending: boolean }) {
>
);
}
-export function getLayout(page: React.ReactElement) {
- return
{page};
-}
export default CreateAttributesPage;
diff --git a/packages/features/ee/organizations/pages/settings/attributes/attributes-edit-view.tsx b/packages/features/ee/organizations/pages/settings/attributes/attributes-edit-view.tsx
index 2550b8a6f6bc1f..60a5daa9f4bf65 100644
--- a/packages/features/ee/organizations/pages/settings/attributes/attributes-edit-view.tsx
+++ b/packages/features/ee/organizations/pages/settings/attributes/attributes-edit-view.tsx
@@ -6,7 +6,6 @@ import { useFormContext } from "react-hook-form";
import { z } from "zod";
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
-import SettingsLayout from "@calcom/features/settings/layouts/SettingsLayout";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, useMeta, showToast } from "@calcom/ui";
@@ -109,8 +108,4 @@ function EditAttributeHeader(props: { isPending: boolean }) {
);
}
-export function getLayout(page: React.ReactElement) {
- return
{page};
-}
-
export default CreateAttributesPage;
diff --git a/packages/features/ee/organizations/pages/settings/attributes/attributes-list-view.tsx b/packages/features/ee/organizations/pages/settings/attributes/attributes-list-view.tsx
index 41fe88b0aa2d53..00caf04f7cf53b 100644
--- a/packages/features/ee/organizations/pages/settings/attributes/attributes-list-view.tsx
+++ b/packages/features/ee/organizations/pages/settings/attributes/attributes-list-view.tsx
@@ -4,7 +4,6 @@ import type { Dispatch, SetStateAction } from "react";
import { useState } from "react";
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
-import SettingsLayout from "@calcom/features/settings/layouts/SettingsLayout";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
@@ -208,8 +207,4 @@ function ListAttributeHeader() {
);
}
-export function getLayout(page: React.ReactElement) {
- return
{page};
-}
-
export default OrganizationAttributesPage;
diff --git a/packages/features/ee/organizations/pages/settings/general.tsx b/packages/features/ee/organizations/pages/settings/general.tsx
index 6c1173c20f535e..1973a0f67294a9 100644
--- a/packages/features/ee/organizations/pages/settings/general.tsx
+++ b/packages/features/ee/organizations/pages/settings/general.tsx
@@ -28,18 +28,9 @@ import {
import { LockEventTypeSwitch } from "../components/LockEventTypeSwitch";
import { NoSlotsNotificationSwitch } from "../components/NoSlotsNotificationSwitch";
-const SkeletonLoader = ({
- title,
- description,
- isAppDir,
-}: {
- title: string;
- description: string;
- isAppDir?: boolean;
-}) => {
+const SkeletonLoader = ({ title, description }: { title: string; description: string }) => {
return (
- {!isAppDir ? : null}
@@ -58,7 +49,7 @@ interface GeneralViewProps {
localeProp: string;
}
-const OrgGeneralView = ({ isAppDir }: { isAppDir?: boolean }) => {
+const OrgGeneralView = () => {
const { t } = useLocale();
const router = useRouter();
const session = useSession();
@@ -92,7 +83,6 @@ const OrgGeneralView = ({ isAppDir }: { isAppDir?: boolean }) => {
currentOrg={currentOrg}
isAdminOrOwner={isAdminOrOwner}
localeProp={user?.locale ?? "en"}
- isAppDir={isAppDir}
/>
@@ -101,12 +91,7 @@ const OrgGeneralView = ({ isAppDir }: { isAppDir?: boolean }) => {
);
};
-const GeneralView = ({
- currentOrg,
- isAdminOrOwner,
- localeProp,
- isAppDir,
-}: GeneralViewProps & { isAppDir?: boolean }) => {
+const GeneralView = ({ currentOrg, isAdminOrOwner, localeProp }: GeneralViewProps) => {
const { t } = useLocale();
const mutation = trpc.viewer.organizations.update.useMutation({
@@ -165,13 +150,6 @@ const GeneralView = ({
weekStart: values.weekStart.value,
});
}}>
- {!isAppDir ? (
-
- ) : null}
{
+const MembersView = () => {
const { t } = useLocale();
const { data: currentOrg, isPending } = trpc.viewer.organizations.listCurrent.useQuery();
@@ -20,9 +20,6 @@ const MembersView = ({ isAppDir }: { isAppDir?: boolean }) => {
return (
- {!isAppDir ? (
-
- ) : null}
{!isPending && canLoggedInUserSeeMembers && }
{!canLoggedInUserSeeMembers && (
diff --git a/packages/features/ee/organizations/pages/settings/other-team-listing-view.tsx b/packages/features/ee/organizations/pages/settings/other-team-listing-view.tsx
index 40d75f0a57ddf6..4ac2a087cfffca 100644
--- a/packages/features/ee/organizations/pages/settings/other-team-listing-view.tsx
+++ b/packages/features/ee/organizations/pages/settings/other-team-listing-view.tsx
@@ -5,13 +5,10 @@ import { Meta } from "@calcom/ui";
import { OtherTeamsListing } from "./../components/OtherTeamsListing";
-const OtherTeamListingView = ({ isAppDir }: { isAppDir?: boolean }): React.ReactElement => {
+const OtherTeamListingView = (): React.ReactElement => {
const { t } = useLocale();
return (
<>
- {!isAppDir ? (
-
- ) : null}
>
);
diff --git a/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx b/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx
index 5636bc1068b818..ab569677060d27 100644
--- a/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx
+++ b/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx
@@ -12,7 +12,7 @@ import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback";
import { MembershipRole } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
-import { Meta, showToast, Button } from "@calcom/ui";
+import { showToast, Button } from "@calcom/ui";
import MakeTeamPrivateSwitch from "../../../teams/components/MakeTeamPrivateSwitch";
import MemberListItem from "../components/MemberListItem";
@@ -59,7 +59,37 @@ function MembersList(props: MembersListProps) {
);
}
-const MembersView = ({ isAppDir }: { isAppDir?: boolean }) => {
+export const memberInvitationModalRef = {
+ current: null as null | ((show: boolean) => void),
+};
+
+export const TeamMembersCTA = () => {
+ const { t } = useLocale();
+ const session = useSession();
+ const { data: currentOrg } = trpc.viewer.organizations.listCurrent.useQuery(undefined, {
+ enabled: !!session.data?.user?.org,
+ });
+
+ const isOrgAdminOrOwner =
+ currentOrg &&
+ (currentOrg.user.role === MembershipRole.OWNER || currentOrg.user.role === MembershipRole.ADMIN);
+
+ if (!isOrgAdminOrOwner) return null;
+
+ return (
+
+ );
+};
+
+const MembersView = () => {
const { t, i18n } = useLocale();
const router = useRouter();
const params = useParamsWithFallback();
@@ -71,9 +101,6 @@ const MembersView = ({ isAppDir }: { isAppDir?: boolean }) => {
const limit = 20;
const [showMemberInvitationModal, setShowMemberInvitationModal] = useState
(false);
- const { data: currentOrg } = trpc.viewer.organizations.listCurrent.useQuery(undefined, {
- enabled: !!session.data?.user?.org,
- });
const {
data: team,
isPending: isTeamLoading,
@@ -119,6 +146,13 @@ const MembersView = ({ isAppDir }: { isAppDir?: boolean }) => {
[router, otherMembersError, otherTeamError]
);
+ useEffect(() => {
+ memberInvitationModalRef.current = setShowMemberInvitationModal;
+ return () => {
+ memberInvitationModalRef.current = null;
+ };
+ }, []);
+
const isPending = isTeamLoading || isOrgListLoading;
const inviteMemberMutation = trpc.viewer.teams.inviteMember.useMutation({
onSuccess: () => {
@@ -129,33 +163,8 @@ const MembersView = ({ isAppDir }: { isAppDir?: boolean }) => {
},
});
- const isOrgAdminOrOwner =
- currentOrg &&
- (currentOrg.user.role === MembershipRole.OWNER || currentOrg.user.role === MembershipRole.ADMIN);
-
return (
<>
- {!isAppDir ? (
- setShowMemberInvitationModal(true)}
- data-testid="new-member-button">
- {t("add")}
-
- ) : (
- <>>
- )
- }
- />
- ) : null}
{!isPending && (
<>
diff --git a/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx b/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx
index 5becdbd1a5cd32..7ffb7f9ca9d194 100644
--- a/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx
+++ b/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx
@@ -54,7 +54,7 @@ const teamProfileFormSchema = z.object({
bio: z.string(),
});
-const OtherTeamProfileView = ({ isAppDir }: { isAppDir?: boolean }) => {
+const OtherTeamProfileView = () => {
const { t } = useLocale();
const router = useRouter();
const utils = trpc.useUtils();
@@ -169,7 +169,6 @@ const OtherTeamProfileView = ({ isAppDir }: { isAppDir?: boolean }) => {
return (
<>
- {!isAppDir ?
: null}
{!isPending ? (
<>
{isAdmin ? (
diff --git a/packages/features/ee/organizations/pages/settings/profile.tsx b/packages/features/ee/organizations/pages/settings/profile.tsx
index e1fc469e3b651a..c9f4276aed38f0 100644
--- a/packages/features/ee/organizations/pages/settings/profile.tsx
+++ b/packages/features/ee/organizations/pages/settings/profile.tsx
@@ -57,18 +57,9 @@ type FormValues = {
calVideoLogo: string | null;
};
-const SkeletonLoader = ({
- title,
- description,
- isAppDir,
-}: {
- title: string;
- description: string;
- isAppDir?: boolean;
-}) => {
+const SkeletonLoader = ({ title, description }: { title: string; description: string }) => {
return (
- {!isAppDir ? : null}
@@ -84,7 +75,7 @@ const SkeletonLoader = ({
);
};
-const OrgProfileView = ({ isAppDir }: { isAppDir?: boolean }) => {
+const OrgProfileView = () => {
const { t } = useLocale();
const router = useRouter();
@@ -110,9 +101,7 @@ const OrgProfileView = ({ isAppDir }: { isAppDir?: boolean }) => {
);
if (isPending || !orgBranding || !currentOrganisation) {
- return (
-
- );
+ return
;
}
const isOrgAdminOrOwner =
@@ -138,9 +127,6 @@ const OrgProfileView = ({ isAppDir }: { isAppDir?: boolean }) => {
return (
- {!isAppDir ? (
-
- ) : null}
<>
{isOrgAdminOrOwner ? (
<>
diff --git a/packages/features/ee/sso/page/orgs-sso-view.tsx b/packages/features/ee/sso/page/orgs-sso-view.tsx
index 35c45111878b6f..9cf310984c70c1 100644
--- a/packages/features/ee/sso/page/orgs-sso-view.tsx
+++ b/packages/features/ee/sso/page/orgs-sso-view.tsx
@@ -8,7 +8,7 @@ import { AppSkeletonLoader as SkeletonLoader, Meta } from "@calcom/ui";
import SSOConfiguration from "../components/SSOConfiguration";
-const SAMLSSO = ({ isAppDir }: { isAppDir?: boolean }) => {
+const SAMLSSO = () => {
const { t } = useLocale();
const { data, status } = useSession();
@@ -25,9 +25,6 @@ const SAMLSSO = ({ isAppDir }: { isAppDir?: boolean }) => {
return !!isAdminOrOwner ? (
- {!isAppDir ? (
-
- ) : null}
) : (
diff --git a/packages/features/settings/appDir/SettingsLayoutAppDirClient.tsx b/packages/features/settings/appDir/SettingsLayoutAppDirClient.tsx
index 6a2f2b061db6ca..52639c6e6726d3 100644
--- a/packages/features/settings/appDir/SettingsLayoutAppDirClient.tsx
+++ b/packages/features/settings/appDir/SettingsLayoutAppDirClient.tsx
@@ -672,6 +672,7 @@ export type SettingsLayoutProps = {
children: React.ReactNode;
currentOrg: Awaited> | null;
otherTeams: Awaited> | null;
+ containerClassName?: string;
} & ComponentProps;
export default function SettingsLayoutAppDirClient({
@@ -723,7 +724,8 @@ export default function SettingsLayoutAppDirClient({
setSideContainerOpen(!sideContainerOpen)} />
}>
-
diff --git a/turbo.json b/turbo.json
index 743703ad3810c0..f63f4916a394c2 100644
--- a/turbo.json
+++ b/turbo.json
@@ -243,7 +243,6 @@
"APP_ROUTER_EVENT_TYPES_ENABLED",
"APP_ROUTER_GETTING_STARTED_STEP_ENABLED",
"APP_ROUTER_SETTINGS_DEVELOPER_ENABLED",
- "APP_ROUTER_SETTINGS_ORG_ENABLED",
"APP_ROUTER_SETTINGS_TEAMS_ENABLED",
"APP_ROUTER_WORKFLOWS_ENABLED",
"APP_ROUTER_VIDEO_ENABLED",