{% extends 'drh/drh_base.html' %}
{% load static %}
{% load custom_tag %}
{% load custom_tag_obj %}
{% block m-title %}LISTE DU PERSONNEL{% endblock m-title %}
{% block content %}
<div class="card mb-3">
    <div class="card-header">
        <i class="fas fa-table"></i>
        LISTE DU PERSONNEL
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-bordered table-striped" id="dataTable" width="100%" cellspacing="0">
                <thead>
                <tr>
                    <th>NOM & PRENOMS</th>
                    <th>EMAIL</th>
                    <th>SERVICE ACTUEL</th>
                    <th></th>
                </tr>
                </thead>
                <tfoot>
                <tr>
                    <th>NOM & PRENOMS</th>
                    <th>EMAIL</th>
                    <th>SERVICE ACTUEL</th>
                    <th></th>
                </tr>
                </tfoot>
                <tbody>
                {% for item in personnel %}
                    <tr>
                        <td>{{ item }}</td>
                        <td>{{ item.email }}</td>
                        <td>
                            {% if item|get_pat_service:'last' %}
                                {{item|get_pat_service:'last'}}
                            {% endif %}
                        </td>
                        <td width="100">
                           <!-- <a type="button" class="btn btn-danger btn-sm" href="#"><i class="fa fa-trash" title="supprimer"></i></a> -->
                            <button data-toggle="modal" data-target="#addService{{item.id}}" class="btn btn-secondary btn-sm " ><i class="fa fa-eye" title="Ajouter"></i> Service</button>
                        </td>
                    </tr>
                    {% include 'drh/modal/modal_perso_services.html' %}
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>

{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}