From e31b76eda895016ac107445af9c04b428b78566f Mon Sep 17 00:00:00 2001 From: Carlin MacKenzie Date: Tue, 12 Nov 2024 10:29:04 +0100 Subject: [PATCH] UI: display all affiliations --- .../deposit/fields/CreatibutorsField/CreatibutorsField.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/fields/CreatibutorsField/CreatibutorsField.js b/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/fields/CreatibutorsField/CreatibutorsField.js index 2a7064df3..b8c3b43b3 100644 --- a/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/fields/CreatibutorsField/CreatibutorsField.js +++ b/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/fields/CreatibutorsField/CreatibutorsField.js @@ -27,10 +27,12 @@ const creatibutorNameDisplay = (value) => { const familyName = _get(value, "person_or_org.family_name", ""); const givenName = _get(value, "person_or_org.given_name", ""); - const affiliationName = _get(value, `affiliations[0].name`, ""); + const affiliationNames = value?.affiliations.map((affiliation) => affiliation.name); const name = _get(value, `person_or_org.name`); - const affiliation = affiliationName ? ` (${affiliationName})` : ""; + const affiliation = affiliationNames.length + ? ` (${affiliationNames.join(", ")})` + : ""; if (isPerson) { const givenNameSuffix = givenName ? `, ${givenName}` : "";