From 6093641c6aff3d6ee4d93d29dbe1c6f4ba3368d4 Mon Sep 17 00:00:00 2001
From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
Date: Mon, 24 Jun 2024 08:28:53 +0000
Subject: [PATCH] fix(nc-gui): some pr review changes
---
.../nc-gui/components/workspace/AuditLogs.vue | 135 +++++++++++++-----
packages/nc-gui/components/workspace/View.vue | 8 +-
2 files changed, 107 insertions(+), 36 deletions(-)
diff --git a/packages/nc-gui/components/workspace/AuditLogs.vue b/packages/nc-gui/components/workspace/AuditLogs.vue
index db9fa7bb4f..3ba2d2e821 100644
--- a/packages/nc-gui/components/workspace/AuditLogs.vue
+++ b/packages/nc-gui/components/workspace/AuditLogs.vue
@@ -182,6 +182,8 @@ const handleUpdateBaseQuery = (baseId?: string, sourceId?: string) => {
}
const updateOrderBy = (field: 'created_at' | 'user') => {
+ if (!audits.value?.length) return
+
if (auditLogsQuery.value.orderBy?.[field] === 'asc') {
auditLogsQuery.value.orderBy[field] = 'desc'
} else if (auditLogsQuery.value.orderBy?.[field] === 'desc') {
@@ -335,12 +337,15 @@ onMounted(async () => {
Audit Logs
: {{ bases.get(baseId)?.title }}
-