fix(ui): Fix Category object rendering on dashboard + simplify nav for regular users
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

- Fix uc.company.category → uc.company.category.name on dashboard
- Replace "Więcej" dropdown with direct "Kaszubia" link for non-owner users
- Owner (Maciej) keeps full "Więcej" dropdown with all items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-09 13:37:08 +01:00
parent e94f8eb38d
commit 9884ac4b5a
2 changed files with 6 additions and 4 deletions

View File

@ -1284,18 +1284,20 @@
<li><a href="{{ url_for('benefits.benefits_list') }}" class="nav-link {% if request.endpoint and 'benefits' in request.endpoint %}active{% endif %}">Korzyści</a></li>
{% endif %}
<!-- Więcej Dropdown -->
<!-- Kaszubia / Więcej Dropdown -->
{% if current_user.is_authenticated and current_user.email == 'maciej.pienczyn@inpi.pl' %}
<li class="nav-dropdown">
<a href="#" class="nav-link">Więcej ▾</a>
<ul class="nav-dropdown-menu">
<li><a href="{{ url_for('zopk_index') }}">Kaszubia</a></li>
{% if current_user.is_authenticated and current_user.email == 'maciej.pienczyn@inpi.pl' %}
<li><a href="{{ url_for('contacts.contacts_list') }}" class="owner-only">Kontakty zewnętrzne</a></li>
<li><a href="{{ url_for('reports.reports_index') }}" class="owner-only">Raporty</a></li>
<li><a href="#" onclick="openConnectionsMap(); return false;" class="owner-only">Mapa Powiązań</a></li>
{% endif %}
</ul>
</li>
{% else %}
<li><a href="{{ url_for('zopk_index') }}" class="nav-link">Kaszubia</a></li>
{% endif %}
<!-- Notifications -->
<li class="notifications-dropdown">

View File

@ -593,7 +593,7 @@
</div>
<span style="color: var(--text-secondary); font-size: 0.85rem;">
{% if uc.role == 'MANAGER' %}Zarządzający{% elif uc.role == 'EMPLOYEE' %}Pracownik{% elif uc.role == 'VIEWER' %}Podgląd{% endif %}
{% if uc.company.category %} · {{ uc.company.category }}{% endif %}
{% if uc.company.category %} · {{ uc.company.category.name }}{% endif %}
</span>
</div>
<div style="display: flex; gap: var(--spacing-sm, 8px);">