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 */
onBeforeUnmount(async () => {
console.log(rowRefs)
let index = -1
for (const currentRow of data.value) {
index++
@ -518,10 +517,6 @@ onBeforeUnmount(async () => {
</template>
</SmartsheetRow>
<!--
TODO: add relationType !== 'bt' ?
v1: <tr v-if="!isView && !isLocked && !isPublicView && isEditable && relationType !== 'bt'">
-->
<tr v-if="!isView && !isLocked && isUIAllowed('xcDatatableEditable') && !isSqlView">
<td
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 tabMeta = inject(
// TabMetaInj,
// computed(() => ({} as TabItem)),
// )
provide(TabMetaInj, ref(activeTab))
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 reloadRowTrigger = inject(ReloadRowDataHookInj, createEventHook())!
const reloadRowTrigger = inject(ReloadRowDataHookInj, createEventHook())
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" />
<MdiReload class="cursor-pointer text-gray-500 nc-reload" @click="loadChildrenExcludedList" />
<!-- Add new record -->
<a-button v-if="!isPublic" type="primary" size="small" @click="expandedFormDlg = true"
>{{ $t('activity.addNewRecord') }}
<a-button v-if="!isPublic" type="primary" size="small" @click="expandedFormDlg = true">
{{ $t('activity.addNewRecord') }}
</a-button>
</div>
<template v-if="childrenExcludedList?.pageInfo?.totalRows">

Loading…
Cancel
Save