From 53fc45f07ee784141631bdd93fe5d2997d3fb95c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 30 Oct 2024 14:14:49 +0000 Subject: [PATCH] make ai columns respect feature flags --- .../src/components/automation/SetupPanel/CronBuilder.svelte | 5 ++--- .../backend/DataTable/modals/CreateEditColumn.svelte | 5 ++--- .../[application]/data/table/[tableId]/[viewId]/index.svelte | 4 ++-- .../app/[application]/data/table/[tableId]/index.svelte | 5 ++--- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte b/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte index 1bba349244..51538944f4 100644 --- a/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte +++ b/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte @@ -9,7 +9,7 @@ } from "@budibase/bbui" import { onMount, createEventDispatcher } from "svelte" import { flags } from "stores/builder" - import { licensing } from "stores/portal" + import { featureFlags } from "stores/portal" import { API } from "api" import MagicWand from "../../../../assets/MagicWand.svelte" @@ -26,8 +26,7 @@ let aiCronPrompt = "" let loadingAICronExpression = false - $: aiEnabled = - $licensing.customAIConfigsEnabled || $licensing.budibaseAIEnabled + $: aiEnabled = $featureFlags.AI_CUSTOM_CONFIGS || $featureFlags.BUDIBASE_AI $: { if (cronExpression) { try { diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 143e292c55..d16bca3203 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -26,7 +26,7 @@ import { createEventDispatcher, getContext, onMount } from "svelte" import { cloneDeep } from "lodash/fp" import { tables, datasources } from "stores/builder" - import { licensing } from "stores/portal" + import { featureFlags } from "stores/portal" import { TableNames, UNEDITABLE_USER_FIELDS } from "constants" import { FIELDS, @@ -101,8 +101,7 @@ let optionsValid = true $: rowGoldenSample = RowUtils.generateGoldenSample($rows) - $: aiEnabled = - $licensing.customAIConfigsEnabled || $licensing.budibaseAIEnabled + $: aiEnabled = $featureFlags.BUDIBASE_AI || $featureFlags.AI_CUSTOM_CONFIGS $: if (primaryDisplay) { editableColumn.constraints.presence = { allowEmpty: false } } diff --git a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/[viewId]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/[viewId]/index.svelte index bc21b04ad0..39b1dc4768 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/[viewId]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/[viewId]/index.svelte @@ -1,6 +1,6 @@