Browse Source

Merge pull request #7854 from nocodb/nc-fix/7850-create-table-bug

fix: disable default source menu/action options if it's disabled
pull/7672/head
Anbarasu 9 months ago committed by GitHub
parent
commit
96edbeea2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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