Browse Source

fix: disable default source menu/action options if it's disabled

pull/7854/head
Pranav C 8 months ago
parent
commit
50dd31da94
  1. 5
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue

5
packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue

@ -523,7 +523,7 @@ const projectDelete = () => {
</NcMenuItem>
<!-- ERD View -->
<NcMenuItem key="erd" data-testid="nc-sidebar-base-relations" @click="openErdView(base?.sources?.[0]!)">
<NcMenuItem v-if="base?.sources?.[0]?.enabled" 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" />
{{ $t('title.relations') }}
@ -549,7 +549,7 @@ const projectDelete = () => {
</NcMenuItem>
</template>
<template v-if="base.sources && base.sources[0] && showBaseOption">
<template v-if="base?.sources?.[0]?.enabled && showBaseOption">
<NcDivider />
<DashboardTreeViewBaseOptions v-model:base="base" :source="base.sources[0]" />
</template>
@ -584,6 +584,7 @@ const projectDelete = () => {
</NcDropdown>
<NcButton
:disabled="!base?.sources?.[0]?.enabled"
v-if="isUIAllowed('tableCreate', { roles: baseRole })"
v-e="['c:base:create-table']"
class="nc-sidebar-node-btn"

Loading…
Cancel
Save