{% extends "base.html" %} {% block title %}گزارش‌ها{% endblock %} {% block page_title %} گزارش‌ها{% endblock %} {% block head %} {% if tab == 'forwarding' %} {% endif %} {% endblock %} {% block content %} {% if tab == 'forwarding' and summary %}
{{ summary.date_from }} تا {{ summary.date_to }}
{{ summary.total_received }}
دریافت‌شده
{{ summary.total_tg_sent }}
ارسال تلگرام
{{ summary.total_bale_sent }}
ارسال بله
{{ summary.total_failed }}
ناموفق
{{ summary.total_ai_ok }}
هوش مصنوعی موفق
{{ summary.total_media }}
پیام رسانه‌ای
{% if summary.total_received > 0 %} {% set tg_rate = ((summary.total_tg_sent / summary.total_received) * 100)|round(1) %} {% set bale_rate = ((summary.total_bale_sent / summary.total_received) * 100)|round(1) %} {% set ai_rate = ((summary.total_ai_ok / summary.total_received) * 100)|round(1) %}
نرخ موفقیت تلگرام {{ tg_rate }}%
نرخ موفقیت بله {{ bale_rate }}%
نرخ پردازش هوش مصنوعی {{ ai_rate }}%
{% endif %} {% if summary.daily %}
روند روزانه
{% endif %} {% if summary.channel_stats %}
آمار بر اساس کانال منبع
{% for row in summary.channel_stats %} {% set rate = ((row.sent or 0) / row.total * 100)|round(1) if row.total else 0 %} {% endfor %}
کانالدریافتارسال‌شده ناموفقنرخ موفقیت
{{ row[0] or 'نامشخص' }} {{ row.total }} {{ row.sent or 0 }} {{ row.failed or 0 }}
{{ rate }}%
{% endif %} {% endif %}
{{ reports[tab].title }} — {{ result.total }} رکورد
{% for k, v in filters.items() %}{% if k not in ('q', 'page', 'tab') %}{% endif %}{% endfor %}
{% for f in reports[tab].filters %} {% endfor %} {% if filters|length > 1 %} پاک‌سازی فیلترها {% endif %}
{% for key, label in result.columns %} {% set is_sorted = filters.get('sort') == key %} {% set next_dir = 'asc' if (is_sorted and filters.get('dir') == 'desc') else 'desc' %} {% endfor %} {% for row in result.rows %} {% for key, _ in result.columns %} {% endfor %} {% else %} {% endfor %}
{{ label }} {% if is_sorted %}{% endif %}
{{ row.get(key, '—') }}
داده‌ای یافت نشد
{% if result.total_pages > 1 %}
صفحه {{ result.page }} از {{ result.total_pages }}
{% endif %}
{% endblock %} {% block scripts %} {% if tab == 'forwarding' and summary and summary.daily %} {% endif %} {% endblock %}