Browse Source

fix: Made audit acc to design

pull/6729/head
Muhammed Mustafa 1 year ago
parent
commit
0b20f23b3e
  1. 20
      packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

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

@ -75,7 +75,7 @@ onKeyStroke('Enter', (event) => {
})
const comments = computed(() => commentsAndLogs.value.filter((log) => log.op_type === 'COMMENT'))
const audits = computed(() => commentsAndLogs.value.filter((log) => log.op_type !== 'COMMENT'))
const audits = computed(() => commentsAndLogs.value.filter((log) => log.op_type !== 'COMMENT' && log.details))
function editComment(log: AuditType) {
editLog.value = log
@ -176,7 +176,7 @@ const onClickAudit = () => {
<div
class="h-[calc(100%-4rem)]"
:class="{
'pb-2': tab !== 'comments' && !appInfo.ee,
'pb-1': tab !== 'comments' && !appInfo.ee,
}"
>
<div v-if="isExpandedFormLoading" class="flex flex-col h-full">
@ -261,7 +261,7 @@ const onClickAudit = () => {
</div>
</div>
</div>
<div v-if="tab === 'audits'" ref="commentsWrapperEl" class="flex flex-col h-full pl-2 pr-1 pt-2 nc-scrollbar-md space-y-2">
<div v-if="tab === 'audits'" ref="commentsWrapperEl" class="flex flex-col h-full nc-scrollbar-md !overflow-y-auto">
<template v-if="audits.length === 0">
<div class="flex flex-col text-center justify-center h-full">
<div class="text-center text-3xl text-gray-600">
@ -270,8 +270,8 @@ const onClickAudit = () => {
<div class="font-bold text-center my-1 text-gray-600">See changes to this record</div>
</div>
</template>
<div v-for="log of audits" :key="log.id">
<div v-if="log.details" class="bg-white rounded-xl border-1 gap-3 border-gray-200">
<div v-for="log of audits" :key="log.id" class="nc-audit-item">
<div class="flex flex-col p-4 gap-3">
<div class="flex justify-between">
<div class="flex items-center gap-2">
@ -293,13 +293,21 @@ const onClickAudit = () => {
</div>
</div>
</div>
</div>
</template>
<style scoped>
.tab {
@apply max-w-1/2;
}
.nc-audit-item {
@apply border-b-1 gap-3 border-gray-200;
}
.nc-audit-item:last-child {
@apply border-b-0;
}
.tab .tab-title {
@apply min-w-0 flex justify-center gap-2 font-semibold items-center;
word-break: 'keep-all';

Loading…
Cancel
Save