diff --git a/packages/nc-gui/components/workspace/AuditLogs.vue b/packages/nc-gui/components/workspace/AuditLogs.vue index defdbe0fe1..9daff9c0d2 100644 --- a/packages/nc-gui/components/workspace/AuditLogs.vue +++ b/packages/nc-gui/components/workspace/AuditLogs.vue @@ -40,7 +40,7 @@ const { bases, basesList } = storeToRefs(basesStore) const baseCollaborators = ref([]) const auditCollaborators = computed(() => { - return (auditLogsQuery.value.base ? baseCollaborators.value : collaborators.value) || [] + return (auditLogsQuery.value.baseId ? baseCollaborators.value : collaborators.value) || [] }) const collaboratorsMap = computed>(() => { @@ -136,10 +136,10 @@ async function loadAudits(page = currentPage.value, limit = currentLimit.value, const loadCollaborators = async () => { try { - if (!auditLogsQuery.value.base) return + if (!auditLogsQuery.value.baseId) return const { users } = await getBaseUsers({ - baseId: auditLogsQuery.value.base, + baseId: auditLogsQuery.value.baseId, }) baseCollaborators.value = users @@ -154,7 +154,7 @@ const handleRowClick = (audit: AuditType) => { } const handleUpdateBaseQuery = (baseId?: string, sourceId?: string) => { - auditLogsQuery.value.base = baseId + auditLogsQuery.value.baseId = baseId auditLogsQuery.value.sourceId = sourceId } @@ -271,9 +271,9 @@ const handleUpdateCustomDateRange = (value: string | null, field: 'startDate' | } watch( - () => auditLogsQuery.value.base, + () => auditLogsQuery.value.baseId, () => { - if (!auditLogsQuery.value.base) return + if (!auditLogsQuery.value.baseId) return loadCollaborators() }, @@ -284,7 +284,7 @@ watch( onMounted(async () => { if (props.baseId) { - auditLogsQuery.value.base = props.baseId + auditLogsQuery.value.baseId = props.baseId } if (props.sourceId) { @@ -435,8 +435,8 @@ onMounted(async () => {
Base: - - {{ (auditLogsQuery.base && bases.get(auditLogsQuery.base)?.title) || 'All' }} + + {{ (auditLogsQuery.baseId && bases.get(auditLogsQuery.baseId)?.title) || 'All' }}
@@ -483,7 +483,7 @@ onMounted(async () => { >
All Bases - +
@@ -509,7 +509,7 @@ onMounted(async () => {
- + diff --git a/packages/nc-gui/lib/types.ts b/packages/nc-gui/lib/types.ts index 19a7ae06a4..296514d74e 100644 --- a/packages/nc-gui/lib/types.ts +++ b/packages/nc-gui/lib/types.ts @@ -240,11 +240,9 @@ interface ImageCropperConfig { interface AuditLogsQuery { type?: AuditOperationTypes - subType?: AuditOperationSubTypes - base?: string - user?: string - search?: string + baseId?: string sourceId?: string + user?: string startDate?: string endDate?: string dateRange?: AuditLogsDateRange