dont pass attribues and facetedTeamValues for platform (#21508)
This commit is contained in:
1 parent
bda963b851
commit
999882b795
3 files changed
+7
-23
No files matched your search
@@ -2,7 +2,6 @@ import { createRouterCaller } from "app/_trpc/context";
|
||||
import { _generateMetadata } from "app/_utils";
|
||||
|
||||
import PlatformMembersView from "@calcom/features/ee/platform/pages/settings/members";
|
||||
import { attributesRouter } from "@calcom/trpc/server/routers/viewer/attributes/_router";
|
||||
import { viewerOrganizationsRouter } from "@calcom/trpc/server/routers/viewer/organizations/_router";
|
||||
|
||||
export const generateMetadata = async () =>
|
||||
@@ -15,25 +14,10 @@ export const generateMetadata = async () =>
|
||||
);
|
||||
|
||||
const ServerPageWrapper = async () => {
|
||||
const [orgCaller, attributesCaller] = await Promise.all([
|
||||
createRouterCaller(viewerOrganizationsRouter),
|
||||
createRouterCaller(attributesRouter),
|
||||
]);
|
||||
const [org, teams, facetedTeamValues, attributes] = await Promise.all([
|
||||
orgCaller.listCurrent(),
|
||||
orgCaller.getTeams(),
|
||||
orgCaller.getFacetedValues(),
|
||||
attributesCaller.list(),
|
||||
]);
|
||||
const [orgCaller] = await Promise.all([createRouterCaller(viewerOrganizationsRouter)]);
|
||||
const [org, teams] = await Promise.all([orgCaller.listCurrent(), orgCaller.getTeams()]);
|
||||
|
||||
return (
|
||||
<PlatformMembersView
|
||||
org={org}
|
||||
teams={teams}
|
||||
facetedTeamValues={facetedTeamValues}
|
||||
attributes={attributes}
|
||||
/>
|
||||
);
|
||||
return <PlatformMembersView org={org} teams={teams} />;
|
||||
};
|
||||
|
||||
export default ServerPageWrapper;
|
||||
@@ -8,7 +8,7 @@ import NoPlatformPlan from "@calcom/web/components/settings/platform/dashboard/N
|
||||
import { useGetUserAttributes } from "@calcom/web/components/settings/platform/hooks/useGetUserAttributes";
|
||||
import { PlatformPricing } from "@calcom/web/components/settings/platform/pricing/platform-pricing/index";
|
||||
|
||||
const PlatformMembersView = (props: UserListTableProps) => {
|
||||
const PlatformMembersView = (props: Omit<UserListTableProps, "facetedTeamValues" | "attributes">) => {
|
||||
const { isUserLoading, isUserBillingDataLoading, isPlatformUser, isPaidUser, userBillingData, userOrgId } =
|
||||
useGetUserAttributes();
|
||||
const currentOrg = props.org;
|
||||
@@ -33,7 +33,7 @@ const PlatformMembersView = (props: UserListTableProps) => {
|
||||
/>
|
||||
);
|
||||
|
||||
return !isPlatformUser ? (
|
||||
return isPlatformUser ? (
|
||||
<div>{canLoggedInUserSeeMembers && <UserListTable {...props} />}</div>
|
||||
) : (
|
||||
<NoPlatformPlan />
|
||||
|
||||
@@ -109,8 +109,8 @@ function reducer(state: UserTableState, action: UserTableAction): UserTableState
|
||||
export type UserListTableProps = {
|
||||
org: RouterOutputs["viewer"]["organizations"]["listCurrent"];
|
||||
teams: RouterOutputs["viewer"]["organizations"]["getTeams"];
|
||||
facetedTeamValues: RouterOutputs["viewer"]["organizations"]["getFacetedValues"];
|
||||
attributes: RouterOutputs["viewer"]["attributes"]["list"];
|
||||
facetedTeamValues?: RouterOutputs["viewer"]["organizations"]["getFacetedValues"];
|
||||
attributes?: RouterOutputs["viewer"]["attributes"]["list"];
|
||||
};
|
||||
|
||||
export function UserListTable(props: UserListTableProps) {
|
||||
|
||||
Reference in new issue
Block a user