Browse Source

chore: lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4504/head
Pranav C 2 years ago
parent
commit
ae5b022efb
  1. 13
      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

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

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

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

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

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

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ColumnType, FormulaType, LinkToAnotherRecordType, LookupType, RollupType } from 'nocodb-sdk' import type { ColumnReqType, ColumnType, FormulaType, LinkToAnotherRecordType, LookupType, RollupType } from 'nocodb-sdk'
import { ColumnReqType, substituteColumnIdWithAliasInFormula } from 'nocodb-sdk' import { substituteColumnIdWithAliasInFormula } from 'nocodb-sdk'
import { import {
ColumnInj, ColumnInj,
IsFormInj, IsFormInj,
@ -100,10 +100,9 @@ const tooltipMsg = computed(() => {
return '' return ''
}) })
const columnOrder = ref<Pick<ColumnReqType, 'columnOrder'> | null>(null) const columnOrder = ref<Pick<ColumnReqType, 'columnOrder'> | null>(null)
const addField = async ( payload) => { const addField = async (payload) => {
columnOrder.value = payload columnOrder.value = payload
editColumnDropdown.value = true editColumnDropdown.value = true
} }
@ -130,7 +129,12 @@ const closeAddColumnMenu = () => {
<template v-if="!hideMenu"> <template v-if="!hideMenu">
<div class="flex-1" /> <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> </template>
<a-dropdown <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> <span class="text-capitalize !text-sm font-weight-normal">{{ $t('activity.filter') }}</span>
<MdiMenuDown class="text-grey" /> <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> </div>
</a-button> </a-button>
</div> </div>

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

@ -148,7 +148,7 @@ useMenuCloseOnEsc(open)
<MdiMenuDown class="text-grey" /> <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> </div>
</a-button> </a-button>
</div> </div>
@ -240,5 +240,4 @@ useMenuCloseOnEsc(open)
:deep(.ant-checkbox) { :deep(.ant-checkbox) {
@apply top-auto; @apply top-auto;
} }
</style> </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> <span class="text-capitalize !text-sm font-weight-normal">{{ $t('activity.sort') }}</span>
<MdiMenuDown class="text-grey" /> <MdiMenuDown class="text-grey" />
<span v-if="sorts?.length" class="nc-count-badge">{{ sorts.length }}</span>
<span class="nc-count-badge" v-if="sorts?.length">{{ sorts.length }}</span>
</div> </div>
</a-button> </a-button>
</div> </div>

Loading…
Cancel
Save