bober-bbq-bot/bober_bbq/templates/admin/order_detail.html
byrsapty 0eabebaca3 Initial commit: Bober BBQ Telegram bot + backend + admin + Mini App
Flask API/admin backend, aiogram bot with delivery/pickup FSM flows,
monobank payment integration, and a Vite/React Telegram Mini App for
menu browsing and cart management.
2026-08-08 15:50:50 +03:00

58 lines
3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "admin/base.html" %}
{% block content %}
<h1>Замовлення {{ order.display_number() }}</h1>
<div class="card">
<table>
<tr><td class="muted">Тип</td><td>{{ 'Доставка' if order.order_type == 'delivery' else 'Самовивіз' }}</td></tr>
<tr><td class="muted">Клієнт</td><td>{{ order.customer_name }}</td></tr>
<tr><td class="muted">Телефон</td><td>{{ order.customer_phone }}</td></tr>
{% if order.order_type == 'delivery' %}
<tr><td class="muted">Адреса</td><td>
{{ order.address_city }}{% if order.address_street %}, вул. {{ order.address_street }}{% endif %}{% if order.address_house %}, буд. {{ order.address_house }}{% endif %}{% if order.address_apartment %}, кв. {{ order.address_apartment }}{% endif %}
{% if order.address_comment %}<br><span class="muted">{{ order.address_comment }}</span>{% endif %}
</td></tr>
{% else %}
<tr><td class="muted">Час прибуття</td><td>{{ order.pickup_time }}</td></tr>
{% endif %}
<tr><td class="muted">Метод оплати</td><td>{{ 'Картка' if order.payment_method == 'card' else 'Готівка' }}
{% if order.order_type == 'delivery' and order.payment_method == 'cash' and order.cash_change_for %} (решта з {{ order.cash_change_for }} грн){% endif %}
</td></tr>
<tr><td class="muted">Оплата</td><td><span class="badge {{ order.payment_status }}">{{ 'Оплачено' if order.payment_status == 'paid' else 'Не оплачено' }}</span></td></tr>
<tr><td class="muted">Створено</td><td>{{ order.created_at.strftime('%d.%m.%Y %H:%M') if order.created_at else '' }}</td></tr>
</table>
</div>
<h2>Товари</h2>
<div class="card">
<table>
<tr><th>Товар</th><th>К-сть</th><th>Ціна</th><th>Сума</th></tr>
{% for item in order.items %}
<tr>
<td>{{ item.product_name }}</td>
<td>{{ item.quantity }}</td>
<td>{{ item.product_price }} грн</td>
<td>{{ item.line_total }} грн</td>
</tr>
{% endfor %}
</table>
<div style="margin-top:12px;text-align:right;">
<div class="muted">Сума товарів: {{ order.items_total }} грн</div>
{% if order.delivery_fee %}<div class="muted">Доставка: {{ order.delivery_fee }} грн</div>{% endif %}
{% if order.discount_amount %}<div class="muted">Знижка: {{ order.discount_amount }} грн</div>{% endif %}
<div style="font-weight:700;font-size:17px;margin-top:4px;">Разом: {{ order.total }} грн</div>
</div>
</div>
<h2>Статус</h2>
<div class="card">
<form method="post" action="{{ url_for('admin.orders_status', order_id=order.id) }}" style="display:flex;gap:10px;align-items:center;">
<select name="status" style="width:auto;margin:0;">
{% for s in statuses %}
<option value="{{ s }}" {{ 'selected' if order.status == s }}>{{ s }}</option>
{% endfor %}
</select>
<button class="btn" type="submit">Оновити статус</button>
</form>
</div>
{% endblock %}