Merge pull request #8283 from artoscinote/ma_SCI_11625

Fix user smart annotations if user is not in current team [SCI-11625]
This commit is contained in:
Martin Artnik 2025-02-28 15:49:36 +01:00 committed by GitHub
commit d74ce25f12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -27,9 +27,9 @@ class SmartAnnotationsController < ApplicationController
avatar_url: user_avatar_absolute_url(resource, :thumb),
info: I18n.t(
'atwho.users.popover_html',
role: user_team_assignment.user_role.name.capitalize,
team: user_team_assignment.assignable.name,
time: I18n.l(user_team_assignment.created_at, format: :full_date)
role: user_team_assignment ? user_team_assignment.user_role.name.capitalize : '/',
team: user_team_assignment ? user_team_assignment.assignable.name : I18n.t('atwho.users.not_in_this_team'),
time: user_team_assignment ? I18n.l(user_team_assignment.created_at, format: :full_date) : '/'
)
}
end

View file

@ -3937,7 +3937,7 @@ en:
title: 'Insert custom well plate'
name_label: 'Well plate name'
name_placeholder: 'Plate'
dimension_label: 'Dimensions (rows x columns)'
dimension_label: 'Dimensions (rows x columns)'
options:
up_arrow_title: "Move step up"
down_arrow_title: "Move step down"
@ -4227,6 +4227,7 @@ en:
title: "People"
header: "Type the name or email of the user you want to mention (they will be notified)"
help: "Navigate: ↑ ↓ • Insert: Enter / Tab • Dismiss: Esc"
not_in_this_team: 'Not in this team'
popover_html: "<span class='silver'>Team:</span>&nbsp;%{team} <br> <span class='silver'>Role:</span>&nbsp;%{role} <br> <span class='silver'>Joined:</span>&nbsp;%{time}"
res:
archived: "(archived)"