{% extends "base.html" %} {% block title %}Inbox{% endblock %} {% block content %}
{# ── Header row ── #}

Inbox

{{ total_count }} ticket{{ 's' if total_count != 1 }}
{# ── Filters ── #}
{% if filters.status or filters.priority or filters.tag or filters.search or filters.product %} Clear {% endif %}
{# ── Ticket table ── #}
{% for ticket in tickets %} {# Star toggle #} {# ID + external link #} {# Last message preview #} {# Subject + snippet #} {# Product (icon only, tooltip shows name) #} {# PS Version #} {# Status badge #} {# Priority badge #} {# Support status #} {# Last activity #} {% else %} {% endfor %}
Star ID Msg Subject Product PS Status Priority Support Last Activity
#{{ ticket.provider_thread_id or ticket.id }} {% if ticket.provider_thread_id %} open_in_new {% endif %} {% if not ticket.is_read %} {% endif %} {% if ticket.has_ai %} psychology {% endif %} {% if ticket.customer_revenue and ticket.customer_revenue|float > 500 %} VIP {% elif ticket.customer_revenue and ticket.customer_revenue|float > 100 %} military_tech {% endif %}
{% if ticket.last_msg_direction %}
{% if ticket.last_msg_direction == 'inbound' %} call_received {% else %} call_made {% endif %}
{% else %} - {% endif %}
{{ ticket.subject }} {% if ticket.last_snippet %}

{{ ticket.last_snippet }}

{% endif %}
{% if ticket.product_type == 'business_care' %} {% if ticket.id_product %}
BC
{% else %}
BC
{% endif %} {% elif ticket.pico_url %} {% if ticket.id_product %} {{ ticket.product_name or '' }} {% else %} {{ ticket.product_name or '' }} {% endif %} {% else %} - {% endif %}
{{ ticket.ps_version or '-' }} {% if ticket.status == 'open' %} Open {% elif ticket.status == 'in_progress' %} In Progress {% elif ticket.status == 'waiting_customer' %} Waiting {% elif ticket.status == 'closed' %} Closed {% else %} {{ ticket.status }} {% endif %} {% if ticket.priority == 'p1' %} P1 {% elif ticket.priority == 'p2' %} P2 {% elif ticket.priority == 'p3' %} P3 {% else %} P4 {% endif %} {% if ticket.is_support_expired %} errorExpired {% else %} check_circleActive {% endif %} {{ ticket.last_activity_at.strftime('%Y-%m-%d %H:%M') if ticket.last_activity_at else '-' }}
inbox

No tickets found.

Try adjusting your filters or sync new messages.

{# ── Pagination ── #} {% if total_pages > 1 %}

Page {{ page }} of {{ total_pages }}

{% if page > 1 %} chevron_left {% endif %} {% for p in range(1, total_pages + 1) %} {% if p == page %} {{ p }} {% elif p == 1 or p == total_pages or (p >= page - 2 and p <= page + 2) %} {{ p }} {% elif p == 2 or p == total_pages - 1 %} {% endif %} {% endfor %} {% if page < total_pages %} chevron_right {% endif %}
{% endif %}
{% endblock %}