|
|
@ -284,47 +284,47 @@ const onInsertAfter = () => { |
|
|
|
v-model:visible="isOpen" |
|
|
|
v-model:visible="isOpen" |
|
|
|
:trigger="['click']" |
|
|
|
:trigger="['click']" |
|
|
|
placement="bottomRight" |
|
|
|
placement="bottomRight" |
|
|
|
overlay-class-name="nc-dropdown-column-operations" |
|
|
|
overlay-class-name="nc-dropdown-column-operations " |
|
|
|
@click.stop="isOpen = !isOpen" |
|
|
|
@click.stop="isOpen = !isOpen" |
|
|
|
> |
|
|
|
> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<GeneralIcon icon="arrowDown" class="text-grey h-full text-grey nc-ui-dt-dropdown cursor-pointer outline-0 mr-2" /> |
|
|
|
<GeneralIcon icon="arrowDown" class="text-grey h-full text-grey nc-ui-dt-dropdown cursor-pointer outline-0 mr-2" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<a-menu class="shadow bg-white border-1 border-gray-200 nc-column-options"> |
|
|
|
<NcMenu class="shadow bg-white border-1 flex flex-col gap-1 border-gray-200 nc-column-options"> |
|
|
|
<a-menu-item @click="onEditPress"> |
|
|
|
<NcMenuItem @click="onEditPress"> |
|
|
|
<div class="nc-column-edit nc-header-menu-item"> |
|
|
|
<div class="nc-column-edit nc-header-menu-item"> |
|
|
|
<component :is="iconMap.edit" class="text-gray-700 mx-0.65 my-0.75" /> |
|
|
|
<component :is="iconMap.edit" class="text-gray-700" /> |
|
|
|
<!-- Edit --> |
|
|
|
<!-- Edit --> |
|
|
|
{{ $t('general.edit') }} |
|
|
|
{{ $t('general.edit') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
<a-divider v-if="!column?.pv" class="!my-0" /> |
|
|
|
<a-divider v-if="!column?.pv" class="!my-0" /> |
|
|
|
<a-menu-item v-if="!column?.pv" @click="hideField"> |
|
|
|
<NcMenuItem v-if="!column?.pv" @click="hideField"> |
|
|
|
<div v-e="['a:field:hide']" class="nc-column-insert-before nc-header-menu-item my-0.5"> |
|
|
|
<div v-e="['a:field:hide']" class="nc-column-insert-before nc-header-menu-item"> |
|
|
|
<component :is="iconMap.eye" class="text-gray-700 mx-0.75 !w-3.75 !h-3.75 ml-0.75 mr-0.5" /> |
|
|
|
<component :is="iconMap.eye" class="text-gray-700 !w-3.75 !h-3.75" /> |
|
|
|
<!-- Hide Field --> |
|
|
|
<!-- Hide Field --> |
|
|
|
{{ $t('general.hideField') }} |
|
|
|
{{ $t('general.hideField') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
<a-menu-item v-if="(!virtual || column?.uidt === UITypes.Formula) && !column?.pv" @click="setAsDisplayValue"> |
|
|
|
<NcMenuItem v-if="(!virtual || column?.uidt === UITypes.Formula) && !column?.pv" @click="setAsDisplayValue"> |
|
|
|
<div class="nc-column-set-primary nc-header-menu-item item my-0.5"> |
|
|
|
<div class="nc-column-set-primary nc-header-menu-item item"> |
|
|
|
<GeneralIcon icon="star" class="text-gray-700 !w-4.25 !h-4.25 ml-0.5 mr-0.25 -mt-0.5" /> |
|
|
|
<GeneralIcon icon="star" class="text-gray-700 !w-4.25 !h-4.25" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- todo : tooltip --> |
|
|
|
<!-- todo : tooltip --> |
|
|
|
<!-- Set as Display value --> |
|
|
|
<!-- Set as Display value --> |
|
|
|
{{ $t('activity.setDisplay') }} |
|
|
|
{{ $t('activity.setDisplay') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<a-divider class="!my-0" /> |
|
|
|
<a-divider class="!my-0" /> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="!isLinksOrLTAR(column) || column.colOptions.type !== RelationTypes.BELONGS_TO"> |
|
|
|
<template v-if="!isLinksOrLTAR(column) || column.colOptions.type !== RelationTypes.BELONGS_TO"> |
|
|
|
<a-menu-item @click="sortByColumn('asc')"> |
|
|
|
<NcMenuItem @click="sortByColumn('asc')"> |
|
|
|
<div v-e="['a:field:sort', { dir: 'asc' }]" class="nc-column-insert-after nc-header-menu-item"> |
|
|
|
<div v-e="['a:field:sort', { dir: 'asc' }]" class="nc-column-insert-after nc-header-menu-item"> |
|
|
|
<component |
|
|
|
<component |
|
|
|
:is="iconMap.sortDesc" |
|
|
|
:is="iconMap.sortDesc" |
|
|
|
class="text-gray-700 !rotate-180 !w-4.25 !h-4.25 ml-0.5 mr-0.25" |
|
|
|
class="text-gray-700 !rotate-180 !w-4.25 !h-4.25" |
|
|
|
:style="{ |
|
|
|
:style="{ |
|
|
|
transform: 'rotate(180deg)', |
|
|
|
transform: 'rotate(180deg)', |
|
|
|
}" |
|
|
|
}" |
|
|
@ -333,49 +333,49 @@ const onInsertAfter = () => { |
|
|
|
<!-- Sort Ascending --> |
|
|
|
<!-- Sort Ascending --> |
|
|
|
{{ $t('general.sortAsc') }} |
|
|
|
{{ $t('general.sortAsc') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
<a-menu-item @click="sortByColumn('desc')"> |
|
|
|
<NcMenuItem @click="sortByColumn('desc')"> |
|
|
|
<div v-e="['a:field:sort', { dir: 'desc' }]" class="nc-column-insert-before nc-header-menu-item"> |
|
|
|
<div v-e="['a:field:sort', { dir: 'desc' }]" class="nc-column-insert-before nc-header-menu-item"> |
|
|
|
<component :is="iconMap.sortDesc" class="text-gray-700 !w-4.25 !h-4.25 ml-0.5 mr-0.25" /> |
|
|
|
<component :is="iconMap.sortDesc" class="text-gray-700 !w-4.25 !h-4.25 ml-0.5 mr-0.25" /> |
|
|
|
<!-- Sort Descending --> |
|
|
|
<!-- Sort Descending --> |
|
|
|
{{ $t('general.sortDesc') }} |
|
|
|
{{ $t('general.sortDesc') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<a-divider class="!my-0" /> |
|
|
|
<a-divider v-if="!column?.pk" class="!my-0" /> |
|
|
|
|
|
|
|
|
|
|
|
<a-menu-item v-if="!column?.pk" @click="openDuplicateDlg"> |
|
|
|
<NcMenuItem v-if="!column?.pk" @click="openDuplicateDlg"> |
|
|
|
<div v-e="['a:field:duplicate']" class="nc-column-duplicate nc-header-menu-item my-0.5"> |
|
|
|
<div v-e="['a:field:duplicate']" class="nc-column-duplicate nc-header-menu-item"> |
|
|
|
<component :is="iconMap.duplicate" class="text-gray-700 mx-0.75" /> |
|
|
|
<component :is="iconMap.duplicate" class="text-gray-700" /> |
|
|
|
<!-- Duplicate --> |
|
|
|
<!-- Duplicate --> |
|
|
|
{{ t('general.duplicate') }} |
|
|
|
{{ t('general.duplicate') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
<a-menu-item @click="onInsertAfter"> |
|
|
|
<NcMenuItem @click="onInsertAfter"> |
|
|
|
<div v-e="['a:field:insert:after']" class="nc-column-insert-after nc-header-menu-item"> |
|
|
|
<div v-e="['a:field:insert:after']" class="nc-column-insert-after nc-header-menu-item"> |
|
|
|
<component :is="iconMap.colInsertAfter" class="text-gray-700 !w-4.5 !h-4.5 ml-0.75" /> |
|
|
|
<component :is="iconMap.colInsertAfter" class="text-gray-700 !w-4.5 !h-4.5" /> |
|
|
|
<!-- Insert After --> |
|
|
|
<!-- Insert After --> |
|
|
|
{{ t('general.insertAfter') }} |
|
|
|
{{ t('general.insertAfter') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
<a-menu-item v-if="!column?.pv" @click="onInsertBefore"> |
|
|
|
<NcMenuItem v-if="!column?.pv" @click="onInsertBefore"> |
|
|
|
<div v-e="['a:field:insert:before']" class="nc-column-insert-before nc-header-menu-item"> |
|
|
|
<div v-e="['a:field:insert:before']" class="nc-column-insert-before nc-header-menu-item"> |
|
|
|
<component :is="iconMap.colInsertBefore" class="text-gray-600 !w-4.5 !h-4.5 mr-1.5 -ml-0.75" /> |
|
|
|
<component :is="iconMap.colInsertBefore" class="text-gray-600 !w-4.5 !h-4.5" /> |
|
|
|
<!-- Insert Before --> |
|
|
|
<!-- Insert Before --> |
|
|
|
{{ t('general.insertBefore') }} |
|
|
|
{{ t('general.insertBefore') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
<a-divider class="!my-0" /> |
|
|
|
<a-divider v-if="!column?.pv" class="!my-0" /> |
|
|
|
|
|
|
|
|
|
|
|
<a-menu-item v-if="!column?.pv" class="!hover:bg-red-50" @click="handleDelete"> |
|
|
|
<NcMenuItem v-if="!column?.pv" class="!hover:bg-red-50" @click="handleDelete"> |
|
|
|
<div class="nc-column-delete nc-header-menu-item my-0.75 text-red-600"> |
|
|
|
<div class="nc-column-delete nc-header-menu-item text-red-600"> |
|
|
|
<component :is="iconMap.delete" class="ml-0.75 mr-1" /> |
|
|
|
<component :is="iconMap.delete" /> |
|
|
|
<!-- Delete --> |
|
|
|
<!-- Delete --> |
|
|
|
{{ $t('general.delete') }} |
|
|
|
{{ $t('general.delete') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-menu-item> |
|
|
|
</NcMenuItem> |
|
|
|
</a-menu> |
|
|
|
</NcMenu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</a-dropdown> |
|
|
|
</a-dropdown> |
|
|
|
<SmartsheetHeaderDeleteColumnModal v-model:visible="showDeleteColumnModal" /> |
|
|
|
<SmartsheetHeaderDeleteColumnModal v-model:visible="showDeleteColumnModal" /> |
|
|
@ -390,7 +390,7 @@ const onInsertAfter = () => { |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped> |
|
|
|
.nc-header-menu-item { |
|
|
|
.nc-header-menu-item { |
|
|
|
@apply text-dropdown flex items-center px-1 py-2 gap-1; |
|
|
|
@apply text-dropdown flex items-center gap-2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-column-options { |
|
|
|
.nc-column-options { |
|
|
|