diff --git a/packages/nc-gui/components/workspace/AuditLogs.vue b/packages/nc-gui/components/workspace/AuditLogs.vue index 1fd97a573a..fa140be9b2 100644 --- a/packages/nc-gui/components/workspace/AuditLogs.vue +++ b/packages/nc-gui/components/workspace/AuditLogs.vue @@ -23,7 +23,6 @@ const workspaceStore = useWorkspace() const { loadAudits: _loadAudits } = workspaceStore const { - collaborators, audits, auditLogsQuery, auditCurrentLimit: currentLimit, @@ -35,12 +34,12 @@ const basesStore = useBases() const { getBaseUsers, loadProjects } = basesStore -const { bases, basesList } = storeToRefs(basesStore) +const { bases } = storeToRefs(basesStore) const localCollaborators = ref([]) const collaboratorsMap = computed>(() => { - const map = new Map() + const map = new Map() localCollaborators.value?.forEach((coll) => { if (coll?.email) { @@ -62,10 +61,7 @@ const tableWrapper = ref() async function loadAudits(page = currentPage.value, limit = currentLimit.value, updateCurrentPage = true) { try { - if ( - (isEeUI && isUIAllowed('workspaceAuditList') && !props.workspaceId) || - (!isUIAllowed('workspaceAuditList') && !props.baseId) - ) { + if ((!isUIAllowed('workspaceAuditList') && !props.baseId) || (!isUIAllowed('baseAuditList') && props.baseId)) { return } diff --git a/packages/nc-gui/store/workspace.ts b/packages/nc-gui/store/workspace.ts index f587c3289c..bc06d9679a 100644 --- a/packages/nc-gui/store/workspace.ts +++ b/packages/nc-gui/store/workspace.ts @@ -5,18 +5,13 @@ import { isString } from '@vue/shared' import type { AuditLogsQuery } from '~/lib/types' const defaultAuditLogsQuery = { - type: undefined, baseId: undefined, sourceId: undefined, - user: undefined, - startDate: undefined, - endData: undefined, - dateRangeLabel: undefined, orderBy: { created_at: 'desc', user: undefined, }, -} as AuditLogsQuery +} as Partial export const useWorkspace = defineStore('workspaceStore', () => { const basesStore = useBases() @@ -228,7 +223,7 @@ export const useWorkspace = defineStore('workspaceStore', () => { } } - const auditLogsQuery = ref(defaultAuditLogsQuery) + const auditLogsQuery = ref>(defaultAuditLogsQuery) const audits = ref>(null) @@ -239,7 +234,7 @@ export const useWorkspace = defineStore('workspaceStore', () => { const auditCurrentLimit = ref(25) const loadAudits = async ( - workspaceId?: string, + _workspaceId?: string, page: number = auditCurrentPage.value, limit: number = auditCurrentLimit.value, ) => {