|
|
@ -395,59 +395,55 @@ const filterOrGroupByThisField = (event: SmartsheetStoreEvents) => { |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<a-divider v-if="!column?.pk" class="!my-0" /> |
|
|
|
<a-divider class="!my-0" /> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="true"> |
|
|
|
<NcTooltip :disabled="isFilterSupported && !isFilterLimitExceeded"> |
|
|
|
<NcTooltip :disabled="isFilterSupported && !isFilterLimitExceeded"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ |
|
|
|
{{ |
|
|
|
!isFilterSupported |
|
|
|
!isFilterSupported |
|
|
|
? "This field type doesn't support filtering" |
|
|
|
? "This field type doesn't support filtering" |
|
|
|
: isFilterLimitExceeded |
|
|
|
: isFilterLimitExceeded |
|
|
|
? 'Filter by limit exceeded' |
|
|
|
? 'Filter by limit exceeded' |
|
|
|
|
|
|
|
: '' |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
@click="filterOrGroupByThisField(SmartsheetStoreEvents.FILTER_ADD)" |
|
|
|
|
|
|
|
:disabled="!isFilterSupported || isFilterLimitExceeded" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['a:field:add:filter']" class="nc-column-filter nc-header-menu-item"> |
|
|
|
|
|
|
|
<component :is="iconMap.filter" class="text-gray-700" /> |
|
|
|
|
|
|
|
<!-- Filter by this field --> |
|
|
|
|
|
|
|
Filter by this field |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<NcTooltip |
|
|
|
|
|
|
|
:disabled="(isGroupBySupported && !isGroupByLimitExceeded) || isGroupedByThisField || !(isEeUI && !isPublic)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #title>{{ |
|
|
|
|
|
|
|
!isGroupBySupported |
|
|
|
|
|
|
|
? "This field type doesn't support grouping" |
|
|
|
|
|
|
|
: isGroupByLimitExceeded |
|
|
|
|
|
|
|
? 'Group by limit exceeded' |
|
|
|
|
|
|
|
: '' |
|
|
|
: '' |
|
|
|
}}</template> |
|
|
|
}} |
|
|
|
<NcMenuItem |
|
|
|
</template> |
|
|
|
:disabled="isEeUI && !isPublic && (!isGroupBySupported || isGroupByLimitExceeded) && !isGroupedByThisField" |
|
|
|
<NcMenuItem |
|
|
|
@click=" |
|
|
|
:disabled="!isFilterSupported || isFilterLimitExceeded" |
|
|
|
filterOrGroupByThisField( |
|
|
|
@click="filterOrGroupByThisField(SmartsheetStoreEvents.FILTER_ADD)" |
|
|
|
isGroupedByThisField ? SmartsheetStoreEvents.GROUP_BY_REMOVE : SmartsheetStoreEvents.GROUP_BY_ADD, |
|
|
|
> |
|
|
|
) |
|
|
|
<div v-e="['a:field:add:filter']" class="nc-column-filter nc-header-menu-item"> |
|
|
|
" |
|
|
|
<component :is="iconMap.filter" class="text-gray-700" /> |
|
|
|
> |
|
|
|
<!-- Filter by this field --> |
|
|
|
<div v-e="['a:field:add:groupby']" class="nc-column-groupby nc-header-menu-item"> |
|
|
|
Filter by this field |
|
|
|
<component :is="iconMap.group" class="text-gray-700" /> |
|
|
|
</div> |
|
|
|
<!-- Group by this field --> |
|
|
|
</NcMenuItem> |
|
|
|
{{ isGroupedByThisField ? "Don't group by this field" : 'Group by this field' }} |
|
|
|
</NcTooltip> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
<NcTooltip :disabled="(isGroupBySupported && !isGroupByLimitExceeded) || isGroupedByThisField || !(isEeUI && !isPublic)"> |
|
|
|
</NcTooltip> |
|
|
|
<template #title>{{ |
|
|
|
|
|
|
|
!isGroupBySupported |
|
|
|
<a-divider class="!my-0" /> |
|
|
|
? "This field type doesn't support grouping" |
|
|
|
</template> |
|
|
|
: isGroupByLimitExceeded |
|
|
|
|
|
|
|
? 'Group by limit exceeded' |
|
|
|
|
|
|
|
: '' |
|
|
|
|
|
|
|
}}</template> |
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
:disabled="isEeUI && !isPublic && (!isGroupBySupported || isGroupByLimitExceeded) && !isGroupedByThisField" |
|
|
|
|
|
|
|
@click=" |
|
|
|
|
|
|
|
filterOrGroupByThisField( |
|
|
|
|
|
|
|
isGroupedByThisField ? SmartsheetStoreEvents.GROUP_BY_REMOVE : SmartsheetStoreEvents.GROUP_BY_ADD, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['a:field:add:groupby']" class="nc-column-groupby nc-header-menu-item"> |
|
|
|
|
|
|
|
<component :is="iconMap.group" class="text-gray-700" /> |
|
|
|
|
|
|
|
<!-- Group by this field --> |
|
|
|
|
|
|
|
{{ isGroupedByThisField ? "Don't group by this field" : 'Group by this field' }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-divider class="!my-0" /> |
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem v-if="!column?.pk" :disabled="!isDuplicateAllowed" @click="openDuplicateDlg"> |
|
|
|
<NcMenuItem v-if="!column?.pk" :disabled="!isDuplicateAllowed" @click="openDuplicateDlg"> |
|
|
|
<div v-e="['a:field:duplicate']" class="nc-column-duplicate nc-header-menu-item"> |
|
|
|
<div v-e="['a:field:duplicate']" class="nc-column-duplicate nc-header-menu-item"> |
|
|
|