From 891d4abd0b9caf6b49a477b930c215b9b4f414b9 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 22 Mar 2023 20:22:59 +0800 Subject: [PATCH] feat(nc-gui): include updateComment in useExpandedFormStore.ts --- packages/nc-gui/composables/useExpandedFormStore.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/composables/useExpandedFormStore.ts b/packages/nc-gui/composables/useExpandedFormStore.ts index 0f2f4f4cf6..a3f02c0f9b 100644 --- a/packages/nc-gui/composables/useExpandedFormStore.ts +++ b/packages/nc-gui/composables/useExpandedFormStore.ts @@ -1,5 +1,5 @@ import { UITypes, ViewTypes } from 'nocodb-sdk' -import type { ColumnType, TableType } from 'nocodb-sdk' +import type { AuditType, ColumnType, TableType } from 'nocodb-sdk' import type { Ref } from 'vue' import dayjs from 'dayjs' import { @@ -229,6 +229,10 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m }) } + const updateComment = async (auditId: string, audit: Partial) => { + return await $api.utils.commentUpdate(auditId, audit) + } + return { ...rowStore, commentsOnly, @@ -247,6 +251,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m loadRow, primaryKey, saveRowAndStay, + updateComment, } }, 'expanded-form-store')