From a24ef46d7d22285e3664a3b64995a2d05b263664 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Tue, 28 Jan 2025 20:44:45 +0100 Subject: [PATCH] requested changes --- .../organization/AuditLogsPage/components/LogsFilter.tsx | 7 ++++--- .../pages/organization/AuditLogsPage/components/types.tsx | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/organization/AuditLogsPage/components/LogsFilter.tsx b/frontend/src/pages/organization/AuditLogsPage/components/LogsFilter.tsx index 8c7ef3446..5c7e020b7 100644 --- a/frontend/src/pages/organization/AuditLogsPage/components/LogsFilter.tsx +++ b/frontend/src/pages/organization/AuditLogsPage/components/LogsFilter.tsx @@ -23,6 +23,7 @@ import { useGetAuditLogActorFilterOpts, useGetUserWorkspaces } from "@app/hooks/ import { eventToNameMap, userAgentTTypeoNameMap } from "@app/hooks/api/auditLogs/constants"; import { ActorType, EventType } from "@app/hooks/api/auditLogs/enums"; import { Actor } from "@app/hooks/api/auditLogs/types"; +import { ProjectType } from "@app/hooks/api/workspace/types"; import { AuditLogFilterFormData } from "./types"; @@ -103,7 +104,7 @@ export const LogsFilter = ({ }; const selectedEventTypes = watch("eventType") as EventType[] | undefined; - const selectedProjectId = watch("project")?.id; + const selectedProject = watch("project"); return (
({ name, id }))} + options={workspacesInOrg.map(({ name, id, type }) => ({ name, id, type }))} getOptionValue={(option) => option.id} getOptionLabel={(option) => option.name} /> @@ -142,7 +143,7 @@ export const LogsFilter = ({ )} /> )} - {selectedProjectId && ( + {selectedProject?.type === ProjectType.SecretManager && (