diff --git a/src/components/SearchResults/ListView.jsx b/src/components/SearchResults/ListView.jsx index 2b0faefc..f70a6bab 100644 --- a/src/components/SearchResults/ListView.jsx +++ b/src/components/SearchResults/ListView.jsx @@ -63,10 +63,10 @@ const Description = ({ description }) => { const InfoSection = ({ searchResult }) => { const infoItems = [ - { label: 'Preferred ID', value: searchResult.preferredId }, - { label: 'ID', value: searchResult.id }, + { label: 'Preferred ID', value: searchResult.ilx.replace('_', ':').toUpperCase() }, + { label: 'IDs', value: searchResult.existing_ids.flatMap(item => item.curie) }, { label: 'Type', value: searchResult.type }, - { label: 'Score', value: searchResult.score }, + { label: 'Score', value: searchResult.status }, { label: 'Organization', value: searchResult.organization }, ]; @@ -80,10 +80,11 @@ const InfoSection = ({ searchResult }) => { }} > {infoItems.map(({ label, value }) => ( - + {label} - {label === 'ID' ? - : {value} + {label === 'IDs' + ? (value.map((val, index) => ( ))) + : {value} } ))} diff --git a/src/components/SingleTermView/OverView/Details.jsx b/src/components/SingleTermView/OverView/Details.jsx index bfc0f389..8e61303f 100644 --- a/src/components/SingleTermView/OverView/Details.jsx +++ b/src/components/SingleTermView/OverView/Details.jsx @@ -16,6 +16,15 @@ const Details = ({loading, data }) => { window.open(url, '_blank'); }; + const processExistingIds = (existingID) => { + if (Array.isArray(existingID)) { + return existingID; + } else if (typeof existingID === 'string') { + return [existingID]; + } + return []; + } + if (loading) { return @@ -25,6 +34,7 @@ const Details = ({loading, data }) => { if (!data) { return
No data available
; } + return ( <> @@ -34,17 +44,17 @@ const Details = ({loading, data }) => { Synonyms - {data?.synonym && + {data?.synonym && processExistingIds(data?.synonym).map((syn) => ( - {data?.synonym} {data?.synonym} + {syn} {syn} } - /> + />)) }
@@ -55,7 +65,7 @@ const Details = ({loading, data }) => { Preferred ID - {data?.hasIlxPreferredId} + {data?.id} @@ -65,9 +75,9 @@ const Details = ({loading, data }) => { Existing IDs - {data?.existingID && ( - } onClick={() => handleChipClick(data?.existingID)} /> - )} + {data?.existingID && ( processExistingIds(data?.existingID).map((id) => + } onClick={() => handleChipClick(id)} /> + ))} diff --git a/src/components/organizations/index.jsx b/src/components/organizations/index.jsx index 8f5a8e73..d61411a1 100644 --- a/src/components/organizations/index.jsx +++ b/src/components/organizations/index.jsx @@ -24,7 +24,7 @@ const Organizations = () => { const [message, setMessage] = useState(); // TODO: change this to be dynamic when we get the response from api call - const groupname = "aigul" + const groupname = "dariodippi" const fetchOrganizations = async() => { setLoading(true); diff --git a/src/config.js b/src/config.js index 8873acc4..e76315a7 100644 --- a/src/config.js +++ b/src/config.js @@ -24,7 +24,7 @@ export const API_CONFIG = { GET_ENDPOINTS_ILX: "/api/real/endpoints-ilx", PATCH_ENDPOINTS_ILX: "/api/real/patch-endpoints-ilx", SIGNIN: "/u/ops/user-login", - ORCID_SIGNIN: "/u/ops/orcid-new", + ORCID_SIGNIN: "/u/ops/orcid-login", NEWUSER_ILX: "/u/ops/user-new", NEWUSER_ORCID: "/u/ops/orcid-new", CREATE_NEW_ORGANIZATION: "/priv/org-new",