Browse Source

fix: Enabled comment edit for OSS

pull/6490/head
Muhammed Mustafa 12 months ago
parent
commit
95f4e5d2fc
  1. 10
      packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

10
packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

@ -16,6 +16,8 @@ const tab = ref<'comments' | 'audits'>('comments')
const { isUIAllowed } = useRoles()
const { appInfo } = useGlobal()
const hasEditPermission = computed(() => isUIAllowed('commentEdit'))
const editLog = ref<AuditType>()
@ -80,7 +82,7 @@ function editComment(log: AuditType) {
const value = computed({
get() {
return editLog.value.description.substring(editLog.value.description.indexOf(':') + 1) ?? ''
return editLog.value?.description?.substring(editLog.value?.description?.indexOf(':') + 1) ?? ''
},
set(val) {
if (!editLog.value) return
@ -167,15 +169,15 @@ const processedAudit = (log: string) => {
</div>
</div>
</div>
<!-- <NcButton
v-if="log.user === user.email && !editLog"
<NcButton
v-if="log.user === user!.email && !editLog && !appInfo.ee"
type="secondary"
class="!px-2 opacity-0 group-hover:opacity-100 transition-all"
size="sm"
@click="editComment(log)"
>
<Icon class="iconify text-gray-800" icon="lucide:pen" />
</NcButton> -->
</NcButton>
</div>
<textarea
v-if="log.id === editLog?.id"

Loading…
Cancel
Save