mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 21:40:31 +00:00
Requested changes
This commit is contained in:
@@ -231,7 +231,7 @@ export const LogsFilter = ({
|
||||
)}
|
||||
/>
|
||||
|
||||
{isOrgAuditLogs && workspaces.length && (
|
||||
{isOrgAuditLogs && workspaces.length > 0 && (
|
||||
<Controller
|
||||
control={control}
|
||||
name="projectId"
|
||||
|
||||
@@ -41,8 +41,16 @@ export const LogsTable = ({
|
||||
}: Props) => {
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
|
||||
// Determine the project ID for filtering
|
||||
const filterProjectId =
|
||||
filter?.projectId ?? (!isOrgAuditLogs ? currentWorkspace?.id ?? "" : null);
|
||||
// Use the projectId from the filter if it exists
|
||||
filter?.projectId ??
|
||||
// Otherwise, if we're not looking at org-wide audit logs
|
||||
(!isOrgAuditLogs
|
||||
? // Use the current workspace ID (or an empty string if that's null)
|
||||
currentWorkspace?.id ?? ""
|
||||
: // For org-wide audit logs, use null (no specific project filter)
|
||||
null);
|
||||
|
||||
const { data, isLoading, isFetchingNextPage, hasNextPage, fetchNextPage } = useGetAuditLogs(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user