|
|
@ -10,6 +10,7 @@ interface Props { |
|
|
|
workspaceId?: string |
|
|
|
workspaceId?: string |
|
|
|
baseId?: string |
|
|
|
baseId?: string |
|
|
|
sourceId?: string |
|
|
|
sourceId?: string |
|
|
|
|
|
|
|
bordered?: boolean |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Props>() |
|
|
|
const props = defineProps<Props>() |
|
|
@ -189,7 +190,7 @@ const updateOrderBy = (field: 'created_at' | 'user') => { |
|
|
|
auditLogsQuery.value.orderBy[field] = 'asc' |
|
|
|
auditLogsQuery.value.orderBy[field] = 'asc' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
loadAudits() |
|
|
|
loadAudits(undefined, undefined, false) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const handleCloseDropdown = (field: 'user' | 'base' | 'type' | 'dateRange') => { |
|
|
|
const handleCloseDropdown = (field: 'user' | 'base' | 'type' | 'dateRange') => { |
|
|
@ -724,18 +725,19 @@ onMounted(async () => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<template v-if="appInfo.auditEnabled"> |
|
|
|
<template v-if="appInfo.auditEnabled"> |
|
|
|
<div |
|
|
|
<div |
|
|
|
class="relative" |
|
|
|
class="table-container relative" |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|
'h-[calc(100%_-_92px)] ': baseId, |
|
|
|
'h-[calc(100%_-_92px)] ': baseId, |
|
|
|
'h-[calc(100%_-_140px)]': !baseId, |
|
|
|
'h-[calc(100%_-_140px)]': !baseId, |
|
|
|
|
|
|
|
'bordered': bordered, |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="table-wrapper max-h-[calc(100%_-_40px)] overflow-auto nc-scrollbar-thin relative"> |
|
|
|
<div class="table-wrapper h-full max-h-[calc(100%_-_40px)] overflow-auto nc-scrollbar-thin relative"> |
|
|
|
<div class="nc-audit-logs-table table h-full relative"> |
|
|
|
<div class="nc-audit-logs-table table h-full relative"> |
|
|
|
<div class="thead sticky top-0"> |
|
|
|
<div class="thead sticky top-0"> |
|
|
|
<div class="tr"> |
|
|
|
<div class="tr"> |
|
|
|
<div class="th cell-user !hover:bg-gray-100 select-none cursor-pointer" @click="updateOrderBy('user')"> |
|
|
|
<div class="th cell-user !hover:bg-gray-100 select-none cursor-pointer" @click="updateOrderBy('user')"> |
|
|
|
<div class="flex items-center gap-3"> |
|
|
|
<div class="flex items-center gap-3 sticky left-0"> |
|
|
|
<div>User</div> |
|
|
|
<div>User</div> |
|
|
|
<GeneralIcon |
|
|
|
<GeneralIcon |
|
|
|
v-if="auditLogsQuery.orderBy?.user" |
|
|
|
v-if="auditLogsQuery.orderBy?.user" |
|
|
@ -874,17 +876,15 @@ onMounted(async () => { |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex justify-between items-center w-full px-6"> |
|
|
|
<div class="flex justify-between items-center w-full px-6"> |
|
|
|
<div> </div> |
|
|
|
<div> </div> |
|
|
|
<template v-if="+totalRows > currentLimit"> |
|
|
|
<NcPagination |
|
|
|
<NcPagination |
|
|
|
v-model:current="currentPage" |
|
|
|
v-model:current="currentPage" |
|
|
|
v-model:page-size="currentLimit" |
|
|
|
v-model:page-size="currentLimit" |
|
|
|
:total="+totalRows" |
|
|
|
:total="+totalRows" |
|
|
|
show-size-changer |
|
|
|
show-size-changer |
|
|
|
:use-stored-page-size="false" |
|
|
|
:use-stored-page-size="false" |
|
|
|
@update:current="loadAudits(undefined, undefined, false)" |
|
|
|
@update:current="loadAudits(undefined, undefined, false)" |
|
|
|
@update:page-size="loadAudits(currentPage, $event, false)" |
|
|
|
@update:page-size="loadAudits(currentPage, $event, false)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div class="text-gray-500 text-xs">{{ totalRows }} {{ totalRows === 1 ? 'record' : 'records' }}</div> |
|
|
|
<div class="text-gray-500 text-xs">{{ totalRows }} {{ totalRows === 1 ? 'record' : 'records' }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -996,6 +996,12 @@ onMounted(async () => { |
|
|
|
@apply !w-full; |
|
|
|
@apply !w-full; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.table-container { |
|
|
|
|
|
|
|
&.bordered { |
|
|
|
|
|
|
|
@apply border-1 border-gray-200 rounded-xl overflow-hidden; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-audit-logs-table { |
|
|
|
.nc-audit-logs-table { |
|
|
|
.thead { |
|
|
|
.thead { |
|
|
|
.th { |
|
|
|
.th { |
|
|
|