Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit daaa5cd9 authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: show external ids

parent 5392993e
......@@ -144,6 +144,7 @@ export default function ItemLayout({
sourceItemId={item.sourceItemId}
dateCreated={item.dateCreated}
dateLastUpdated={item.dateLastUpdated}
externalIds={item.externalIds}
/>
</VStack>
</SideColumn>
......@@ -364,11 +365,11 @@ const ADDITIONAL_HIDDEN_PROPERTIES = ['thumbnail', 'media']
interface ItemMetadata {
properties: ItemProperties
contributors: ItemContributors
licenses?: Item['licenses']
source?: Item['source']
sourceItemId?: Item['sourceItemId']
dateCreated?: string
dateLastUpdated?: string
externalIds?: Item['externalIds']
}
/**
......@@ -416,6 +417,7 @@ function useItemMetadata({
sourceItemId,
dateCreated,
dateLastUpdated,
externalIds,
}: ItemMetadata) {
const metadata: any = {}
......@@ -601,5 +603,20 @@ function useItemMetadata({
}
}
if (Array.isArray(externalIds) && externalIds.length > 0) {
metadata.externalIds = (
<ul className="py-8 space-y-6">
{externalIds.map((id) => {
return (
<li key={id.identifier} className="flex space-x-2">
<span>{id.identifierService?.label}:</span>
<span>ID: {id.identifier}</span>
</li>
)
})}
</ul>
)
}
return metadata
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment