From abe34e774b0b9761474da6d109f4477191b13783 Mon Sep 17 00:00:00 2001 From: alaskowski <alaskowski@ethz.ch> Date: Fri, 28 Apr 2023 16:24:49 +0200 Subject: [PATCH] SSDM-13524: Changed ui-admin and ui-eln-lims to accept new data types --- .../form/entitytype/EntityTypeFormPreviewProperty.jsx | 7 ++++++- .../1/as/webapps/eln-lims/html/js/util/FormUtil.js | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormPreviewProperty.jsx b/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormPreviewProperty.jsx index ff44cd5ec28..de25bfdad19 100644 --- a/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormPreviewProperty.jsx +++ b/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormPreviewProperty.jsx @@ -282,7 +282,12 @@ class EntityTypeFormPreviewProperty extends React.PureComponent { dataType === openbis.DataType.HYPERLINK || dataType === openbis.DataType.TIMESTAMP || dataType === openbis.DataType.DATE || - dataType === openbis.DataType.XML + dataType === openbis.DataType.XML || + dataType === openbis.DataType.ARRAY_STRING || + dataType === openbis.DataType.ARRAY_INTEGER || + dataType === openbis.DataType.ARRAY_REAL || + dataType === openbis.DataType.ARRAY_TIMESTAMP || + dataType === openbis.DataType.JSON ) { return this.renderVarcharProperty() } else if ( diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js index e8a273ca0ee..4266047457e 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js @@ -933,7 +933,7 @@ var FormUtil = new function() { $component = this._getNumberInputField(propertyType.code, propertyType.description, '1', propertyType.mandatory); } else if (propertyType.dataType === "MATERIAL") { $component = this._getInputField("text", propertyType.code, propertyType.description, null, propertyType.mandatory); - } else if (propertyType.dataType === "MULTILINE_VARCHAR") { + } else if (["MULTILINE_VARCHAR", "JSON"].includes(propertyType.dataType)) { $component = this._getTextBox(propertyType.code, propertyType.description, propertyType.mandatory); if(profile.isForcedMonospaceFont(propertyType)) { $component.css("font-family", "Consolas, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace"); @@ -945,8 +945,10 @@ var FormUtil = new function() { } else if (propertyType.dataType === "DATE") { $component = this._getDatePickerField(propertyType.code, propertyType.description, propertyType.mandatory, true, timestampValue); } else if (propertyType.dataType === "VARCHAR") { - $component = this._getInputField("text", propertyType.code, propertyType.description, null, propertyType.mandatory); - } else if (propertyType.dataType === "XML") { + $component = this._getInputField("text", propertyType.code, propertyType.description, null, propertyType.mandatory); + } else if (['ARRAY_STRING', 'ARRAY_INTEGER', 'ARRAY_REAL', 'ARRAY_TIMESTAMP'].includes(propertyType.dataType)) { + $component = this._getInputField("text", propertyType.code, propertyType.description, null, propertyType.mandatory); + } else if (propertyType.dataType === "XML") { $component = this._getTextBox(propertyType.code, propertyType.description, propertyType.mandatory); } else if (propertyType.dataType === "SAMPLE") { var sampleTypeCode = propertyType.sampleTypeCode; -- GitLab