|
|
@ -300,6 +300,8 @@ const showSystemField = computed({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isDragging = ref<boolean>(false) |
|
|
|
|
|
|
|
|
|
|
|
const fieldsMenuSearchRef = ref<HTMLInputElement>() |
|
|
|
const fieldsMenuSearchRef = ref<HTMLInputElement>() |
|
|
|
|
|
|
|
|
|
|
|
watch(open, (value) => { |
|
|
|
watch(open, (value) => { |
|
|
@ -390,7 +392,14 @@ useMenuCloseOnEsc(open) |
|
|
|
|
|
|
|
|
|
|
|
{{ $t('title.noResultsMatchedYourSearch') }} |
|
|
|
{{ $t('title.noResultsMatchedYourSearch') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Draggable v-model="fields" item-key="id" @change="onMove($event)"> |
|
|
|
<Draggable |
|
|
|
|
|
|
|
v-model="fields" |
|
|
|
|
|
|
|
item-key="id" |
|
|
|
|
|
|
|
ghost-class="nc-fields-menu-items-ghost" |
|
|
|
|
|
|
|
@change="onMove($event)" |
|
|
|
|
|
|
|
@start="isDragging = true" |
|
|
|
|
|
|
|
@end="isDragging = false" |
|
|
|
|
|
|
|
> |
|
|
|
<template #item="{ element: field }"> |
|
|
|
<template #item="{ element: field }"> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
v-if=" |
|
|
@ -400,13 +409,13 @@ useMenuCloseOnEsc(open) |
|
|
|
" |
|
|
|
" |
|
|
|
:key="field.id" |
|
|
|
:key="field.id" |
|
|
|
:data-testid="`nc-fields-menu-${field.title}`" |
|
|
|
:data-testid="`nc-fields-menu-${field.title}`" |
|
|
|
class="pl-2 flex flex-row items-center" |
|
|
|
class="pl-2 flex flex-row items-center rounded-lg hover:bg-gray-50" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
|
> |
|
|
|
> |
|
|
|
<component :is="iconMap.drag" class="cursor-move !h-3.75 text-gray-600 mr-1" /> |
|
|
|
<component :is="iconMap.drag" class="cursor-move !h-3.75 text-gray-600 mr-1" /> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-e="['a:fields:show-hide']" |
|
|
|
v-e="['a:fields:show-hide']" |
|
|
|
class="flex flex-row items-center w-full truncate cursor-pointer ml-1 py-2 pr-2" |
|
|
|
class="flex flex-row items-center w-full truncate cursor-pointer ml-1 py-1.5 pr-2" |
|
|
|
@click=" |
|
|
|
@click=" |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
field.show = !field.show |
|
|
|
field.show = !field.show |
|
|
@ -414,8 +423,8 @@ useMenuCloseOnEsc(open) |
|
|
|
} |
|
|
|
} |
|
|
|
" |
|
|
|
" |
|
|
|
> |
|
|
|
> |
|
|
|
<component :is="getIcon(metaColumnById[field.fk_column_id])" /> |
|
|
|
<component :is="getIcon(metaColumnById[field.fk_column_id])" class="!w-3.5 !h-3.5 !text-gray-700" /> |
|
|
|
<NcTooltip class="flex-1 pl-1 pr-2 truncate" show-on-truncate-only> |
|
|
|
<NcTooltip class="flex-1 pl-1 pr-2 truncate" show-on-truncate-only :disabled="isDragging"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ field.title }} |
|
|
|
{{ field.title }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -456,7 +465,12 @@ useMenuCloseOnEsc(open) |
|
|
|
<component :is="iconMap.underline" class="!w-3 !h-3" /> |
|
|
|
<component :is="iconMap.underline" class="!w-3 !h-3" /> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<NcSwitch :checked="field.show" :disabled="field.isViewEssentialField" @change="$t('a:fields:show-hide')" /> |
|
|
|
<NcSwitch |
|
|
|
|
|
|
|
:checked="field.show" |
|
|
|
|
|
|
|
:disabled="field.isViewEssentialField" |
|
|
|
|
|
|
|
@change="$t('a:fields:show-hide')" |
|
|
|
|
|
|
|
size="xsmall" |
|
|
|
|
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex-1" /> |
|
|
|
<div class="flex-1" /> |
|
|
@ -474,13 +488,16 @@ useMenuCloseOnEsc(open) |
|
|
|
class="pl-7.4 pr-2 py-2 flex flex-row items-center" |
|
|
|
class="pl-7.4 pr-2 py-2 flex flex-row items-center" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
|
> |
|
|
|
> |
|
|
|
<component :is="getIcon(metaColumnById[filteredFieldList[0].fk_column_id as string])" /> |
|
|
|
<component |
|
|
|
<NcTooltip class="px-1 flex-1 truncate" show-on-truncate-only> |
|
|
|
:is="getIcon(metaColumnById[filteredFieldList[0].fk_column_id as string])" |
|
|
|
|
|
|
|
class="!w-3.5 !h-3.5 !text-gray-700" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<NcTooltip class="px-1 flex-1 truncate" show-on-truncate-only :disabled="isDragging"> |
|
|
|
<template #title>{{ filteredFieldList[0].title }}</template> |
|
|
|
<template #title>{{ filteredFieldList[0].title }}</template> |
|
|
|
<template #default>{{ filteredFieldList[0].title }}</template> |
|
|
|
<template #default>{{ filteredFieldList[0].title }}</template> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
|
|
|
|
<NcSwitch :checked="true" :disabled="true" /> |
|
|
|
<NcSwitch :checked="true" :disabled="true" size="xsmall" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</Draggable> |
|
|
|
</Draggable> |
|
|
@ -532,4 +549,8 @@ useMenuCloseOnEsc(open) |
|
|
|
@apply text-gray-800; |
|
|
|
@apply text-gray-800; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nc-fields-menu-items-ghost { |
|
|
|
|
|
|
|
@apply bg-gray-50; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|