diff --git a/packages/backend-core/src/features/index.ts b/packages/backend-core/src/features/index.ts index 6ac9749b27..2b915e5689 100644 --- a/packages/backend-core/src/features/index.ts +++ b/packages/backend-core/src/features/index.ts @@ -277,5 +277,5 @@ export const flags = new FlagSet({ AUTOMATION_BRANCHING: Flag.boolean(env.isDev()), SQS: Flag.boolean(env.isDev()), [FeatureFlag.AI_CUSTOM_CONFIGS]: Flag.boolean(env.isDev()), - [FeatureFlag.ENRICHED_RELATIONSHIPS]: Flag.boolean(false), + [FeatureFlag.ENRICHED_RELATIONSHIPS]: Flag.boolean(env.isDev()), }) diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index f7eccd5242..e09dd4bd39 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -6,7 +6,7 @@ import { TableNames, UNEDITABLE_USER_FIELDS } from "constants" import RoleCell from "./cells/RoleCell.svelte" import { createEventDispatcher } from "svelte" - import { canBeSortColumn } from "@budibase/shared-core" + import { canBeSortColumn } from "@budibase/frontend-core" export let schema = {} export let data = [] @@ -31,7 +31,7 @@ acc[key] = typeof schema[key] === "string" ? { type: schema[key] } : schema[key] - if (!canBeSortColumn(acc[key].type)) { + if (!canBeSortColumn(acc[key])) { acc[key].sortable = false } return acc diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/ColumnsSettingContent.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/ColumnsSettingContent.svelte index 99f2c16e8f..a61fcf8346 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/ColumnsSettingContent.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/ColumnsSettingContent.svelte @@ -121,8 +121,10 @@ label: name, schema: { type: column.type, + subtype: column.subtype, visible: column.visible, readonly: column.readonly, + constraints: column.constraints, // This is needed to properly display "users" column }, } }) diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridColumnsSettingButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridColumnsSettingButton.svelte index 7e836222e6..ce4298507c 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridColumnsSettingButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridColumnsSettingButton.svelte @@ -13,13 +13,15 @@ import { isEnabled } from "helpers/featureFlags" import { FeatureFlag } from "@budibase/types" - const { columns, datasource } = getContext("grid") + const { tableColumns, datasource } = getContext("grid") let open = false let anchor - $: anyRestricted = $columns.filter(col => !col.visible || col.readonly).length - $: text = anyRestricted ? `Columns: ${anyRestricted} restricted` : "Columns" + $: anyRestricted = $tableColumns.filter( + col => !col.visible || col.readonly + ).length + $: text = anyRestricted ? `Columns: (${anyRestricted} restricted)` : "Columns" $: permissions = $datasource.type === "viewV2" ? [ @@ -37,8 +39,8 @@ size="M" on:click={() => (open = !open)} selected={open || anyRestricted} - disabled={!$columns.length} accentColor="#674D00" + disabled={!$tableColumns.length} > {text} @@ -46,7 +48,7 @@ diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridSortButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridSortButton.svelte index 96e5481d7a..5a1f6b221a 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridSortButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridSortButton.svelte @@ -1,7 +1,7 @@