Skip to content

Commit

Permalink
fix: disable default source menu/action options if it's disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavxc committed Mar 13, 2024
1 parent 8fe92f9 commit 50dd31d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
Expand Up @@ -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') }}
Expand All @@ -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>
Expand Down Expand Up @@ -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"
Expand Down

1 comment on commit 50dd31d

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes have been deployed. Please run the following command to verify:

docker run -d -p 8888:8080 nocodb/nocodb-timely:0.204.4-pr-7854-20240314-0308

Please sign in to comment.