{% extends 'base.html' %}
{% load i18n %}

{% block content %}
<div class="container-fluid">
    <h1 class="h3 mb-4 text-gray-800">{% trans "Attendance Records" %}</h1>

    <div class="card shadow mb-4">
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered" width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <th>{% trans "Date" %}</th>
                            <th>{% trans "Employee" %}</th>
                            <th>{% trans "Check In" %}</th>
                            <th>{% trans "Check Out" %}</th>
                            <th>{% trans "Notes" %}</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for attendance in attendances %}
                        <tr>
                            <td>{{ attendance.date }}</td>
                            <td>{{ attendance.employee }}</td>
                            <td>{{ attendance.check_in|default:"-" }}</td>
                            <td>{{ attendance.check_out|default:"-" }}</td>
                            <td>{{ attendance.notes }}</td>
                        </tr>
                        {% empty %}
                        <tr>
                            <td colspan="5" class="text-center">{% trans "No records found." %}</td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
{% endblock %}
