Browse Source

chore(nc-gui): lint

pull/8836/head
Ramesh Mane 1 week ago
parent
commit
a2650724c6
  1. 10
      packages/nc-gui/components/workspace/AuditLogs.vue
  2. 11
      packages/nc-gui/store/workspace.ts

10
packages/nc-gui/components/workspace/AuditLogs.vue

@ -23,7 +23,6 @@ const workspaceStore = useWorkspace()
const { loadAudits: _loadAudits } = workspaceStore
const {
collaborators,
audits,
auditLogsQuery,
auditCurrentLimit: currentLimit,
@ -35,12 +34,12 @@ const basesStore = useBases()
const { getBaseUsers, loadProjects } = basesStore
const { bases, basesList } = storeToRefs(basesStore)
const { bases } = storeToRefs(basesStore)
const localCollaborators = ref<User[] | UserType[]>([])
const collaboratorsMap = computed<Map<string, (WorkspaceUserType & { id: string }) | User | UserType>>(() => {
const map = new Map<string, WorkspaceUserType & { id: string }>()
const map = new Map()
localCollaborators.value?.forEach((coll) => {
if (coll?.email) {
@ -62,10 +61,7 @@ const tableWrapper = ref<HTMLDivElement>()
async function loadAudits(page = currentPage.value, limit = currentLimit.value, updateCurrentPage = true) {
try {
if (
(isEeUI && isUIAllowed('workspaceAuditList') && !props.workspaceId) ||
(!isUIAllowed('workspaceAuditList') && !props.baseId)
) {
if ((!isUIAllowed('workspaceAuditList') && !props.baseId) || (!isUIAllowed('baseAuditList') && props.baseId)) {
return
}

11
packages/nc-gui/store/workspace.ts

@ -5,18 +5,13 @@ import { isString } from '@vue/shared'
import type { AuditLogsQuery } from '~/lib/types'
const defaultAuditLogsQuery = {
type: undefined,
baseId: undefined,
sourceId: undefined,
user: undefined,
startDate: undefined,
endData: undefined,
dateRangeLabel: undefined,
orderBy: {
created_at: 'desc',
user: undefined,
},
} as AuditLogsQuery
} as Partial<AuditLogsQuery>
export const useWorkspace = defineStore('workspaceStore', () => {
const basesStore = useBases()
@ -228,7 +223,7 @@ export const useWorkspace = defineStore('workspaceStore', () => {
}
}
const auditLogsQuery = ref<AuditLogsQuery>(defaultAuditLogsQuery)
const auditLogsQuery = ref<Partial<AuditLogsQuery>>(defaultAuditLogsQuery)
const audits = ref<null | Array<AuditType>>(null)
@ -239,7 +234,7 @@ export const useWorkspace = defineStore('workspaceStore', () => {
const auditCurrentLimit = ref(25)
const loadAudits = async (
workspaceId?: string,
_workspaceId?: string,
page: number = auditCurrentPage.value,
limit: number = auditCurrentLimit.value,
) => {

Loading…
Cancel
Save