diff --git a/app/assets/stylesheets/components/ElementsTable.scss b/app/assets/stylesheets/components/ElementsTable.scss index 9276170e6f..dd1afb62c1 100644 --- a/app/assets/stylesheets/components/ElementsTable.scss +++ b/app/assets/stylesheets/components/ElementsTable.scss @@ -39,7 +39,15 @@ } .sample-entries > tbody > tr > td { - border-top: 0 + border-top: 0; + + .sample-entries-inventory-label-icon { + margin-top: 3px; + padding: 4px 4px 4px 4px; + border-radius: 4px; + background-color: #96c7e7; + color: black; + } } @media only screen and (max-width: 1500px) { diff --git a/app/packs/src/apps/mydb/elements/details/samples/SampleDetails.js b/app/packs/src/apps/mydb/elements/details/samples/SampleDetails.js index 61bd6835b9..e824330758 100644 --- a/app/packs/src/apps/mydb/elements/details/samples/SampleDetails.js +++ b/app/packs/src/apps/mydb/elements/details/samples/SampleDetails.js @@ -951,13 +951,15 @@ export default class SampleDetails extends React.Component { /> ) : null; + const inventoryLabel = sample.inventory_sample && sample.xref.inventory_label ? sample.xref.inventory_label : null; + return (
{titleTooltip}}> - {sample.title()} + {inventoryLabel || sample.title()} diff --git a/app/packs/src/apps/mydb/elements/list/ElementsTableSampleEntries.js b/app/packs/src/apps/mydb/elements/list/ElementsTableSampleEntries.js index ed4930b9ca..5dbc436d80 100644 --- a/app/packs/src/apps/mydb/elements/list/ElementsTableSampleEntries.js +++ b/app/packs/src/apps/mydb/elements/list/ElementsTableSampleEntries.js @@ -1,6 +1,10 @@ import React, { Component } from 'react'; import { +<<<<<<< HEAD Table, Button, Tooltip, OverlayTrigger +======= + Table, Button, Tooltip, OverlayTrigger, Label, Badge, +>>>>>>> 74d5cb020 (feat: add sample inventory label tag in sample entries list) } from 'react-bootstrap'; import classnames from 'classnames'; import PropTypes from 'prop-types'; @@ -107,6 +111,22 @@ const showDecoupledIcon = (sample) => (sample.decoupled ? ( ) : null); +const showInventoryLabelIcon = (sample) => (sample.inventory_sample && sample.xref.inventory_label ? ( +
+ Inventory Label} + > + + {sample.xref.inventory_label} + + +
+) : null); + const overlayToggle = Toggle Molecule; const svgPreview = (sample) => ( @@ -346,6 +366,7 @@ export default class ElementsTableSampleEntries extends Component { {sample.title(selected)}
+ {showInventoryLabelIcon(sample)}