{% extends "base.html" %} {% block title %}{{ t('tickets') }} | {{ app_name }}{% endblock %} {% block content %}

{{ t('tickets') }}

{{ t('ticket_filters_title') }}

{{ ltext('Export Excel / تصدير Excel') }} {% if user_can('create_ticket') %} {{ t('create_ticket') }} {% endif %}
{% if tickets.items %}
{% for ticket in tickets.items %}
{{ ticket.ticket_number }}

{{ ticket.title }}

{{ ticket.status.name if ticket.status else ('N/A'|ltext) }}

{{ (ticket.description[:160] ~ '...') if ticket.description and ticket.description|length > 160 else (ticket.description or t('no_description')) }}

{{ ltext('Company / الشركة') }} {{ ticket.company.name if ticket.company else t('internal') }}
{{ ltext('Assignee / المكلّف') }} {{ ticket.assigned_to.full_name if ticket.assigned_to else t('unassigned') }}
{{ ltext('Updated / آخر تحديث') }} {{ ticket.updated_at.strftime('%Y-%m-%d %H:%M') }}
{{ ltext('Priority / الأولوية') }} {{ ticket.priority.name if ticket.priority else ('N/A'|ltext) }}
{% endfor %}
{{ bulk_form.hidden_tag() }}
{{ bulk_form.action(class="input") }} {{ bulk_form.assigned_to_id(class="input") }} {{ bulk_form.status_id(class="input") }} {{ bulk_form.submit(class="button button-secondary") }}
{% for group in status_groups %}

{{ group.status.name if group.status else ('N/A'|ltext) }}

{{ group.tickets|length }}
{% for ticket in group.tickets %} {% endfor %}
{{ ltext('Ticket / التذكرة') }} {{ ltext('Company / الشركة') }} {{ ltext('Priority / الأولوية') }} {{ ltext('Assignee / المكلّف') }} {{ ltext('Updated / آخر تحديث') }}
{{ ticket.ticket_number }}
{{ ticket.title }}
{{ ticket.company.name if ticket.company else t('internal') }} {{ ticket.priority.name if ticket.priority else ('N/A'|ltext) }} {{ ticket.assigned_to.full_name if ticket.assigned_to else t('unassigned') }} {{ ticket.updated_at.strftime('%Y-%m-%d %H:%M') }}
{% endfor %}
{% else %}

{{ ltext('No tickets match the selected filters. / لا توجد نتائج مطابقة.') }}

{% endif %} {% set pagination = tickets %} {% include "partials/pagination.html" %}
{% endblock %}