{% extends './template.html' %}
{% load static %}
{% block actualicon %}<div class="nav-item text-primary"><small><a href="#">Tâches</a></small></div>{% endblock %}

{% block content %}
        <!--
        <div class="container-fluid">
          <div class="row">
            <div class="col-md-12">
              <div class="card">
                <div class="card-header card-header-primary">
                  <h4 class="card-title "> Ravitaillement <b> {{actual_institution}} </b></h4>
                </div>
                <div class='card-body'>
                 <div> IA chargee de faire automatiquement les ravitaillmeent desactivee pour le moment </div>
                </div>
                
              </div>
            </div>
            -->

            <div>
              <a href="/ravit/add/1/" class="btn btn-primary2"> Signaler un Reapprovisionnement </a>
            </div>
            <div class="card-body">
              <div class="table-responsive">
                  <table id="actu-table" class="table ">
                    <thead class=" text-primary2">
                      <th>
                        Code Article
                      </th>
                      <th>
                        Date Ravit
                      </th>
                      <th>
                        Qte
                      </th>
                      <th>
                        Personnel
                      </th>
                      <th>
                        Partenaire
                      </th>
                      <th>
                        Prix Unitaire
                      </th>
                      <th>
                        Prix du Ravitaillement
                      </th>
                    </thead>
                    <tbody>
                      {% for product in pages %}
                      <tr> 
                        <td>
                          <a class="text-primary2" href="/stock/edit/{{product.id}}/">{{product.m_produit}}</a>
                        </td>
                        <td>
                          {{product.m_date_ravit}}
                        </td>
                        <td>
                          {{product.m_qte}}
                        </td>
                        <td>
                          {{product.m_ravitailleur}}  : {{product.m_ravitailleur.m_user.firstname}} 
                        </td>
                        <td>
                          {{product.m_ravitailleur.m_fournisseur}}
                        </td>
                        <td>
                          <span class="text-primary2">Stock :</span> {{product.m_qte}} {% if product.m_unite != None %} {{product.m_unite}} {% endif %}
                        </td>
                        <td>
                           
                        </td>
                        <td>

                        </td>
                        <td>
                          <a href="/stock/trans/{{product.id}}/" class="badge btn-info">Transactions</a>
                        </td>
                        <td>
                          <a href="/stock/edit/{{product.id}}/" class="badge badge-success"><i style="font-size:14px;" class="material-icons">edit</i></a>
                          <a href="#" class="badge badge-danger"><i style="font-size:14px;" class="material-icons">delete</i></a>

                        </td>
                      </tr>
                      {% empty %}
                      <tr>
                        <td colspan="5"> Aucun Ravitaillement pour l'Instant </td>
                      </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                </div>
            </div>
{% endblock %}
