|
|
@ -56,6 +56,10 @@ eventBus.on((event) => { |
|
|
|
if (event === SmartsheetStoreEvents.FIELD_RELOAD) { |
|
|
|
if (event === SmartsheetStoreEvents.FIELD_RELOAD) { |
|
|
|
loadViewColumns() |
|
|
|
loadViewColumns() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (event === SmartsheetStoreEvents.MAPPED_BY_COLUMN_CHANGE) { |
|
|
|
|
|
|
|
// alert('SmartsheetStoreEvents.MAPPED_BY_COLUMN_CHANGE') |
|
|
|
|
|
|
|
loadViewColumns() |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
watch( |
|
|
@ -163,21 +167,11 @@ useMenuCloseOnEsc(open) |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<div |
|
|
|
<div |
|
|
|
class="p-3 min-w-[280px] bg-gray-50 shadow-lg nc-table-toolbar-menu max-h-[max(80vh,500px)] overflow-auto !border" |
|
|
|
class="p-3 min-w-[280px] bg-gray-50 shadow-lg nc-table-toolbar-menu max-h-[max(80vh,500px)] overflow-auto !border" |
|
|
|
data-testid="nc-fields-menu" |
|
|
|
data-testid="nc-fields-menu" @click.stop> |
|
|
|
@click.stop |
|
|
|
<a-card v-if="activeView.type === ViewTypes.GALLERY || activeView.type === ViewTypes.KANBAN" size="small" |
|
|
|
> |
|
|
|
title="Cover image"> |
|
|
|
<a-card |
|
|
|
<a-select v-model:value="coverImageColumnId" class="w-full" :options="coverOptions" |
|
|
|
v-if="activeView.type === ViewTypes.GALLERY || activeView.type === ViewTypes.KANBAN" |
|
|
|
dropdown-class-name="nc-dropdown-cover-image" @click.stop /> |
|
|
|
size="small" |
|
|
|
|
|
|
|
title="Cover image" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-select |
|
|
|
|
|
|
|
v-model:value="coverImageColumnId" |
|
|
|
|
|
|
|
class="w-full" |
|
|
|
|
|
|
|
:options="coverOptions" |
|
|
|
|
|
|
|
dropdown-class-name="nc-dropdown-cover-image" |
|
|
|
|
|
|
|
@click.stop |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</a-card> |
|
|
|
</a-card> |
|
|
|
|
|
|
|
|
|
|
|
<div class="p-1" @click.stop> |
|
|
|
<div class="p-1" @click.stop> |
|
|
@ -187,20 +181,10 @@ useMenuCloseOnEsc(open) |
|
|
|
<div class="nc-fields-list py-1"> |
|
|
|
<div class="nc-fields-list py-1"> |
|
|
|
<Draggable v-model="fields" item-key="id" @change="onMove($event)"> |
|
|
|
<Draggable v-model="fields" item-key="id" @change="onMove($event)"> |
|
|
|
<template #item="{ element: field, index: index }"> |
|
|
|
<template #item="{ element: field, index: index }"> |
|
|
|
<div |
|
|
|
<div v-show="filteredFieldList.includes(field)" :key="field.id" class="px-2 py-1 flex items-center" |
|
|
|
v-show="filteredFieldList.includes(field)" |
|
|
|
:data-testid="`nc-fields-menu-${field.title}`" @click.stop> |
|
|
|
:key="field.id" |
|
|
|
<a-checkbox v-model:checked="field.show" v-e="['a:fields:show-hide']" class="shrink" |
|
|
|
class="px-2 py-1 flex items-center" |
|
|
|
:disabled="field.isViewEssentialField" @change="saveOrUpdate(field, index)"> |
|
|
|
:data-testid="`nc-fields-menu-${field.title}`" |
|
|
|
|
|
|
|
@click.stop |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-checkbox |
|
|
|
|
|
|
|
v-model:checked="field.show" |
|
|
|
|
|
|
|
v-e="['a:fields:show-hide']" |
|
|
|
|
|
|
|
class="shrink" |
|
|
|
|
|
|
|
:disabled="field.isViewEssentialField" |
|
|
|
|
|
|
|
@change="saveOrUpdate(field, index)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex items-center"> |
|
|
|
<div class="flex items-center"> |
|
|
|
<component :is="getIcon(metaColumnById[field.fk_column_id])" /> |
|
|
|
<component :is="getIcon(metaColumnById[field.fk_column_id])" /> |
|
|
|
|
|
|
|
|
|
|
|