diff --git a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserAuditLogsSection.tsx b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserAuditLogsSection.tsx
index 16540a8cf..1736e8333 100644
--- a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserAuditLogsSection.tsx
+++ b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserAuditLogsSection.tsx
@@ -1,9 +1,10 @@
import { useState } from "react";
+import Link from "next/link";
import { faFilter } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { IconButton, Tooltip } from "@app/components/v2";
-import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context";
+import { EmptyState, IconButton, Tooltip } from "@app/components/v2";
+import { OrgPermissionActions, OrgPermissionSubjects, useSubscription } from "@app/context";
import { withPermission } from "@app/hoc";
import { OrgUser } from "@app/hooks/api/types";
import { LogsSection } from "@app/views/Project/AuditLogsPage/components";
@@ -15,8 +16,10 @@ type Props = {
export const UserAuditLogsSection = withPermission(
({ orgMembership }: Props) => {
const [showFilter, setShowFilter] = useState(false);
+ const { subscription, isLoading } = useSubscription();
- return (
+ // eslint-disable-next-line no-nested-ternary
+ return subscription?.auditLogs ? (
{
- handlePopUpOpen("userGroupsProjects", {
- groupSlug: group.slug,
- username: orgMembership.user.username,
- group
- } as UserGroupsProjectsModalData);
- }}
>
| {group.name} |
-
- {group.projectMemberships.length} Project
- {group.projectMemberships.length > 1 || group.projectMemberships.length === 0 ? "s" : ""}
- |
{true && (
diff --git a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsSection.tsx b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsSection.tsx
index ace999286..41340aec4 100644
--- a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsSection.tsx
+++ b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsSection.tsx
@@ -6,7 +6,6 @@ import { useRemoveUserFromGroup } from "@app/hooks/api";
import { OrgUser } from "@app/hooks/api/users/types";
import { usePopUp } from "@app/hooks/usePopUp";
-import { UserGroupsProjectsModal } from "./UserGroupProjectsModal";
import { UserGroupsTable } from "./UserGroupsTable";
type Props = {
@@ -15,8 +14,7 @@ type Props = {
export const UserGroupsSection = ({ orgMembership }: Props) => {
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
- "removeUserFromGroup",
- "userGroupsProjects"
+ "removeUserFromGroup"
] as const);
const { mutateAsync: removeUserFromGroup } = useRemoveUserFromGroup();
@@ -65,8 +63,6 @@ export const UserGroupsSection = ({ orgMembership }: Props) => {
return handleRemoveUserFromGroup(popupData.groupSlug);
}}
/>
-
-
>
);
};
diff --git a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsTable.tsx b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsTable.tsx
index 7cf1ff225..15299da26 100644
--- a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsTable.tsx
+++ b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserGroupsTable.tsx
@@ -9,10 +9,7 @@ import { UserGroupsRow } from "./UserGroupsRow";
type Props = {
orgMembership: OrgUser;
- handlePopUpOpen: (
- popUpName: keyof UsePopUpState<["removeUserFromGroup", "userGroupsProjects"]>,
- data?: {}
- ) => void;
+ handlePopUpOpen: (popUpName: keyof UsePopUpState<["removeUserFromGroup"]>, data?: {}) => void;
};
export const UserGroupsTable = ({ handlePopUpOpen, orgMembership }: Props) => {
@@ -24,14 +21,12 @@ export const UserGroupsTable = ({ handlePopUpOpen, orgMembership }: Props) => {
| Name |
- Projects |
|
|
{groups?.map((group) => (