{% extends "base.html" %} {% from '_upsell.html' import crown_badge, max_badge, beta_pill %} {% block title %}{{ _("Customers") }}{% endblock %} {% block content %}
| {{ label }}{{ arrow | safe }} | {% endmacro %} {{ sort_th(_('Customer'), 'name') }} {{ sort_th(_('Website'), 'website') }}{{ _("Online") }} | {{ _("Module") }} | {{ sort_th(_('Country'), 'country') }} {{ sort_th(_('Revenue'), 'revenue', 'right') }} {{ sort_th(_('Orders'), 'orders', 'center') }} {{ sort_th(_('Products'), 'products', 'center') }} {{ sort_th(_('Tickets'), 'tickets', 'center') }}{{ _("BC") }} | {{ sort_th(_('Last Activity'), 'activity') }}|||||||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ c.display_name }} | {# Website URL #}{% if c.website %} {% set ws_href = c.website if c.website.startswith('http') else 'https://' + c.website %} {{ c.website | truncate(30) }} {% else %} -- {% endif %} | {# Online status #}{% set ss = site_status.get(c.customer_hash) %} {% if ss and ss.is_online == true %} {% set tip = _('Online') %} {% if ss.error_message %}{% set tip = _('Online') ~ ' (' ~ ss.http_status ~ ' — ' ~ ss.error_message ~ ')' %} {% elif ss.http_status %}{% set tip = _('Online') ~ ' (' ~ ss.http_status ~ ', ' ~ (ss.response_time_ms or '?') ~ 'ms)' %}{% endif %} {% elif ss and ss.is_online == false %} {% set tip = _('Offline') %} {% if ss.error_message %}{% set tip = _('Offline') ~ ' — ' ~ ss.error_message %}{% endif %} {% else %}--{% endif %} | {# Module found #}
{% set ss = site_status.get(c.customer_hash) %}
{% if ss and ss.modules_found_slugs %}
{% for slug in ss.modules_found_slugs %}
{% if slug in ss.get('purchased_slugs', []) %}
{{ slug }}
{% else %}
{{ slug }}
{% endif %}
{% endfor %}
{% elif ss and ss.module_found == false %}{{ _("No") }}
{% else %}--{% endif %}
|
{# Country #}
{{ c.country_code or '--' }} | {# Revenue #}€{{ c.total_revenue }} | {# Orders #}{{ c.total_orders }} | {# Products #}{{ c.total_products }} | {# Tickets #}{{ c.total_threads }} | {# BC badge #}{% if c.has_bc %} {{ _("BC") }} {% else %} -- {% endif %} | {# Last Activity #}{{ c.last_activity|localdt('%Y-%m-%d') if c.last_activity else '--' }} |
{% trans %}Page {{ page }} of {{ total_pages }}{% endtrans %}
{{ _("No customers found.") }}
{{ _("Try adjusting your filters or sync orders first.") }}