|
|
@ -161,6 +161,7 @@ const isTableOpened = computed(() => { |
|
|
|
> |
|
|
|
> |
|
|
|
<template #title>{{ table.table_name }}</template> |
|
|
|
<template #title>{{ table.table_name }}</template> |
|
|
|
<div |
|
|
|
<div |
|
|
|
|
|
|
|
v-e="['c:table:open']" |
|
|
|
class="table-context flex items-center gap-1 h-full" |
|
|
|
class="table-context flex items-center gap-1 h-full" |
|
|
|
:data-testid="`nc-tbl-side-node-${table.title}`" |
|
|
|
:data-testid="`nc-tbl-side-node-${table.title}`" |
|
|
|
@contextmenu="setMenuContext('table', table)" |
|
|
|
@contextmenu="setMenuContext('table', table)" |
|
|
@ -169,6 +170,7 @@ const isTableOpened = computed(() => { |
|
|
|
<div class="flex flex-row h-full items-center"> |
|
|
|
<div class="flex flex-row h-full items-center"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
v-if="(table.meta as any)?.hasNonDefaultViews" |
|
|
|
v-if="(table.meta as any)?.hasNonDefaultViews" |
|
|
|
|
|
|
|
v-e="['c:table:toggle-expand']" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
size="xxsmall" |
|
|
|
size="xxsmall" |
|
|
|
class="nc-sidebar-node-btn nc-sidebar-expand" |
|
|
|
class="nc-sidebar-node-btn nc-sidebar-expand" |
|
|
@ -191,6 +193,7 @@ const isTableOpened = computed(() => { |
|
|
|
> |
|
|
|
> |
|
|
|
<LazyGeneralEmojiPicker |
|
|
|
<LazyGeneralEmojiPicker |
|
|
|
:key="table.meta?.icon" |
|
|
|
:key="table.meta?.icon" |
|
|
|
|
|
|
|
v-e="['c:table:emoji-picker']" |
|
|
|
:emoji="table.meta?.icon" |
|
|
|
:emoji="table.meta?.icon" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
:readonly="!canUserEditEmote || isMobileMode" |
|
|
|
:readonly="!canUserEditEmote || isMobileMode" |
|
|
@ -242,6 +245,7 @@ const isTableOpened = computed(() => { |
|
|
|
!isSharedBase && |
|
|
|
!isSharedBase && |
|
|
|
(isUIAllowed('tableRename', { roles: projectRole }) || isUIAllowed('tableDelete', { roles: projectRole })) |
|
|
|
(isUIAllowed('tableRename', { roles: projectRole }) || isUIAllowed('tableDelete', { roles: projectRole })) |
|
|
|
" |
|
|
|
" |
|
|
|
|
|
|
|
v-e="['c:table:option']" |
|
|
|
:trigger="['click']" |
|
|
|
:trigger="['click']" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
@ -255,6 +259,7 @@ const isTableOpened = computed(() => { |
|
|
|
<NcMenu> |
|
|
|
<NcMenu> |
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
v-if="isUIAllowed('tableRename', { roles: projectRole })" |
|
|
|
v-if="isUIAllowed('tableRename', { roles: projectRole })" |
|
|
|
|
|
|
|
v-e="['c:table:rename']" |
|
|
|
:data-testid="`sidebar-table-rename-${table.title}`" |
|
|
|
:data-testid="`sidebar-table-rename-${table.title}`" |
|
|
|
@click="openRenameTableDialog(table, project.bases[baseIndex].id)" |
|
|
|
@click="openRenameTableDialog(table, project.bases[baseIndex].id)" |
|
|
|
> |
|
|
|
> |
|
|
@ -268,6 +273,7 @@ const isTableOpened = computed(() => { |
|
|
|
project.bases?.[baseIndex] && |
|
|
|
project.bases?.[baseIndex] && |
|
|
|
(project.bases[baseIndex].is_meta || project.bases[baseIndex].is_local) |
|
|
|
(project.bases[baseIndex].is_meta || project.bases[baseIndex].is_local) |
|
|
|
" |
|
|
|
" |
|
|
|
|
|
|
|
v-e="['c:table:duplicate']" |
|
|
|
:data-testid="`sidebar-table-duplicate-${table.title}`" |
|
|
|
:data-testid="`sidebar-table-duplicate-${table.title}`" |
|
|
|
@click="duplicateTable(table)" |
|
|
|
@click="duplicateTable(table)" |
|
|
|
> |
|
|
|
> |
|
|
@ -277,6 +283,7 @@ const isTableOpened = computed(() => { |
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
v-if="isUIAllowed('tableDelete', { roles: projectRole })" |
|
|
|
v-if="isUIAllowed('tableDelete', { roles: projectRole })" |
|
|
|
|
|
|
|
v-e="['c:table:delete']" |
|
|
|
:data-testid="`sidebar-table-delete-${table.title}`" |
|
|
|
:data-testid="`sidebar-table-delete-${table.title}`" |
|
|
|
class="!text-red-500 !hover:bg-red-50" |
|
|
|
class="!text-red-500 !hover:bg-red-50" |
|
|
|
@click="isTableDeleteDialogVisible = true" |
|
|
|
@click="isTableDeleteDialogVisible = true" |
|
|
@ -289,6 +296,7 @@ const isTableOpened = computed(() => { |
|
|
|
</NcDropdown> |
|
|
|
</NcDropdown> |
|
|
|
<DashboardTreeViewCreateViewBtn v-if="isUIAllowed('viewCreateOrEdit')"> |
|
|
|
<DashboardTreeViewCreateViewBtn v-if="isUIAllowed('viewCreateOrEdit')"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-e="['c:view:create']" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
size="xxsmall" |
|
|
|
size="xxsmall" |
|
|
|
class="nc-create-view-btn nc-sidebar-node-btn" |
|
|
|
class="nc-create-view-btn nc-sidebar-node-btn" |
|
|
|