|
|
@ -461,44 +461,49 @@ const projectDelete = () => { |
|
|
|
@click="isOptionsOpen = false" |
|
|
|
@click="isOptionsOpen = false" |
|
|
|
> |
|
|
|
> |
|
|
|
<template v-if="!isSharedBase"> |
|
|
|
<template v-if="!isSharedBase"> |
|
|
|
<div v-if="isUIAllowed('baseRename')" v-e="['c:base:rename']"> |
|
|
|
<NcMenuItem v-if="isUIAllowed('baseRename')" data-testid="nc-sidebar-project-rename" @click="enableEditMode"> |
|
|
|
<NcMenuItem data-testid="nc-sidebar-project-rename" @click="enableEditMode"> |
|
|
|
<div v-e="['c:base:rename']" class="flex gap-2 items-center"></div> |
|
|
|
<GeneralIcon icon="edit" class="group-hover:text-black" /> |
|
|
|
<GeneralIcon icon="edit" class="group-hover:text-black" /> |
|
|
|
{{ $t('general.rename') }} |
|
|
|
{{ $t('general.rename') }} |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
<NcMenuItem |
|
|
|
v-if="isUIAllowed('baseDuplicate', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
|
v-if="isUIAllowed('baseDuplicate', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
|
v-e="['c:base:duplicate']" |
|
|
|
data-testid="nc-sidebar-base-duplicate" |
|
|
|
|
|
|
|
@click="duplicateProject(base)" |
|
|
|
> |
|
|
|
> |
|
|
|
<NcMenuItem data-testid="nc-sidebar-base-duplicate" @click="duplicateProject(base)"> |
|
|
|
<div v-e="['c:base:duplicate']" class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="duplicate" class="text-gray-700" /> |
|
|
|
<GeneralIcon icon="duplicate" class="text-gray-700" /> |
|
|
|
{{ $t('general.duplicate') }} |
|
|
|
{{ $t('general.duplicate') }} |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<NcDivider v-if="['baseDuplicate', 'baseRename'].some((permission) => isUIAllowed(permission))" /> |
|
|
|
<NcDivider v-if="['baseDuplicate', 'baseRename'].some((permission) => isUIAllowed(permission))" /> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="!isEeUI" v-e="['c:base:copy-proj-info']"> |
|
|
|
|
|
|
|
<!-- Copy Project Info --> |
|
|
|
<!-- Copy Project Info --> |
|
|
|
<NcMenuItem key="copy" data-testid="nc-sidebar-base-copy-base-info" @click.stop="copyProjectInfo"> |
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="!isEeUI" |
|
|
|
|
|
|
|
key="copy" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-copy-base-info" |
|
|
|
|
|
|
|
@click.stop="copyProjectInfo" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['c:base:copy-proj-info']" class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="copy" class="group-hover:text-black" /> |
|
|
|
<GeneralIcon icon="copy" class="group-hover:text-black" /> |
|
|
|
{{ $t('activity.account.projInfo') }} |
|
|
|
{{ $t('activity.account.projInfo') }} |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<div v-e="['c:base:erd']"> |
|
|
|
|
|
|
|
<!-- ERD View --> |
|
|
|
<!-- ERD View --> |
|
|
|
<NcMenuItem key="erd" data-testid="nc-sidebar-base-relations" @click="openErdView(base?.sources?.[0]!)"> |
|
|
|
<NcMenuItem key="erd" data-testid="nc-sidebar-base-relations" @click="openErdView(base?.sources?.[0]!)"> |
|
|
|
|
|
|
|
<div v-e="['c:base:erd']" class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="erd" /> |
|
|
|
<GeneralIcon icon="erd" /> |
|
|
|
{{ $t('title.relations') }} |
|
|
|
{{ $t('title.relations') }} |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="isUIAllowed('apiDocs')" v-e="['c:base:api-docs']"> |
|
|
|
|
|
|
|
<!-- Swagger: Rest APIs --> |
|
|
|
<!-- Swagger: Rest APIs --> |
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('apiDocs')" |
|
|
|
key="api" |
|
|
|
key="api" |
|
|
|
data-testid="nc-sidebar-base-rest-apis" |
|
|
|
data-testid="nc-sidebar-base-rest-apis" |
|
|
|
@click.stop=" |
|
|
|
@click.stop=" |
|
|
@ -508,10 +513,11 @@ const projectDelete = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
" |
|
|
|
" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['c:base:api-docs']" class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="snippet" class="group-hover:text-black !max-w-3.9" /> |
|
|
|
<GeneralIcon icon="snippet" class="group-hover:text-black !max-w-3.9" /> |
|
|
|
{{ $t('activity.account.swagger') }} |
|
|
|
{{ $t('activity.account.swagger') }} |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="base.sources && base.sources[0] && showBaseOption"> |
|
|
|
<div v-if="base.sources && base.sources[0] && showBaseOption"> |
|
|
@ -521,28 +527,30 @@ const projectDelete = () => { |
|
|
|
|
|
|
|
|
|
|
|
<NcDivider v-if="['baseMiscSettings', 'baseDelete'].some((permission) => isUIAllowed(permission))" /> |
|
|
|
<NcDivider v-if="['baseMiscSettings', 'baseDelete'].some((permission) => isUIAllowed(permission))" /> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="isUIAllowed('baseMiscSettings')" v-e="['c:base:settings']"> |
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('baseMiscSettings')" |
|
|
|
key="teamAndSettings" |
|
|
|
key="teamAndSettings" |
|
|
|
data-testid="nc-sidebar-base-settings" |
|
|
|
data-testid="nc-sidebar-base-settings" |
|
|
|
class="nc-sidebar-base-base-settings" |
|
|
|
class="nc-sidebar-base-base-settings" |
|
|
|
@click="toggleDialog(true, 'teamAndAuth', undefined, base.id)" |
|
|
|
@click="toggleDialog(true, 'teamAndAuth', undefined, base.id)" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['c:base:settings']" class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="settings" class="group-hover:text-black" /> |
|
|
|
<GeneralIcon icon="settings" class="group-hover:text-black" /> |
|
|
|
{{ $t('activity.settings') }} |
|
|
|
{{ $t('activity.settings') }} |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="isUIAllowed('baseDelete', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })"> |
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('baseDelete', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
|
data-testid="nc-sidebar-base-delete" |
|
|
|
data-testid="nc-sidebar-base-delete" |
|
|
|
class="!text-red-500 !hover:bg-red-50" |
|
|
|
class="!text-red-500 !hover:bg-red-50" |
|
|
|
@click="projectDelete" |
|
|
|
@click="projectDelete" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="delete" class="w-4" /> |
|
|
|
<GeneralIcon icon="delete" class="w-4" /> |
|
|
|
{{ $t('general.delete') }} |
|
|
|
{{ $t('general.delete') }} |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
</NcMenu> |
|
|
|
</NcMenu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</NcDropdown> |
|
|
|
</NcDropdown> |
|
|
@ -661,13 +669,13 @@ const projectDelete = () => { |
|
|
|
}" |
|
|
|
}" |
|
|
|
@click="isBasesOptionsOpen[source!.id!] = false" |
|
|
|
@click="isBasesOptionsOpen[source!.id!] = false" |
|
|
|
> |
|
|
|
> |
|
|
|
<div v-e="['c:source:erd']"> |
|
|
|
|
|
|
|
<!-- ERD View --> |
|
|
|
<!-- ERD View --> |
|
|
|
<NcMenuItem key="erd" @click="openErdView(source)"> |
|
|
|
<NcMenuItem key="erd" @click="openErdView(source)"> |
|
|
|
|
|
|
|
<div v-e="['c:source:erd']" class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="erd" /> |
|
|
|
<GeneralIcon icon="erd" /> |
|
|
|
{{ $t('title.relations') }} |
|
|
|
{{ $t('title.relations') }} |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<DashboardTreeViewBaseOptions v-if="showBaseOption" v-model:base="base" :source="source" /> |
|
|
|
<DashboardTreeViewBaseOptions v-if="showBaseOption" v-model:base="base" :source="source" /> |
|
|
|
</NcMenu> |
|
|
|
</NcMenu> |
|
|
@ -710,35 +718,28 @@ const projectDelete = () => { |
|
|
|
<template v-else-if="contextMenuTarget.type === 'source'"></template> |
|
|
|
<template v-else-if="contextMenuTarget.type === 'source'"></template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-else-if="contextMenuTarget.type === 'table'"> |
|
|
|
<template v-else-if="contextMenuTarget.type === 'table'"> |
|
|
|
<div v-if="isUIAllowed('tableRename')" v-e="['c:table:rename']"> |
|
|
|
<NcMenuItem v-if="isUIAllowed('tableRename')" @click="openRenameTableDialog(contextMenuTarget.value, true)"> |
|
|
|
<NcMenuItem @click="openRenameTableDialog(contextMenuTarget.value, true)"> |
|
|
|
<div v-e="['c:table:rename']" class="nc-base-option-item flex gap-2 items-center"> |
|
|
|
<div class="nc-base-option-item"> |
|
|
|
|
|
|
|
<GeneralIcon icon="edit" class="text-gray-700" /> |
|
|
|
<GeneralIcon icon="edit" class="text-gray-700" /> |
|
|
|
{{ $t('general.rename') }} |
|
|
|
{{ $t('general.rename') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
</div> |
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
v-if="isUIAllowed('tableDuplicate') && (contextMenuBase?.is_meta || contextMenuBase?.is_local)" |
|
|
|
v-if="isUIAllowed('tableDuplicate') && (contextMenuBase?.is_meta || contextMenuBase?.is_local)" |
|
|
|
v-e="['c:table:duplicate']" |
|
|
|
@click="duplicateTable(contextMenuTarget.value)" |
|
|
|
> |
|
|
|
> |
|
|
|
<NcMenuItem @click="duplicateTable(contextMenuTarget.value)"> |
|
|
|
<div v-e="['c:table:duplicate']" class="nc-base-option-item flex gap-2 items-center"> |
|
|
|
<div class="nc-base-option-item"> |
|
|
|
|
|
|
|
<GeneralIcon icon="duplicate" class="text-gray-700" /> |
|
|
|
<GeneralIcon icon="duplicate" class="text-gray-700" /> |
|
|
|
{{ $t('general.duplicate') }} |
|
|
|
{{ $t('general.duplicate') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
</div> |
|
|
|
|
|
|
|
<NcDivider /> |
|
|
|
<NcDivider /> |
|
|
|
<div v-if="isUIAllowed('table-delete')"> |
|
|
|
<NcMenuItem v-if="isUIAllowed('table-delete')" class="!hover:bg-red-50" @click="tableDelete"> |
|
|
|
<NcMenuItem class="!hover:bg-red-50" @click="tableDelete"> |
|
|
|
<div class="nc-base-option-item flex gap-2 items-center text-red-600"> |
|
|
|
<div class="nc-base-option-item text-red-600"> |
|
|
|
|
|
|
|
<GeneralIcon icon="delete" /> |
|
|
|
<GeneralIcon icon="delete" /> |
|
|
|
{{ $t('general.delete') }} |
|
|
|
{{ $t('general.delete') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</NcMenu> |
|
|
|
</NcMenu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|