Skip to content

Commit 999882b

Browse files
authored
dont pass attribues and facetedTeamValues for platform (calcom#21508)
1 parent bda963b commit 999882b

3 files changed

Lines changed: 7 additions & 23 deletions

File tree

apps/web/app/(use-page-wrapper)/settings/platform/members/page.tsx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createRouterCaller } from "app/_trpc/context";
22
import { _generateMetadata } from "app/_utils";
33

44
import PlatformMembersView from "@calcom/features/ee/platform/pages/settings/members";
5-
import { attributesRouter } from "@calcom/trpc/server/routers/viewer/attributes/_router";
65
import { viewerOrganizationsRouter } from "@calcom/trpc/server/routers/viewer/organizations/_router";
76

87
export const generateMetadata = async () =>
@@ -15,25 +14,10 @@ export const generateMetadata = async () =>
1514
);
1615

1716
const ServerPageWrapper = async () => {
18-
const [orgCaller, attributesCaller] = await Promise.all([
19-
createRouterCaller(viewerOrganizationsRouter),
20-
createRouterCaller(attributesRouter),
21-
]);
22-
const [org, teams, facetedTeamValues, attributes] = await Promise.all([
23-
orgCaller.listCurrent(),
24-
orgCaller.getTeams(),
25-
orgCaller.getFacetedValues(),
26-
attributesCaller.list(),
27-
]);
17+
const [orgCaller] = await Promise.all([createRouterCaller(viewerOrganizationsRouter)]);
18+
const [org, teams] = await Promise.all([orgCaller.listCurrent(), orgCaller.getTeams()]);
2819

29-
return (
30-
<PlatformMembersView
31-
org={org}
32-
teams={teams}
33-
facetedTeamValues={facetedTeamValues}
34-
attributes={attributes}
35-
/>
36-
);
20+
return <PlatformMembersView org={org} teams={teams} />;
3721
};
3822

3923
export default ServerPageWrapper;

packages/features/ee/platform/pages/settings/members.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import NoPlatformPlan from "@calcom/web/components/settings/platform/dashboard/N
88
import { useGetUserAttributes } from "@calcom/web/components/settings/platform/hooks/useGetUserAttributes";
99
import { PlatformPricing } from "@calcom/web/components/settings/platform/pricing/platform-pricing/index";
1010

11-
const PlatformMembersView = (props: UserListTableProps) => {
11+
const PlatformMembersView = (props: Omit<UserListTableProps, "facetedTeamValues" | "attributes">) => {
1212
const { isUserLoading, isUserBillingDataLoading, isPlatformUser, isPaidUser, userBillingData, userOrgId } =
1313
useGetUserAttributes();
1414
const currentOrg = props.org;
@@ -33,7 +33,7 @@ const PlatformMembersView = (props: UserListTableProps) => {
3333
/>
3434
);
3535

36-
return !isPlatformUser ? (
36+
return isPlatformUser ? (
3737
<div>{canLoggedInUserSeeMembers && <UserListTable {...props} />}</div>
3838
) : (
3939
<NoPlatformPlan />

packages/features/users/components/UserTable/UserListTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ function reducer(state: UserTableState, action: UserTableAction): UserTableState
109109
export type UserListTableProps = {
110110
org: RouterOutputs["viewer"]["organizations"]["listCurrent"];
111111
teams: RouterOutputs["viewer"]["organizations"]["getTeams"];
112-
facetedTeamValues: RouterOutputs["viewer"]["organizations"]["getFacetedValues"];
113-
attributes: RouterOutputs["viewer"]["attributes"]["list"];
112+
facetedTeamValues?: RouterOutputs["viewer"]["organizations"]["getFacetedValues"];
113+
attributes?: RouterOutputs["viewer"]["attributes"]["list"];
114114
};
115115

116116
export function UserListTable(props: UserListTableProps) {

0 commit comments

Comments
 (0)