From bfef74f63d9ffcb09f0ccbad258ace517803b607 Mon Sep 17 00:00:00 2001 From: Harris Tzovanakis Date: Mon, 16 Dec 2024 14:32:18 +0100 Subject: [PATCH] ui: addition of collaborations in Data collection * ref: cern-sis/issues-inspire/issues/640 --- ui/src/data/components/DataItem.jsx | 2 ++ .../components/__tests__/__snapshots__/DataItem.test.jsx.snap | 4 ++-- .../containers/DetailPageContainer/DetailPageContainer.tsx | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/data/components/DataItem.jsx b/ui/src/data/components/DataItem.jsx index f9acbea90..e6f46af2c 100644 --- a/ui/src/data/components/DataItem.jsx +++ b/ui/src/data/components/DataItem.jsx @@ -23,6 +23,7 @@ function DataItem({ metadata, page }) { const recordId = metadata.get('control_number'); const urls = metadata.get('urls'); const canEdit = metadata.get('can_edit', false); + const collaborations = metadata.get('collaborations', []); return (
@@ -74,6 +75,7 @@ function DataItem({ metadata, page }) {
diff --git a/ui/src/data/components/__tests__/__snapshots__/DataItem.test.jsx.snap b/ui/src/data/components/__tests__/__snapshots__/DataItem.test.jsx.snap index 9e1b0d236..b1ae10a97 100644 --- a/ui/src/data/components/__tests__/__snapshots__/DataItem.test.jsx.snap +++ b/ui/src/data/components/__tests__/__snapshots__/DataItem.test.jsx.snap @@ -90,7 +90,7 @@ exports[`DataItem renders with all props set 1`] = ` }, ] } - collaborations={Immutable.List []} + collaborations={Array []} collaborationsWithSuffix={Immutable.List []} enableAuthorsShowAll={false} /> @@ -154,7 +154,7 @@ exports[`DataItem renders with only needed props 1`] = ` diff --git a/ui/src/data/containers/DetailPageContainer/DetailPageContainer.tsx b/ui/src/data/containers/DetailPageContainer/DetailPageContainer.tsx index 9e4dfec11..5ba1dd91c 100644 --- a/ui/src/data/containers/DetailPageContainer/DetailPageContainer.tsx +++ b/ui/src/data/containers/DetailPageContainer/DetailPageContainer.tsx @@ -42,6 +42,7 @@ const DetailPage = ({ const dois = filterDoisByMaterial(metadata.get('dois', [])); const recordId = metadata.get('control_number'); const literatureRecords = metadata.get('literature'); + const collaborations = metadata.get('collaborations'); const urls = metadata.get('urls'); @@ -82,6 +83,7 @@ const DetailPage = ({