{% extends "base.html" %}

{% block content %}
<h1 class="mb-4">Orders</h1>
<table class="table table-striped">
    <thead>
        <tr>
            <th>ID</th>
            <th>Product ID</th>
            <th>Quantity</th>
            <th>Total Price</th>
        </tr>
    </thead>
    <tbody>
        {% for order in orders %}
        <tr>
            <td>{{ order.id }}</td>
            <td>{{ order.product_id }}</td>
            <td>{{ order.quantity }}</td>
            <td>${{ "%.2f"|format(order.total_price) }}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}