1
0
Fork 0
mirror of synced 2024-07-20 21:55:54 +12:00

Add user type column selector

This commit is contained in:
Adria Navarro 2023-09-14 10:45:27 +02:00
parent 4599ff3b9c
commit d7436d3f97
2 changed files with 15 additions and 0 deletions

View file

@ -20,6 +20,7 @@
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
import {
FIELDS,
DEV_FIELDS,
RelationshipType,
ALLOWABLE_STRING_OPTIONS,
ALLOWABLE_NUMBER_OPTIONS,
@ -34,6 +35,7 @@
import { getBindings } from "components/backend/DataTable/formula"
import JSONSchemaModal from "./JSONSchemaModal.svelte"
import { ValidColumnNameRegex } from "@budibase/shared-core"
import { admin } from "stores/portal"
const AUTO_TYPE = "auto"
const FORMULA_TYPE = FIELDS.FORMULA.type
@ -70,6 +72,10 @@
fieldName: $tables.selected.name,
}
if ($admin.isDev) {
fieldDefinitions = { ...fieldDefinitions, ...cloneDeep(DEV_FIELDS) }
}
$: if (primaryDisplay) {
editableColumn.constraints.presence = { allowEmpty: false }
}

View file

@ -122,6 +122,15 @@ export const FIELDS = {
},
}
export const DEV_FIELDS = {
USER: {
name: "User",
type: "internal",
subtype: "user",
icon: "User",
},
}
export const AUTO_COLUMN_SUB_TYPES = {
AUTO_ID: "autoID",
CREATED_BY: "createdBy",