{# ===== НОВАЯ ШАПКА С КОМПОНЕНТОМ ===== #}
{% include "includes/components/page_header.html" with icon="bi-people" title="Сотрудники" count=employees|length count_label=count_label search_id="empFilter" search_placeholder="Поиск по ФИО, должности или отделу" has_filters=True filters_target="empFilters" filters_template="employees/_filters.html" create_as_card=True create_modal="createEmployeeModal" create_text="Создать профиль" %}
{% for d in emp.departments %}
{% if d.name %}
{% if d.id %}
{{ d.name }}
{% else %}
{{ d.name }}
{% endif %}
{% if not forloop.last %}, {% endif %}
{% endif %}
{% endfor %}
{% elif is_filtered_by_department and current_department %}
{{ current_department.name }}
{% endif %}
{% if emp.id and user.id != emp.id %}
{% if can_manage_roles and is_filtered_by_department and current_department and emp.id != current_department.head_id %}
Роль
{% endif %}
Чат
{% endif %}