From 07a668a66b2aa9a38a825f765b91e09dccb92c53 Mon Sep 17 00:00:00 2001 From: alaskowski <alaskowski@ethz.ch> Date: Thu, 25 May 2023 08:42:15 +0200 Subject: [PATCH] SSDM-13524: disabled assigning new property types to material types in admin UI --- .../EntityTypeFormParametersProperty.jsx | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormParametersProperty.jsx b/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormParametersProperty.jsx index 7daf5b9f370..8fb37ec2736 100644 --- a/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormParametersProperty.jsx +++ b/ui-admin/src/js/components/types/form/entitytype/EntityTypeFormParametersProperty.jsx @@ -313,12 +313,27 @@ class EntityTypeFormParametersProperty extends React.PureComponent { }) } } else { - openbis.DataType.values.map(dataType => { - options.push({ - label: new DataType(dataType).getLabel(), - value: dataType + const objectType = this.getType().objectType.value; + if(objectType == 'materialType') { + //Filter out new data types for materials + const filtered = [openbis.DataType.ARRAY_STRING, openbis.DataType.ARRAY_INTEGER, + openbis.DataType.ARRAY_REAL, openbis.DataType.ARRAY_TIMESTAMP, openbis.DataType.JSON]; + openbis.DataType.values.map(dataType => { + if(!filtered.includes(dataType)) { + options.push({ + label: new DataType(dataType).getLabel(), + value: dataType + }) + } }) - }) + } else { + openbis.DataType.values.map(dataType => { + options.push({ + label: new DataType(dataType).getLabel(), + value: dataType + }) + }) + } } const { mode, classes } = this.props -- GitLab