improve(company): clickable contact person avatar and name linking to profile
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Shows profile photo if available, links avatar and name to user profile page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-20 13:50:29 +01:00
parent 64f0d96c2a
commit 3638e34c09

View File

@ -1701,13 +1701,17 @@
<div style="background: var(--background); border-radius: var(--radius-lg); padding: var(--spacing-lg); border: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--spacing-sm);">
{# Name + role header #}
<div style="display: flex; align-items: center; gap: var(--spacing-sm); flex-wrap: wrap;">
<div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
<a href="{{ url_for('public.user_profile', user_id=uc.user.id) }}" style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); display: flex; align-items: center; justify-content: center; flex-shrink: 0; text-decoration: none; color: white; overflow: hidden;">
{% if uc.user.avatar_path %}
<img src="{{ url_for('static', filename=uc.user.avatar_path) }}" style="width: 100%; height: 100%; object-fit: cover;">
{% else %}
<svg width="20" height="20" fill="white" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
</div>
{% endif %}
</a>
<div style="flex: 1; min-width: 0;">
<div style="font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
<a href="{{ url_for('public.user_profile', user_id=uc.user.id) }}" style="font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-decoration: none;" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">
{{ uc.user.name or 'Użytkownik' }}
</div>
</a>
<div style="display: flex; align-items: center; gap: var(--spacing-xs); flex-wrap: wrap; margin-top: 2px;">
{% if uc.role == 'MANAGER' %}
<span style="font-size: 11px; background: #dbeafe; color: #1d4ed8; padding: 2px 8px; border-radius: 4px; font-weight: 600;">Zarządzający</span>