
{% extends 'admin.html.twig' %}

{% block preloader %}{% endblock %}

{% block title %}Listado Clientes{% endblock %}

{% block body %}

    <div class="container pb-5">

        <h2 class="my-4 text-primary">
            Listado de Clientes
        </h2>

    <div class="row mt-4 mb-5">

        <div class="col-md-12">
            <div class="table-responsive">
                <table class="table table-striped table-bordered">
                    <thead class="thead-dark">
                        <tr class="text-center">
                            <th scope="col">Usuario</th>
                            <th scope="col">Email</th>
                            <th scope="col">Nombre</th>
                            <th scope="col">RUT</th>
                            <th scope="col">Telefono</th>
                            <th scope="col">Estatus</th>
                            <th scope="col">Opciones</th>
                        </tr>
                    </thead>

                    <tbody>

                        {% if clientes is not empty %}
                            {% for cliente in clientes %}
                                <tr>
                                    <th class="text-center">
                                        {{ cliente.username }}
                                    </th>
                                    <td class="align-middle">
                                        {{ cliente.email }}
                                    </td>
                                    <td class="align-middle">
                                        {{ cliente.nombre }}
                                    </td>
                                    <td class="align-middle">
                                        {{ cliente.dni }}
                                    </td>
                                    <td class="text-center">
                                        {{ cliente.telefono }}
                                    </td>
                                    <td class="text-center">
                                        {% include 'all/usuario/_estatus.html.twig' with {'estatus':cliente.estatus} %}
                                    </td>

                                    <td class="text-center">
                                        <a class="not-decoration text-dark" href="{{ path('cliente_servicio_admin', {'id': cliente.id}) }}" title="Servicios">
                                            <i class="fas fa-box-open fa-lg"></i>
                                        </a>
                                    </td>

                                </tr>
                            {% endfor %}
                        {% else %}
                            <tr>
                                <th colspan="15" class="text-center">No existen clientes registrados</th>
                            </tr>
                        {% endif %}

                    </tbody>
                </table>
            </div>

        </div>
    </div>
 </div>

{% endblock %}

