Browse Source

chore(gui): linting and code cleanup

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3569/head
Pranav C 2 years ago
parent
commit
184d0eb942
  1. 5
      packages/nc-gui/components/smartsheet/Grid.vue
  2. 4
      packages/nc-gui/components/tabs/Smartsheet.vue
  3. 2
      packages/nc-gui/components/virtual-cell/BelongsTo.vue
  4. 4
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

5
packages/nc-gui/components/smartsheet/Grid.vue

@ -329,7 +329,6 @@ const rowRefs = $ref<any[]>()
/** save/update records before unmounting the component */ /** save/update records before unmounting the component */
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
console.log(rowRefs)
let index = -1 let index = -1
for (const currentRow of data.value) { for (const currentRow of data.value) {
index++ index++
@ -518,10 +517,6 @@ onBeforeUnmount(async () => {
</template> </template>
</SmartsheetRow> </SmartsheetRow>
<!--
TODO: add relationType !== 'bt' ?
v1: <tr v-if="!isView && !isLocked && !isPublicView && isEditable && relationType !== 'bt'">
-->
<tr v-if="!isView && !isLocked && isUIAllowed('xcDatatableEditable') && !isSqlView"> <tr v-if="!isView && !isLocked && isUIAllowed('xcDatatableEditable') && !isSqlView">
<td <td
v-t="['c:row:add:grid-bottom']" v-t="['c:row:add:grid-bottom']"

4
packages/nc-gui/components/tabs/Smartsheet.vue

@ -33,10 +33,6 @@ const el = ref<typeof SmartsheetGrid>()
const fields = ref<ColumnType[]>([]) const fields = ref<ColumnType[]>([])
// const tabMeta = inject(
// TabMetaInj,
// computed(() => ({} as TabItem)),
// )
provide(TabMetaInj, ref(activeTab)) provide(TabMetaInj, ref(activeTab))
const meta = computed<TableType>(() => metas.value?.[activeTab?.id as string]) const meta = computed<TableType>(() => metas.value?.[activeTab?.id as string])

2
packages/nc-gui/components/virtual-cell/BelongsTo.vue

@ -24,7 +24,7 @@ const ListItems = defineAsyncComponent(() => import('./components/ListItems.vue'
const column = inject(ColumnInj)! const column = inject(ColumnInj)!
const reloadRowTrigger = inject(ReloadRowDataHookInj, createEventHook())! const reloadRowTrigger = inject(ReloadRowDataHookInj, createEventHook())
const cellValue = inject(CellValueInj, ref<any>(null)) const cellValue = inject(CellValueInj, ref<any>(null))

4
packages/nc-gui/components/virtual-cell/components/ListItems.vue

@ -116,8 +116,8 @@ watch(expandedFormDlg, (nexVal) => {
<div class="flex-1" /> <div class="flex-1" />
<MdiReload class="cursor-pointer text-gray-500 nc-reload" @click="loadChildrenExcludedList" /> <MdiReload class="cursor-pointer text-gray-500 nc-reload" @click="loadChildrenExcludedList" />
<!-- Add new record --> <!-- Add new record -->
<a-button v-if="!isPublic" type="primary" size="small" @click="expandedFormDlg = true" <a-button v-if="!isPublic" type="primary" size="small" @click="expandedFormDlg = true">
>{{ $t('activity.addNewRecord') }} {{ $t('activity.addNewRecord') }}
</a-button> </a-button>
</div> </div>
<template v-if="childrenExcludedList?.pageInfo?.totalRows"> <template v-if="childrenExcludedList?.pageInfo?.totalRows">

Loading…
Cancel
Save