From b3405b7aaa65fdac6606c4b92f1d2b386cf31317 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 26 Sep 2023 11:44:37 +0200 Subject: [PATCH] Design forms --- .../components/design/settings/componentSettings.js | 2 ++ .../new/_components/componentStructure.json | 3 ++- packages/client/manifest.json | 11 +++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index 6d673cbd3d..4c49587372 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -65,6 +65,7 @@ const componentMap = { "field/array": FormFieldSelect, "field/json": FormFieldSelect, "field/barcodeqr": FormFieldSelect, + "field/bb_reference": FormFieldSelect, // Some validation types are the same as others, so not all types are // explicitly listed here. e.g. options uses string validation "validation/string": ValidationEditor, @@ -74,6 +75,7 @@ const componentMap = { "validation/datetime": ValidationEditor, "validation/attachment": ValidationEditor, "validation/link": ValidationEditor, + "validation/bb_reference": ValidationEditor, } export const getComponentForSetting = setting => { diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json index ee0f99a074..11a130490a 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json @@ -69,7 +69,8 @@ "datetimefield", "multifieldselect", "s3upload", - "codescanner" + "codescanner", + "bbreferencefield" ] }, { diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 3bf4a8f7a8..4e56ca758d 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -5625,8 +5625,9 @@ ] }, "bbreferencefield": { - "name": "BB Reference field", - "icon": "Link", + "devComment": "As bb reference is only used for user subtype for now, we are using user for icon and labels", + "name": "User Field", + "icon": "User", "styles": ["size"], "requiredAncestors": ["form"], "editable": true, @@ -5635,6 +5636,12 @@ "height": 50 }, "settings": [ + { + "type": "field/bb_reference", + "label": "Field", + "key": "field", + "required": true + }, { "type": "text", "label": "Label",