diff --git a/src/components/common/ConceptContainerVersionList.jsx b/src/components/common/ConceptContainerVersionList.jsx
index 2b6d67da..5b3f6cd4 100644
--- a/src/components/common/ConceptContainerVersionList.jsx
+++ b/src/components/common/ConceptContainerVersionList.jsx
@@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
import alertifyjs from 'alertifyjs';
import {
Accordion, AccordionSummary, AccordionDetails, Typography, Divider, Tooltip,
- IconButton, CircularProgress
+ IconButton, CircularProgress, Chip
} from '@mui/material';
import { map, isEmpty, startCase, get, includes, merge } from 'lodash';
import {
@@ -29,6 +29,33 @@ const ACCORDIAN_DETAILS_STYLES = {
maxHeight: '300px', overflow: 'auto', display: 'inline-block', width: '100%'
}
+
+const StateChip = ({label, state}) => {
+ const getColorByTaskState = state => {
+ if(state === 'SUCCESS')
+ return 'success'
+ if(state === 'REVOKED')
+ return 'default'
+ if (state === 'FAILED')
+ return 'error'
+ if (['RECEIVED', 'STARTED'].includes(state))
+ return 'warning'
+ return 'info'
+ }
+
+ return state ? (
+
+
+
+ ) : null
+}
+
const getTag = (tag, item) => {
let value = get(item, tag.value, null)
value = value === null ? '-' : value.toLocaleString()
@@ -110,6 +137,7 @@ const ConceptContainerVersionList = ({ versions, resource, canEdit, onUpdate, fh
})
}
+
return (
@@ -156,6 +184,16 @@ const ConceptContainerVersionList = ({ versions, resource, canEdit, onUpdate, fh
containerStyle={{display: 'flex'}}
/>
+ {
+ !isEmpty(version.states) &&
+
+
+
+
+
+
+
+ }
{
diff --git a/src/components/sources/SourceHome.jsx b/src/components/sources/SourceHome.jsx
index ef2cdd95..df4ca484 100644
--- a/src/components/sources/SourceHome.jsx
+++ b/src/components/sources/SourceHome.jsx
@@ -12,7 +12,7 @@ import ConceptHome from '../concepts/ConceptHome';
import MappingHome from '../mappings/MappingHome';
import ResponsiveDrawer from '../common/ResponsiveDrawer';
import { SOURCE_DEFAULT_CONFIG } from "../../common/defaultConfigs"
-import { paramsToURI, paramsToParentURI } from '../../common/utils';
+import { paramsToURI, paramsToParentURI, isLoggedIn } from '../../common/utils';
import { OperationsContext } from '../app/LayoutContext';
const TABS = ['details', 'concepts', 'mappings', 'versions', 'summary', 'about']
@@ -116,7 +116,7 @@ class SourceHome extends React.Component {
APIService
.new()
.overrideURL(this.sourcePath + 'versions/')
- .get(null, null, {verbose: true, limit: 1000})
+ .get(null, null, {verbose: true, limit: 1000, includeStates: isLoggedIn()})
.then(response => {
this.setState({versions: response.data, isLoadingVersions: false}, () => {
if(this.isVersionTabSelected())