{% extends "base.html" %} {% 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.strftime('%Y-%m-%d') if c.last_activity else '--' }} |
Page {{ page }} of {{ total_pages }}
No customers found.
Try adjusting your filters or sync orders first.