Fixe types

This commit is contained in:
Adria Navarro 2023-08-01 12:52:00 +02:00
parent f4675aab6e
commit c6c1450d06
2 changed files with 5 additions and 4 deletions

View File

@ -1,18 +1,19 @@
import { fixAutoColumnSubType } from "../utils" import { fixAutoColumnSubType } from "../utils"
import { AutoFieldDefaultNames, AutoFieldSubTypes } from "../../../constants" import { AutoFieldDefaultNames, AutoFieldSubTypes } from "../../../constants"
import { FieldSchema, FieldType, RelationshipType } from "@budibase/types"
describe("rowProcessor utility", () => { describe("rowProcessor utility", () => {
describe("fixAutoColumnSubType", () => { describe("fixAutoColumnSubType", () => {
let schema = { let schema: FieldSchema = {
name: "", name: "",
type: "link", type: FieldType.LINK,
subtype: "", // missing subtype subtype: "", // missing subtype
icon: "ri-magic-line", icon: "ri-magic-line",
autocolumn: true, autocolumn: true,
constraints: { type: "array", presence: false }, constraints: { type: "array", presence: false },
tableId: "ta_users", tableId: "ta_users",
fieldName: "test-Updated By", fieldName: "test-Updated By",
relationshipType: "many-to-many", relationshipType: RelationshipType.MANY_TO_MANY,
sortable: false, sortable: false,
} }

View File

@ -5,7 +5,7 @@ import {
FormulaTypes, FormulaTypes,
} from "../../constants" } from "../../constants"
import { processStringSync } from "@budibase/string-templates" import { processStringSync } from "@budibase/string-templates"
import { FieldSchema, FieldType, Row, Table } from "@budibase/types" import { FieldSchema, Row, Table } from "@budibase/types"
/** /**
* If the subtype has been lost for any reason this works out what * If the subtype has been lost for any reason this works out what