Browse Source

chore: lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4504/head
Pranav C 2 years ago
parent
commit
ae5b022efb
  1. 17
      packages/nc-gui/components/smartsheet/header/Cell.vue
  2. 3
      packages/nc-gui/components/smartsheet/header/Menu.vue
  3. 14
      packages/nc-gui/components/smartsheet/header/VirtualCell.vue
  4. 2
      packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue
  5. 3
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
  6. 3
      packages/nc-gui/components/smartsheet/toolbar/SortListMenu.vue

17
packages/nc-gui/components/smartsheet/header/Cell.vue

@ -1,8 +1,6 @@
<script setup lang="ts">
import { ColumnReqType } from 'nocodb-sdk'
import type { ColumnType } from 'nocodb-sdk'
import type { ColumnReqType, ColumnType } from 'nocodb-sdk'
import { ColumnInj, IsFormInj, IsKanbanInj, inject, provide, ref, toRef, useUIPermission } from '#imports'
import { SmartsheetStoreEvents } from '~/lib'
const props = defineProps<{ column: ColumnType & { meta: any }; required?: boolean | number; hideMenu?: boolean }>()
@ -20,12 +18,11 @@ provide(ColumnInj, column)
const editColumnDropdown = ref(false)
const columnOrder = ref<Pick<ColumnReqType, 'columnOrder'> | null>(null)
const addField = async ( payload) => {
columnOrder.value = payload
editColumnDropdown.value = true
const addField = async (payload) => {
columnOrder.value = payload
editColumnDropdown.value = true
}
const closeAddColumnMenu = () => {
@ -54,7 +51,11 @@ const closeAddColumnMenu = () => {
<template v-if="!hideMenu">
<div class="flex-1" />
<LazySmartsheetHeaderMenu @add-column="addField" v-if="!isForm && isUIAllowed('edit-column')" @edit="editColumnDropdown = true" />
<LazySmartsheetHeaderMenu
v-if="!isForm && isUIAllowed('edit-column')"
@add-column="addField"
@edit="editColumnDropdown = true"
/>
</template>
<a-dropdown

3
packages/nc-gui/components/smartsheet/header/Menu.vue

@ -197,8 +197,7 @@ const hideField = async () => {
</script>
<template>
<a-dropdown v-if="!isLocked" placement="bottomRight" :trigger="['click']"
overlay-class-name="nc-dropdown-column-operations">
<a-dropdown v-if="!isLocked" placement="bottomRight" :trigger="['click']" overlay-class-name="nc-dropdown-column-operations">
<MdiMenuDown class="h-full text-grey nc-ui-dt-dropdown cursor-pointer outline-0" />
<template #overlay>

14
packages/nc-gui/components/smartsheet/header/VirtualCell.vue

@ -1,6 +1,6 @@
<script setup lang="ts">
import type { ColumnType, FormulaType, LinkToAnotherRecordType, LookupType, RollupType } from 'nocodb-sdk'
import { ColumnReqType, substituteColumnIdWithAliasInFormula } from 'nocodb-sdk'
import type { ColumnReqType, ColumnType, FormulaType, LinkToAnotherRecordType, LookupType, RollupType } from 'nocodb-sdk'
import { substituteColumnIdWithAliasInFormula } from 'nocodb-sdk'
import {
ColumnInj,
IsFormInj,
@ -100,10 +100,9 @@ const tooltipMsg = computed(() => {
return ''
})
const columnOrder = ref<Pick<ColumnReqType, 'columnOrder'> | null>(null)
const addField = async ( payload) => {
const addField = async (payload) => {
columnOrder.value = payload
editColumnDropdown.value = true
}
@ -130,7 +129,12 @@ const closeAddColumnMenu = () => {
<template v-if="!hideMenu">
<div class="flex-1" />
<LazySmartsheetHeaderMenu @add-column="addField" v-if="!isForm && isUIAllowed('edit-column')" :virtual="true" @edit="editColumnDropdown = true" />
<LazySmartsheetHeaderMenu
v-if="!isForm && isUIAllowed('edit-column')"
:virtual="true"
@add-column="addField"
@edit="editColumnDropdown = true"
/>
</template>
<a-dropdown

2
packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue

@ -79,7 +79,7 @@ useMenuCloseOnEsc(open)
<span class="text-capitalize !text-sm font-weight-normal">{{ $t('activity.filter') }}</span>
<MdiMenuDown class="text-grey" />
<span class="nc-count-badge" v-if="filtersLength">{{ filtersLength }}</span>
<span v-if="filtersLength" class="nc-count-badge">{{ filtersLength }}</span>
</div>
</a-button>
</div>

3
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -148,7 +148,7 @@ useMenuCloseOnEsc(open)
<MdiMenuDown class="text-grey" />
<span class="nc-count-badge" v-if="numberOfHiddenFields">{{ numberOfHiddenFields }}</span>
<span v-if="numberOfHiddenFields" class="nc-count-badge">{{ numberOfHiddenFields }}</span>
</div>
</a-button>
</div>
@ -240,5 +240,4 @@ useMenuCloseOnEsc(open)
:deep(.ant-checkbox) {
@apply top-auto;
}
</style>

3
packages/nc-gui/components/smartsheet/toolbar/SortListMenu.vue

@ -64,8 +64,7 @@ useMenuCloseOnEsc(open)
<span class="text-capitalize !text-sm font-weight-normal">{{ $t('activity.sort') }}</span>
<MdiMenuDown class="text-grey" />
<span class="nc-count-badge" v-if="sorts?.length">{{ sorts.length }}</span>
<span v-if="sorts?.length" class="nc-count-badge">{{ sorts.length }}</span>
</div>
</a-button>
</div>

Loading…
Cancel
Save