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

{{ translations.franchise_employee ?? 'Pracownik' }}

{{ translations.franchise_employee_subtitle ?? '' }}

{% endblock %} {% block content %}
{# ── Główna karta ── #}

{{ employee.getDisplayName() ?: (employee.getName() ~ ' ' ~ employee.getSurname()) }}

{{ shop.getName() }} {% if employee.getProductionAreaName() %} • {{ employee.getProductionAreaName() }}{% endif %} {% if employee.getLangCode() %} • {{ employee.getLangCode()|upper }}{% endif %}
{% if employee.isSoftDelete() %} {{ translations.inactive ?? 'Nieaktywny' }} {% else %} {{ translations.active ?? 'Aktywny' }} {% endif %}
{{ translations.edit ?? 'Edytuj' }} {% if employee.isSoftDelete() %} {% else %} {% endif %}
{# ── Dane podstawowe ── #}
{{ translations.employee_profile ?? 'Profil pracownika' }}
{{ translations.basic_data ?? 'Dane podstawowe' }}
{{ translations.first_name ?? 'Imię' }}
{{ employee.getName() }}
{{ translations.surname ?? 'Nazwisko' }}
{{ employee.getSurname() }}
{{ translations.phone ?? 'Telefon' }}
{{ employee.getPhone() ?: '-' }}
{{ translations.login ?? 'Login' }}
{{ employee.getLogin() ?: '-' }}
{{ translations.organization ?? 'Organizacja' }}
{{ translations.franchise ?? 'Franczyza' }}
{{ shop.getName() }}
{{ translations.production_area ?? 'Obszar produkcji' }}
{{ employee.getProductionAreaName() ?: '-' }}
{{ translations.workstation ?? 'Stanowisko pracy' }}
{{ employee.getWorkstationString() ?: '-' }}
{{ translations.lang ?? 'Język' }}
{{ employee.getLangCode() ? employee.getLangCode()|upper : '-' }}
{{ translations.franchise_role ?? 'Typ pracownika' }}
{% 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 %}
{{ translations.employment_type ?? 'Forma zatrudnienia' }}
{% set et = employee.getEmploymentType() %} {% if et == 'civil_law_contract' %} {{ translations.employment_type_civil_law_contract ?? 'Umowa cywilnoprawna' }} {% elseif et == 'b2b' %} {{ translations.employment_type_b2b ?? 'B2B' }} {% elseif et == 'temporary_work' %} {{ translations.employment_type_temporary_work ?? 'Praca tymczasowa' }} {% elseif et == 'internship' %} {{ translations.employment_type_internship ?? 'Staż / Praktyka' }} {% elseif et == 'volunteer' %} {{ translations.employment_type_volunteer ?? 'Wolontariat' }} {% elseif et == 'other' %} {{ translations.employment_type_other ?? 'Inne' }} {% else %} {{ translations.employment_type_employment_contract ?? 'Umowa o pracę' }} {% endif %}
{# ── Stanowiska (read-only) ── #}
{{ translations.positions ?? 'Stanowiska' }}
{% set positions = employee.getPositions() ?? [] %} {% if positions|length == 0 %}
{{ translations.no_positions_assigned ?? 'Brak przypisanych stanowisk.' }}
{% else %}
{% for pos in positions %}
{{ pos.getName() ?? '-' }}
{{ translations.level ?? 'Poziom' }}: {{ pos.getLevelName() ?? '-' }}
{% if pos.getDescription() %}
{{ pos.getDescription() }}
{% endif %}
{% endfor %}
{% endif %} {# ── Stanowiska pracy ── #}
{{ translations.workstations ?? 'Stanowiska pracy' }}
{% set workstations = employee.getWorkstations() ?? [] %} {% if workstations|length == 0 %}
{{ translations.no_workstations_assigned ?? 'Brak przypisanych stanowisk pracy.' }}
{% else %}
{% for ws in workstations %}
{{ ws.getName() ?? '-' }}
{% if ws.getDescription() %}
{{ ws.getDescription() }}
{% endif %}
{% endfor %}
{% endif %}
{# /card-body #}
{# ── Sidebar szybkich akcji ── #}
{% endblock %} {% block scripts %} {% endblock %}