mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 12:16:53 +00:00
fix: some missing hcange
This commit is contained in:
@@ -14,15 +14,27 @@ const { isSharedBase } = storeToRefs(useBase())
|
||||
|
||||
const baseRole = inject(ProjectRoleInj)!
|
||||
|
||||
const { isMobileMode } = useGlobal()
|
||||
const { isMobileMode, appInfo } = useGlobal()
|
||||
|
||||
const { isUIAllowed, baseRoles, loadRoles } = useRoles()
|
||||
|
||||
const { isWsAuditEnabled, showUpgradeToUseTableAndFieldPermissions, showUpgradeToUseSync, isEEFeatureBlocked } = useEeConfig()
|
||||
const { isFeatureEnabled } = useBetaFeatureToggle()
|
||||
|
||||
const {
|
||||
isWsAuditEnabled,
|
||||
showUpgradeToUseTableAndFieldPermissions,
|
||||
showUpgradeToUseSync,
|
||||
showUpgradeToUseSnapshots,
|
||||
isEEFeatureBlocked,
|
||||
} = useEeConfig()
|
||||
|
||||
const navigateToBaseSettings = (page: string) => {
|
||||
if (page === 'permissions' && showUpgradeToUseTableAndFieldPermissions()) return
|
||||
if (page === 'syncs' && showUpgradeToUseSync()) return
|
||||
if (page === 'snapshots' && isEEFeatureBlocked.value) {
|
||||
showUpgradeToUseSnapshots()
|
||||
return
|
||||
}
|
||||
|
||||
const baseId = resolvedProject.value?.id
|
||||
if (!baseId) return
|
||||
@@ -38,6 +50,10 @@ const activeBaseSettingsTab = computed(() => {
|
||||
return page ? baseSettingsSlugToTab[page] || '' : ''
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
console.log("'activeBaseSettingsTab'", activeBaseSettingsTab.value)
|
||||
})
|
||||
|
||||
// Use injected base role for immediate permission checks; load full roles in background
|
||||
const effectiveRoles = computed(() => baseRoles.value ?? baseRole.value)
|
||||
|
||||
@@ -111,6 +127,22 @@ onMounted(() => {
|
||||
>
|
||||
{{ $t('title.audits') }}
|
||||
</NcSidebarMenuItem>
|
||||
<NcSidebarMenuItem
|
||||
v-if="
|
||||
isEeUI &&
|
||||
appInfo?.ee &&
|
||||
isUIAllowed('workflowCreateOrEdit', { roles: effectiveRoles }) &&
|
||||
isFeatureEnabled(FEATURE_FLAG.WORKFLOWS_TAB) &&
|
||||
!isMobileMode
|
||||
"
|
||||
v-e="['c:settings:base:workflows']"
|
||||
icon="ncAutomation"
|
||||
data-testid="base-workflows"
|
||||
:active="activeBaseSettingsTab === 'workflows'"
|
||||
@click="navigateToBaseSettings('workflows')"
|
||||
>
|
||||
{{ $t('objects.workflows') }}
|
||||
</NcSidebarMenuItem>
|
||||
<NcSidebarMenuItem
|
||||
v-if="isUIAllowed('manageMCP', { roles: effectiveRoles }) && !isMobileMode"
|
||||
v-e="['c:settings:base:mcp']"
|
||||
@@ -135,6 +167,10 @@ onMounted(() => {
|
||||
@click="navigateToBaseSettings('snapshots')"
|
||||
>
|
||||
{{ $t('labels.manageSnapshots') }}
|
||||
|
||||
<template #extraRight>
|
||||
<LazyPaymentUpgradeBadge :feature-enabled-callback="() => !isEEFeatureBlocked" />
|
||||
</template>
|
||||
</NcSidebarMenuItem>
|
||||
|
||||
<NcSidebarMenuItem
|
||||
|
||||
Reference in New Issue
Block a user