{% load i18n %}

{% trans "Мои задачи" %}

{% trans "Задачи, созданные вами или назначенные вам" %}

{{ department_tree|json_script:"department-tree-data" }} {% if form_error %}
{{ form_error }}
{% endif %}
{% trans "Новая задача" %}
{% csrf_token %} {% trans 'Ответственный' as l_resp %}{% trans '+ Добавить ответственного' as p_resp %}{% trans 'Соисполнители' as l_co %}{% trans '+ Добавить соисполнителя' as p_co %}{% trans 'Наблюдатели' as l_obs %}{% trans '+ Добавить наблюдателя' as p_obs %}
{% include 'partials/people-picker-field.html' with label=l_resp field_name='responsible' options=employee_options selected_ids=preselect_responsible_ids placeholder=p_resp %} {% include 'partials/people-picker-field.html' with label=l_co field_name='co_executors' options=employee_options selected_ids=empty_ids placeholder=p_co %} {% include 'partials/people-picker-field.html' with label=l_obs field_name='observers' options=employee_options selected_ids=empty_ids placeholder=p_obs %}
{% with base="display:inline-flex; align-items:center; gap:0.375rem; padding:0.375rem 0.75rem; border-radius:calc(var(--radius) - 2px); font-size:0.8125rem; font-weight:500; text-decoration:none; cursor:pointer;" %} {% trans "Все" %} {{ counts.all }} {% trans "Ожидает" %} {{ counts.pending }} {% trans "В работе" %} {{ counts.in_progress }} {% trans "Выполнено" %} {{ counts.done }} {% endwith %}
{% for task in tasks %}
{% csrf_token %}
{{ task.title }}
{% if task.description %}{{ task.description|truncatechars:90 }}{% endif %} {% if task.display_people %} → {% for a in task.display_people %}{{ a.get_full_name }}{% if not forloop.last %}, {% endif %}{% endfor %} {% endif %}
{% if task.status == 'done' %} {% trans "Выполнено" %} {% elif task.status == 'in_progress' %} {% trans "В работе" %} {% elif task.status == 'cancelled' %} {% trans "Отменено" %} {% else %} {% trans "Ожидает" %} {% endif %} {% if task.due_date %} {{ task.due_date|date:"d.m.Y" }} {% endif %} {{ task.get_priority_display }} {% if task.can_edit %} {% endif %} {% if task.can_delete %}
{% csrf_token %}
{% endif %}
{% empty %}
{% if active_status %}{% trans "Задач с таким статусом нет" %}{% else %}{% trans "Задач пока нет — создайте первую" %}{% endif %}
{% endfor %}