{% load common_tags %} {% load i18n %} {% if is_own_profile %} {% include "partials/employee-profile-hr-requests.html" %} {% endif %}
{% if employee.manager or manager_chain or subordinates or employee.groups.all %}

{% trans "Структура" %}

{% if employee.manager %}
{% trans "Руководитель" %}
{{ employee.manager|initials }} {{ employee.manager.get_full_name }}
{% endif %} {% if employee.groups.all %}
{% trans "Группы доступа" %}
{% for group in employee.groups.all %} {{ group.name }} {% endfor %}
{% endif %}
{% if subordinates %}
{% trans "Подчинённые" %} · {{ subordinates|length }}
{% for sub in subordinates %} {{ sub|initials }} {{ sub.get_full_name }} {% if sub.post %}{{ sub.post.name }}{% endif %} {% endfor %}
{% elif employee.is_manager %}
{% trans "Нет подчинённых" %}
{% endif %} {% if manager_chain|length > 1 %}
{% trans "Цепочка руководства" %}
{% for mgr in manager_chain %} {% if not forloop.first %}→{% endif %} {{ mgr.get_full_name }} {% endfor %}
{% endif %}
{% endif %} {% if can_view_pii %}
{% if employee.hire_date %}
{% trans "Стаж" %}
{% trans "с" %} {{ employee.hire_date|date:"d.m.Y" }} · {{ employee.work_experience }} {% trans "л." %} · {{ employee.get_employment_type_display }}
{% endif %} {% if last_attendance %}
{% trans "Последнее посещение" %}
{% if last_attendance.direction == 'in' %}{% trans "Приход" %}{% else %}{% trans "Выход" %}{% endif %} · {{ last_attendance.timestamp|date:"d.m.Y H:i" }} · {{ last_attendance.location.name }}
{% endif %}
Mattermost {% if employee.mattermost_sync_status == 'synced' %}OK{% elif employee.mattermost_sync_status == 'error' %}{% trans "Ошибка" %}{% else %}—{% endif %} AD {% if employee.ad_sync_status == 'synced' %}OK{% elif employee.ad_sync_status == 'error' %}{% trans "Ошибка" %}{% else %}—{% endif %}
{% elif not is_own_profile and not can_view_pii %}
{% trans "Контакты доступны руководителю и HR." %}
{% endif %}
{% if recent_tasks %}

{% trans "Задачи" %} · {{ recent_tasks_total }}

{% trans "Все задачи" %}
{% for task in recent_tasks %}
{{ task.title|truncatechars:80 }}
{% if task.status == 'done' %}{% trans "Выполнено" %}{% elif task.status == 'in_progress' %}{% trans "В работе" %}{% else %}{% trans "Ожидает" %}{% endif %} {% if task.due_date %} · {% trans "до" %} {{ task.due_date|date:"d.m.Y" }}{% endif %}
{{ task.get_priority_display }}
{% endfor %} {% if recent_tasks_hidden %}
{% trans "и ещё" %} {{ recent_tasks_hidden }}…
{% endif %}
{% endif %} {% if is_own_profile %}

{% trans "Служебные данные (должность, отдел, рабочий email) редактирует администратор." %}

{% endif %}