{% extends 'EspaceEtudiant/base_etudiant.html' %}
{% load static %}
{% block m-title %}<i class="fa fa-plus-square"></i> MES RECLAMATIONS{% endblock m-title %}
{% load widget_tweaks %}
{% block content %}
<section class="content">
    <div class="container-fluid">
        <!-- Small boxes (Stat box) -->

        <div class="container">
            <div class="card">
                <div class="card-header text-white" style="background: #21618C"><h3 class="card-title">MES RECLAMATIONS</h3></div>
                <div class="card-body login-card-body">
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th>DATE</th>
                                <th>MOTIF</th>
                                <th>STATUS</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                        {% for reclamation in reclamations %}
                            <tr>
                                <td>{{reclamation.created|date:'d-m-Y à H:i'}}</td>
                                <td>{{reclamation.motif}}</td>
                                <td>
                                    <span class="badge
                                    {% if reclamation.status == 'Recevable' %}
                                    badge-success
                                    {% elif reclamation.status == 'Non-recevable' %}
                                    badge-warning
                                    {% else %}
                                    badge-secondary
                                    {% endif%}
                                    ">{{reclamation.status}}</span>
                                </td>
                                <td><a class="btn btn-primary" href="{% url 'EspaceEtudiant:reclamation_detail' reclamation.id %}">detail</a></td>
                            </tr>
                        {% empty %}
                            <tr>
                                <td colspan="4" style="text-align:center;"> AUCUN RESULTAT</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
              <!-- DONUT CHART --><!-- /.card -->

        </div>

            
    </div>
  </section>

{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}