This commit is contained in:
Martin McKeaveney 2025-01-17 14:15:40 +00:00
parent 01a47bbd22
commit 46e88bd79d
6 changed files with 13 additions and 18 deletions

View File

@ -9,7 +9,7 @@
} from "@budibase/bbui"
import { onMount, createEventDispatcher } from "svelte"
import { flags } from "@/stores/builder"
import { featureFlags, licensing } from "@/stores/portal"
import { licensing } from "@/stores/portal"
import { API } from "@/api"
import MagicWand from "../../../../assets/MagicWand.svelte"
@ -27,8 +27,7 @@
let loadingAICronExpression = false
$: aiEnabled =
($featureFlags.AI_CUSTOM_CONFIGS && $licensing.customAIConfigsEnabled) ||
($featureFlags.BUDIBASE_AI && $licensing.budibaseAIEnabled)
$licensing.customAIConfigsEnabled || $licensing.budibaseAIEnabled
$: {
if (cronExpression) {
try {

View File

@ -26,7 +26,7 @@
import { createEventDispatcher, getContext, onMount } from "svelte"
import { cloneDeep } from "lodash/fp"
import { tables, datasources } from "@/stores/builder"
import { featureFlags } from "@/stores/portal"
import { licensing } from "@/stores/portal"
import { TableNames, UNEDITABLE_USER_FIELDS } from "@/constants"
import {
FIELDS,
@ -100,7 +100,8 @@
let optionsValid = true
$: rowGoldenSample = RowUtils.generateGoldenSample($rows)
$: aiEnabled = $featureFlags.BUDIBASE_AI || $featureFlags.AI_CUSTOM_CONFIGS
$: aiEnabled =
$licensing.customAIConfigsEnabled || $licensing.budibaseAiEnabled
$: if (primaryDisplay) {
editableColumn.constraints.presence = { allowEmpty: false }
}

View File

@ -1,6 +1,6 @@
<script>
import { viewsV2, rowActions } from "@/stores/builder"
import { admin, themeStore, featureFlags } from "@/stores/portal"
import { admin, themeStore, licensing } from "@/stores/portal"
import { Grid } from "@budibase/frontend-core"
import { API } from "@/api"
import { notifications } from "@budibase/bbui"
@ -53,7 +53,7 @@
{buttons}
allowAddRows
allowDeleteRows
aiEnabled={$featureFlags.BUDIBASE_AI || $featureFlags.AI_CUSTOM_CONFIGS}
aiEnabled={$licensing.customAIConfigsEnabled || $licensing.budibaseAiEnabled}
showAvatars={false}
on:updatedatasource={handleGridViewUpdate}
isCloud={$admin.cloud}

View File

@ -8,7 +8,7 @@
rowActions,
roles,
} from "@/stores/builder"
import { themeStore, admin, featureFlags } from "@/stores/portal"
import { themeStore, admin, licensing } from "@/stores/portal"
import { TableNames } from "@/constants"
import { Grid } from "@budibase/frontend-core"
import { API } from "@/api"
@ -130,7 +130,8 @@
schemaOverrides={isUsersTable ? userSchemaOverrides : null}
showAvatars={false}
isCloud={$admin.cloud}
aiEnabled={$featureFlags.BUDIBASE_AI || $featureFlags.AI_CUSTOM_CONFIGS}
aiEnabled={$licensing.customAIConfigsEnabled ||
$licensing.budibaseAIEnabled}
{buttons}
buttonsCollapsed
on:updatedatasource={handleGridTableUpdate}

View File

@ -12,7 +12,7 @@
Tags,
Tag,
} from "@budibase/bbui"
import { admin, licensing, featureFlags } from "@/stores/portal"
import { admin, licensing } from "@/stores/portal"
import { API } from "@/api"
import AIConfigModal from "./ConfigModal.svelte"
import AIConfigTile from "./AIConfigTile.svelte"
@ -27,8 +27,7 @@
let editingUuid
$: isCloud = $admin.cloud
$: customAIConfigsEnabled =
$featureFlags.AI_CUSTOM_CONFIGS && $licensing.customAIConfigsEnabled
$: customAIConfigsEnabled = $licensing.customAIConfigsEnabled
async function fetchAIConfig() {
try {

View File

@ -1,10 +1,5 @@
<script>
import { redirect } from "@roxi/routify"
import { featureFlags } from "@/stores/portal"
if ($featureFlags.AI_CUSTOM_CONFIGS) {
$redirect("./ai")
} else {
$redirect("./auth")
}
</script>