|
|
@ -66,7 +66,7 @@ watch( |
|
|
|
{ immediate: true }, |
|
|
|
{ immediate: true }, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const isAnyFieldHidden = computed(() => filteredFieldList.value?.some((field) => !field.show)) |
|
|
|
const numberOfHiddenFields = computed(() => filteredFieldList.value?.filter((field) => !field.show)?.length) |
|
|
|
|
|
|
|
|
|
|
|
const onMove = (_event: { moved: { newIndex: number } }) => { |
|
|
|
const onMove = (_event: { moved: { newIndex: number } }) => { |
|
|
|
// todo : sync with server |
|
|
|
// todo : sync with server |
|
|
@ -138,7 +138,7 @@ useMenuCloseOnEsc(open) |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-dropdown v-model:visible="open" :trigger="['click']" overlay-class-name="nc-dropdown-fields-menu"> |
|
|
|
<a-dropdown v-model:visible="open" :trigger="['click']" overlay-class-name="nc-dropdown-fields-menu"> |
|
|
|
<div :class="{ 'nc-badge nc-active-btn': isAnyFieldHidden }"> |
|
|
|
<div :class="{ 'nc-active-btn': numberOfHiddenFields }"> |
|
|
|
<a-button v-e="['c:fields']" class="nc-fields-menu-btn nc-toolbar-btn" :disabled="isLocked"> |
|
|
|
<a-button v-e="['c:fields']" class="nc-fields-menu-btn nc-toolbar-btn" :disabled="isLocked"> |
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
<MdiEyeOffOutline /> |
|
|
|
<MdiEyeOffOutline /> |
|
|
@ -147,6 +147,8 @@ useMenuCloseOnEsc(open) |
|
|
|
<span class="text-capitalize !text-sm font-weight-normal">{{ $t('objects.fields') }}</span> |
|
|
|
<span class="text-capitalize !text-sm font-weight-normal">{{ $t('objects.fields') }}</span> |
|
|
|
|
|
|
|
|
|
|
|
<MdiMenuDown class="text-grey" /> |
|
|
|
<MdiMenuDown class="text-grey" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="nc-count-badge" v-if="numberOfHiddenFields">{{ numberOfHiddenFields }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -238,4 +240,5 @@ useMenuCloseOnEsc(open) |
|
|
|
:deep(.ant-checkbox) { |
|
|
|
:deep(.ant-checkbox) { |
|
|
|
@apply top-auto; |
|
|
|
@apply top-auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |
|
|
|