{% extends "base.html" %} {% block title %}Dashboard{% endblock %} {% block content %}

Dashboard

{# ── Date range filter for revenue/order charts ── #}
to {% if dash_filters.date_from or dash_filters.date_to %} Clear {% endif %} download Export CSV
{# ── Ticket summary cards ── #}

Total Tickets

{{ stats.total }}

Unread

{{ stats.unread }}

Open

{{ stats.open }}

Avg Response (3mo)

{% if stats.avg_response_hours is not none %}{{ stats.avg_response_hours }}h{% else %}—{% endif %}

{# ── Revenue + Period cards ── #} {% if revenue_stats and revenue_stats.total_orders > 0 %}

Net Revenue

€{{ revenue_stats.total_revenue }}

Avg €{{ revenue_stats.avg_order_value }}/order

Period Orders

{{ revenue_stats.total_orders }}

New Tickets

{{ period_ticket_stats.new_tickets }}

Inbound Messages

{{ period_ticket_stats.inbound_messages }}

Values may slightly differ from the Addons website.

{% endif %} {# ── Charts section ── #} {% if revenue_stats and revenue_stats.total_orders > 0 %}
{# Orders & Revenue trend #}

Orders & Revenue Trend

{# Top Products by Revenue #}

Top Products by Revenue

{# Top Countries by Orders #}

Top Countries by Orders

{# Customer Value Segments #}

Customer Value Segments

{% endif %}
{# ── Status breakdown ── #}

By Status

{% set max_status = [stats.open, stats.in_progress, stats.waiting_customer, stats.closed]|max or 1 %}
Open
{{ stats.open }}
In Progress
{{ stats.in_progress }}
Waiting
{{ stats.waiting_customer }}
Closed
{{ stats.closed }}
{# ── Priority breakdown ── #}

By Priority

{% set max_prio = [stats.p1, stats.p2, stats.p3, stats.p4]|max or 1 %}
P1 - Critical
{{ stats.p1 }}
P2 - High
{{ stats.p2 }}
P3 - Normal
{{ stats.p3 }}
P4 - Low
{{ stats.p4 }}
{# ── Support expiration alerts ── #} {% if expiring %}

warning Expired Support ({{ expiring|length }} open ticket{{ 's' if expiring|length != 1 }})

{% endif %} {# ── Recent activity ── #}

Recent Activity

{% for t in recent %} {% else %} {% endfor %}
#{{ t.id }} {{ t.subject }} {% if t.status == 'open' %} Open {% elif t.status == 'in_progress' %} In Progress {% elif t.status == 'waiting_customer' %} Waiting {% elif t.status == 'closed' %} Closed {% endif %} {% if t.priority == 'p1' %} P1 {% elif t.priority == 'p2' %} P2 {% elif t.priority == 'p3' %} P3 {% else %} P4 {% endif %} {{ t.last_activity_at.strftime('%Y-%m-%d %H:%M') if t.last_activity_at else '-' }}
No tickets yet.
{# ── Chart.js initialization ── #} {% if revenue_stats and revenue_stats.total_orders > 0 %} {% endif %} {% endblock %}