schon/engine/core/templates/admin/index.html
Egor fureunoir Gorbunov 71389ee278 Features: 1) Add customer mix and shipped vs digital metrics to dashboard context;
Fixes: 1) Replace failed daily stats with empty lists instead of crashing; 2) Fix inconsistent variable scoping and cleanup;

Extra: 1) Refactor daily stats logic to handle exceptions gracefully; 2) Improve readability by grouping related metrics; 3) Add type annotations for new context variables.
2025-11-17 22:42:38 +03:00

58 lines
No EOL
2 KiB
HTML

{% extends 'admin/base.html' %}
{% load i18n unfold static arith %}
{% block title %}
{% if subtitle %}
{{ subtitle }} |
{% endif %}
{{ title }} | {{ site_title|default:_('Django site admin') }}
{% endblock %}
{% block branding %}
{% include "unfold/helpers/site_branding.html" %}
{% endblock %}
{% block content %}
{% component "unfold/components/container.html" %}
<div class="flex flex-col min-h-screen">
{% component "unfold/components/title.html" %}
{% trans "Dashboard" %}
<br/>
{% endcomponent %}
{% include "admin/dashboard/_kpis.html" %}
<div class="grid grid-cols-1 xl:grid-cols-3 gap-6 items-start">
{% include "admin/dashboard/_income_overview.html" %}
{% include "admin/dashboard/_quick_links.html" %}
</div>
{% include "admin/dashboard/_daily_sales.html" %}
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mt-6">
{% include "admin/dashboard/_customers_mix.html" %}
{% if shipped_vs_digital.digital_qty|default:0 > 0 and shipped_vs_digital.shipped_qty|default:0 > 0 %}
{% include "admin/dashboard/_shipped_vs_digital.html" %}
{% endif %}
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mt-6">
{% include "admin/dashboard/_most_returned.html" %}
{% include "admin/dashboard/_top_categories.html" %}
</div>
{% include "admin/dashboard/_product_lists.html" %}
{% component "unfold/components/separator.html" %}
{% endcomponent %}
<div class="mt-4 mt-auto">
{% component "unfold/components/text.html" with class="text-center text-xs text-gray-500 dark:text-gray-400" %}
eVibes {{ evibes_version }} · Wiseless Team
{% endcomponent %}
</div>
</div>
{% endcomponent %}
{% endblock %}