Add admin panel, cart, checkout, and digital key delivery

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
orohi
2026-07-25 05:32:05 +03:00
co-authored by Cursor
parent 08cc4b0f1b
commit 54eaff4c70
32 changed files with 1982 additions and 105 deletions
+56
View File
@@ -0,0 +1,56 @@
{% extends "admin/base.html" %}
{% block title %}Дашборд — {{ app_name }}{% endblock %}
{% block content %}
<div class="section-head">
<h2>Дашборд</h2>
<p>Сводка по магазину</p>
</div>
<div class="admin-stats">
<div class="stat">
<span class="stat-label">Товары</span>
<strong>{{ products_count }}</strong>
</div>
<div class="stat">
<span class="stat-label">Свободные ключи</span>
<strong>{{ keys_free }}</strong>
</div>
<div class="stat">
<span class="stat-label">Заказы</span>
<strong>{{ orders_count }}</strong>
</div>
<div class="stat">
<span class="stat-label">Выручка</span>
<strong>{{ revenue | rub }}</strong>
</div>
</div>
<div class="section-head compact">
<h3>Последние заказы</h3>
</div>
<div class="table-wrap">
<table class="data-table">
<thead>
<tr>
<th>ID</th>
<th>Email</th>
<th>Сумма</th>
<th>Статус</th>
</tr>
</thead>
<tbody>
{% for order in recent_orders %}
<tr>
<td><a href="/admin/orders/{{ order.id }}">{{ order.public_id }}</a></td>
<td>{{ order.email }}</td>
<td>{{ order.total | rub }}</td>
<td>{{ order.status }}</td>
</tr>
{% else %}
<tr><td colspan="4">Заказов пока нет</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}