Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: display all affiliations #1875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlinmack
Copy link
Contributor

@carlinmack carlinmack commented Nov 12, 2024

❤️ Thank you for your contribution!

Description

Please describe briefly your pull request.

Currently we just show the first affiliation. After:

image

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

Copy link

@zubeydecivelek zubeydecivelek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTU! Peer reviewed with @jrcastro2

@@ -27,10 +27,10 @@ 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 affiliations = value?.affiliations.map((affiliation) => affiliation.name);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Looks like this works fine from the screenshot you have shared. Just double checking that affiliations is not silently failing in the console when it's not present, I guess it will be an empty list which is fine, otherwise we would also need to add the ? operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope no failure in console :)

@carlinmack carlinmack self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review 🔎
Development

Successfully merging this pull request may close these issues.

3 participants