{% extends './stocks.html' %}
{% load static %}
{% block actualicon %}<div class="nav-item text-primary"><small><a href="#">Clientèle</a></small></div>{% endblock %}

          {% block navbar_content %}
          <div class="row">
            <div class="px-2"> <a href="/customers/add/" class="badge btn-primary2 text-white"><i class="material-icons">add</i> Enregistrer un Nouveau Client</a></div>
          </div>
          {% endblock %}

          {% block main_content %}
          <div class="row">
            <div class="col-md-12">
              <div class="card">
                <div class="card-header"> 
                  <h4 class="card-title ">Clientèle : <b> {{actual_institution}} </b></h4>
                  {% if search != None %} <span class="badge btn-primary2">{{search}}</span> {% else %}  {% endif %}
                  <form method="POST" action="/stock/search/" class="navbar-form">{% csrf_token %}
                    <div class="input-group no-border"> 
                      <input type="text" name="search" class="form-control"  placeholder="Rechercher un Client" >
                      <button type="submit" class="btn btn-white btn-round btn-just-icon">
                        <i class="material-icons">search</i>
                        <div class="ripple-container"></div>
                      </button>
                    </div>
                  </form>
                </div>

                <div class="card-body">
                  <div class="table-responsive">
                    <table id="actu-table" class="table ">
                      <thead class=" text-primary2">
                        <th></th>
                        <th>
                          Code
                        </th>
                        <th>
                          Nom du Client
                        </th>
                        <th>
                          Date d'Enregistrement
                        </th>
                        <th>
                          Mail
                        </th>
                        <th>
                          Téléphone
                        </th>
                        <th></th>
                        <th></th>
                      </thead>
                      <tbody>
                        {% for personnel in pages %}
                        <tr>
                          <td><a href="/stock/edit/{{product.id}}/"> <i class="fa fa-pencil"></i> </a></td>
                          <td>
                            <a class="text-primary2" href="/infos/prd/{{product.id}}/">{{personnel.m_code}}</a>
                          </td>
                          <td>{{personnel.m_name}}
                          </td>
                          <td>
                            {{personnel.m_date_saved}} </td>
                          <td>
                            {% if personnel.m_gmail != None %}
                            {{personnel.m_gmail| safe}}
                            {% endif %}
                          </td>
                          <td>
                            {{personnel.m_tel| safe}}
                          </td>
                          <td><span class="badge btn-info"> Transactions </span></td>
                          <td><span class="badge btn-primary"> Statistiques </span></td>
                        </tr>
                        {% endfor %}
                      </tbody>
                    </table>
                  </div>
                  <div id="list-table">

                  </div>
                </div>


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

          {% endblock %}       