{% load i18n %}

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

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

{{ department_tree|json_script:"department-tree-data" }} {% include "partials/task-create-modal.html" %}
{% 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 %}