Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: show insert audits

Raju Udava97c531df98c1
diff --git a/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/Audits.vue b/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/Audits.vue
index cce582f637..623dcb04b2 100644
--- a/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/Audits.vue
+++ b/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/Audits.vue
@@ -166,7 +166,15 @@ function isV0Audit(audit: AuditType) {
{{ audit.description }}
</div>
</div>
- <div v-else-if="['DATA_INSERT', 'DATA_BULK_INSERT'].includes(audit?.op_type)" class="pl-9">created the record.</div>
+ <template v-else-if="['DATA_INSERT', 'DATA_BULK_INSERT'].includes(audit?.op_type)">
+ <div class="pl-9">created the record.</div>
+ <div
+ v-if="safeJsonParse(audit.details)?.data && Object.keys(safeJsonParse(audit.details)?.column_meta || {}).length"
+ class="ml-9 rounded-lg border-1 border-nc-border-gray-medium bg-nc-bg-gray-extralight divide-y"
+ >
+ <SmartsheetExpandedFormSidebarAuditMiniItem :audit="audit" />
+ </div>
+ </template>
<div v-else-if="['DATA_LINK', 'DATA_UNLINK'].includes(audit?.op_type)" class="pl-9">
<div class="rounded-lg border-1 border-nc-border-gray-medium bg-nc-bg-gray-extralight divide-y py-2 px-3">
<div class="flex items-center gap-2 !text-nc-content-gray-subtle2 text-xs nc-audit-mini-item-header mb-3">
diff --git a/packages/nc-gui/composables/useExpandedFormStore.ts b/packages/nc-gui/composables/useExpandedFormStore.ts
index 869c478fa9..d8498ff156 100644
--- a/packages/nc-gui/composables/useExpandedFormStore.ts
+++ b/packages/nc-gui/composables/useExpandedFormStore.ts
@@ -253,9 +253,6 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState(
},
)
- // Skip insert as it will be first for all
- response.list = response.list.filter((audit) => !audit?.op_type.includes('INSERT'))
-
const lastRecord = response.list?.[response.list.length - 1]
if (lastRecord) {