diff --git a/src/components/Dashboard/common/IdDisplay.jsx b/src/components/Dashboard/common/IdDisplay.jsx index ed19950..1329c36 100644 --- a/src/components/Dashboard/common/IdDisplay.jsx +++ b/src/components/Dashboard/common/IdDisplay.jsx @@ -11,6 +11,8 @@ const { Text, Link } = Typography const IdDisplay = ({ id, + reference = null, + plainCode = false, type, showCopy = true, longId = true, @@ -44,23 +46,37 @@ const IdDisplay = ({ displayId = prefix + ':' + id.toString().slice(-6) } + if (reference) { + displayId = prefix + ':' + reference + } + return ( {(() => { - const textElement = ( - {displayId} - + ) + if (plainCode == false) { + textElement = ( + + {displayId} + + ) + } + // If hyperlink is enabled if (showHyperlink && hyperlink != null) { const linkElement = ( @@ -128,9 +144,11 @@ const IdDisplay = ({ IdDisplay.propTypes = { id: PropTypes.string, type: PropTypes.string, + reference: PropTypes.string, showCopy: PropTypes.bool, longId: PropTypes.bool, showHyperlink: PropTypes.bool, + plainCode: PropTypes.bool, showSpotlight: PropTypes.bool }