{% extends "layouts/base.twig" %} {% block title %}{{ translations.employees ?? 'Pracownicy' }}{% endblock %} {% block head %} {{ parent() }} {% endblock %} {% block page_heading %}

{{ translations.employees ?? 'Pracownicy' }}

{{ translations.employees_subtitle ?? '' }}

{% endblock %} {% block content %}

{{ translations.employees ?? 'Pracownicy' }}

{{ translations.add_employee ?? 'Dodaj pracownika' }}
{# ── Pasek filtrów ── #}
{# ── Licznik ── #}
{{ translations.showing ?? 'Wyświetlono' }}: 0 / {{ employees|length }}
{# ── Tabela ── #}
{% for employee in employees %} {% set isInactive = employee.isSoftDelete() %} {# Kolumna stawki godzinowej #} {# Kolumna oceny — wypełniana przez JS po załadowaniu summary #} {% endfor %}
{{ translations.full_name ?? 'Imię i nazwisko' }} {{ translations.workstation ?? 'Stanowisko' }} {{ translations.lang ?? 'Język' }} {{ translations.franchise_role ?? 'Typ pracownika' }} {{ translations.status ?? 'Status' }} {{ translations.salary ?? 'Stawka' }} {{ translations.rating ?? 'Ocena' }} {{ translations.actions ?? 'Akcje' }}
{% if isInactive %} {% else %} {% endif %} {{ employee.getDisplayName() ?: (employee.getName() ~ ' ' ~ employee.getSurname()) }} {% if employee.getLogin() %}
{{ employee.getLogin() }}
{% endif %}
{% set empWorkstations = employee.getWorkstations() %} {% if empWorkstations is empty %} {% else %}
{% for ws in empWorkstations %} {{ ws.getName() }} {% endfor %}
{% endif %}
{% if employee.getLangCode() %} {{ employee.getLangCode()|upper }} {% else %}-{% endif %} {% set role = employee.getFranchiseRole() %} {% if role == 'franchisee' %} {{ translations.franchise_role_franchisee ?? 'Franczyzobiorca' }} {% elseif role == 'franchise_partner' %} {{ translations.franchise_role_franchise_partner ?? 'Partner franczyzowy' }} {% else %} {{ translations.franchise_role_employee ?? 'Pracownik' }} {% endif %} {% if isInactive %} {{ translations.inactive ?? 'Nieaktywny' }} {% else %} {{ translations.active ?? 'Aktywny' }} {% endif %} {% if employee.getMoneyPerHour() > 0 %} {{ employee.getMoneyPerHour() }} €/h {% else %} {% endif %}
{% if role != 'franchisee' %} {% endif %}
{% if employees|length == 0 %}

{{ translations.no_employees ?? 'Brak pracowników.' }}

{% endif %}
{# ── Modal ocen pracownika ───────────────────────────────────────────── #} {# ── END Modal ocen ──────────────────────────────────────────────────── #} {# ── Modal stawki godzinowej ─────────────────────────────────────────────────────── #} {# ── END Modal stawki ─────────────────────────────────────────────────────────────────── #} {% endblock %} {% block scripts %} {% endblock %}