{% extends "base.html" %}
{% block title %}Операции{% endblock %}
{% block content %}
<div class="container my-4">
    <h2 class="mb-4">Список операций</h2>
    <table class="table table-striped">
        <thead class="table-dark">
            <tr>
                <th>Товар</th>
                <th>Склад</th>
                <th>Тип операции</th>
                <th>Количество</th>
                <th>Дата</th>
            </tr>
        </thead>
        <tbody>
            {% for operation in operations %}
            <tr>
                <td>{{ operation.product.name }}</td>
                <td>{{ operation.warehouse.name }}</td>
                <td>{{ operation.get_operation_type_display }}</td>
                <td>{{ operation.quantity }}</td>
                <td>{{ operation.operation_date }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    <a href="{% url 'dashboard' %}" class="btn btn-secondary mt-4">Назад на главную</a>
</div>
{% endblock %}
