Browse Source

feat(nc-gui): include updateComment in useExpandedFormStore.ts

pull/5341/head
Wing-Kam Wong 2 years ago
parent
commit
891d4abd0b
  1. 7
      packages/nc-gui/composables/useExpandedFormStore.ts

7
packages/nc-gui/composables/useExpandedFormStore.ts

@ -1,5 +1,5 @@
import { UITypes, ViewTypes } from 'nocodb-sdk' 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 type { Ref } from 'vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { import {
@ -229,6 +229,10 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
}) })
} }
const updateComment = async (auditId: string, audit: Partial<AuditType>) => {
return await $api.utils.commentUpdate(auditId, audit)
}
return { return {
...rowStore, ...rowStore,
commentsOnly, commentsOnly,
@ -247,6 +251,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
loadRow, loadRow,
primaryKey, primaryKey,
saveRowAndStay, saveRowAndStay,
updateComment,
} }
}, 'expanded-form-store') }, 'expanded-form-store')

Loading…
Cancel
Save