PR comments
This commit is contained in:
parent
5798b42454
commit
cf8f7db36d
|
@ -18,7 +18,7 @@
|
|||
export let schema
|
||||
export let aiField = {}
|
||||
|
||||
$: OperationField = OperationFields[aiField.operation] || null
|
||||
$: OperationField = OperationFields[aiField.operation]
|
||||
$: schemaWithoutRelations = Object.keys(schema).filter(
|
||||
key => schema[key].type !== "link"
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { viewsV2, rowActions } from "stores/builder"
|
||||
import { admin, themeStore } 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"
|
||||
|
@ -49,6 +49,7 @@
|
|||
{buttons}
|
||||
allowAddRows
|
||||
allowDeleteRows
|
||||
licensing={$licensing}
|
||||
showAvatars={false}
|
||||
on:updatedatasource={handleGridViewUpdate}
|
||||
isCloud={$admin.cloud}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
appStore,
|
||||
rowActions,
|
||||
} from "stores/builder"
|
||||
import { themeStore, admin } from "stores/portal"
|
||||
import { themeStore, admin, licensing } from "stores/portal"
|
||||
import { TableNames } from "constants"
|
||||
import { Grid } from "@budibase/frontend-core"
|
||||
import { API } from "api"
|
||||
|
@ -125,6 +125,7 @@
|
|||
schemaOverrides={isUsersTable ? userSchemaOverrides : null}
|
||||
showAvatars={false}
|
||||
isCloud={$admin.cloud}
|
||||
licensing={$licensing}
|
||||
{buttons}
|
||||
buttonsCollapsed
|
||||
on:updatedatasource={handleGridTableUpdate}
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
export let darkMode = false
|
||||
export let isCloud = null
|
||||
export let rowConditions = null
|
||||
export let licensing = null
|
||||
|
||||
// Unique identifier for DOM nodes inside this instance
|
||||
const gridID = `grid-${Math.random().toString().slice(2)}`
|
||||
|
@ -104,6 +105,7 @@
|
|||
buttonsCollapsedText,
|
||||
darkMode,
|
||||
isCloud,
|
||||
licensing,
|
||||
rowConditions,
|
||||
})
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
$: style = makeStyle($menu)
|
||||
$: isNewRow = $focusedRowId === NewRowID
|
||||
$: budibaseAIEnabled = $config.licensing?.budibaseAIEnabled || $config.licensing?.customAIConfigsEnabled
|
||||
|
||||
const makeStyle = menu => {
|
||||
return `left:${menu.left}px; top:${menu.top}px;`
|
||||
|
@ -168,15 +169,17 @@
|
|||
>
|
||||
Delete row
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
icon="MagicWand"
|
||||
disabled={isNewRow ||
|
||||
!$focusedRow?._rev ||
|
||||
!$hasBudibaseIdentifiers}
|
||||
on:click={generateAIColumns}
|
||||
>
|
||||
Generate AI Columns
|
||||
</MenuItem>
|
||||
{#if budibaseAIEnabled}
|
||||
<MenuItem
|
||||
icon="MagicWand"
|
||||
disabled={isNewRow ||
|
||||
!$focusedRow?._rev ||
|
||||
!$hasBudibaseIdentifiers}
|
||||
on:click={generateAIColumns}
|
||||
>
|
||||
Generate AI Columns
|
||||
</MenuItem>
|
||||
{/if}
|
||||
{/if}
|
||||
</Menu>
|
||||
</GridPopover>
|
||||
|
|
|
@ -119,7 +119,6 @@ export interface FormulaFieldMetadata extends BaseFieldSchema {
|
|||
|
||||
export interface AIFieldMetadata extends BaseFieldSchema {
|
||||
type: FieldType.AI
|
||||
// formula: string
|
||||
operation: AIOperationEnum
|
||||
columns?: string[]
|
||||
column?: string
|
||||
|
|
Loading…
Reference in New Issue