Skip to content

Commit

Permalink
Fix: Enhance agent chip component (#731)
Browse files Browse the repository at this point in the history
* disable email displaying in agents chips tooltip

* display agent acronym for organization in agent chip component when available

* hide email in agent chip tooltip only for agents and not for contacts
  • Loading branch information
Bilelkihal authored Aug 7, 2024
1 parent b80f07c commit 209337e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/agent_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def display_agent(agent, link: true)

def agent_tooltip(agent)
name = agent.name
email = agent.email
email = agent.email unless agent.class.eql?(LinkedData::Client::Models::Agent)
type = agent.agentType
identifiers = display_identifiers(agent.identifiers, link: false)
identifiers = orcid_number(identifiers)
Expand Down Expand Up @@ -232,7 +232,7 @@ def agent_chip_component(agent)
name = agent
title = nil
else
name = agent.name
name = agent.agentType.eql?("organization") ? (agent.acronym || agent.name) : agent.name
agent_icon = agent.agentType.eql?("organization") ? organization_icon : person_icon
title = agent_tooltip(agent)
end
Expand Down

0 comments on commit 209337e

Please sign in to comment.