{% extends "barrier/barrier-base.html"    %} 
{% load static %}
{% block content %}
<div class="barrier-container">
        <a href="{% url 'container_receive' %}" class="barrier-button"> 
            Receive Container
        </a>
        <a href="{% url 'container_expedition' %}" class="barrier-button">
            Expedite Container
        </a>
        <a href="{% url 'barrier_photos' %}" class="barrier-button">
            Take Photos
        </a>

        <h2 class="text-2xl font-bold mb-4">Recent History</h2>
            <table>
                <thead>
                <tr>
                    <th>Date</th>
                    <th>Container Number</th>
                    <th>Status</th>
                </tr>
                </thead>
                <tbody>
                    {% for container in recent_containers %}
                    <tr>
                        <td>{{ container.number }}</td>
                        {% if container.expedited %}
                            <td>{{ container.expedited_on }}</td>
                            <td>Expedited</td>
                        {% else %}
                            <td>{{ container.received_on }}</td>
                            <td>Received</td>
                        {% endif %}
                    </tr>                
                    {% endfor %}
                </tbody>
            </table>
    </div>
    
    
{% endblock content %}