diff --git a/src/components/Dashboard/common/ObjectProperty.jsx b/src/components/Dashboard/common/ObjectProperty.jsx index 4ddad40..87f410f 100644 --- a/src/components/Dashboard/common/ObjectProperty.jsx +++ b/src/components/Dashboard/common/ObjectProperty.jsx @@ -38,6 +38,7 @@ import ObjectTypeSelect from './ObjectTypeSelect' import ObjectTypeDisplay from './ObjectTypeDisplay' import CodeBlockEditor from './CodeBlockEditor' import StateDisplay from './StateDisplay' +import AlertsDisplay from './AlertsDisplay' const { Text } = Typography @@ -105,6 +106,10 @@ const ObjectProperty = ({ suffix = suffix(objectData) } + if (masterFilter && typeof masterFilter == 'function' && objectData) { + masterFilter = masterFilter(objectData) + } + if (!value) { value = getPropertyValue(objectData, name) } @@ -116,7 +121,7 @@ const ObjectProperty = ({ formItemName = name ? name.split('.') : undefined } - var textParams = {} + var textParams = { style: { whiteSpace: 'nowrap' } } if (disabled == true) { textParams = { ...textParams, delete: true, type: 'secondary' } @@ -317,7 +322,7 @@ const ObjectProperty = ({ ) } case 'object': { - if (value && value.name) { + if (value && value._id) { return } else { return ( @@ -385,9 +390,9 @@ const ObjectProperty = ({ ) } } - case 'mm': { - if (value != null) { - return {`${value} mm`} + case 'alerts': { + if (value != null && value?.length != 0) { + return } else { return (