
{% extends 'layout.twig' %}

{% block body %}
<form method="post" name="filtre_demandeAchat" id="filtre_demandeAchat">
   <div class="contenu clearfix"  id="liste-evenements">
        <h1>
        	{{ 'Liste DA' | trad }}
    	</h1>
    	
    	{{ ariane() }}
                
        <table class="table table-hover">
        	<thead class="thead-dark">
            	<tr>
                    <th scope="col" width="8%">{{ triTable('NO_DA',  infoPagination.filter.tri_NO_DA, 'N° DA', '', '', 'filtre_demandeAchat') }}</th>
                    <th scope="col" width="10%">{{ triTable('DTE_EMISS',  infoPagination.filter.tri_DTE_EMISS, 'Date émission', '', '', 'filtre_demandeAchat') }}</th>
                    <th scope="col" width="10%">{{ triTable('DTE_VAL',  infoPagination.filter.tri_DTE_VAL, 'Date validation', '', '', 'filtre_demandeAchat') }}</th>
                    <th scope="col">{{ triTable('CODE_STE',  infoPagination.filter.tri_CODE_STE, 'Société', '', '', 'filtre_demandeAchat') }}</th>
                    <th scope="col">{{ triTable('NO_DEM',  infoPagination.filter.tri_NO_DEM, 'Demandeur', '', '', 'filtre_demandeAchat') }}</th>
                </tr>
            </thead>
        	<tbody>
            	<tr class="recherche">
                    <td>{{ filterTable('NO_DA', infoPagination.filter.filter_NO_DA, '', '', '', 'filtre_demandeAchat','','') }}</td>
                    <td>{{ filterTable('DTE_EMISS', infoPagination.filter.filter_date_DTE_EMISS, '', '', '', 'filtre_demandeAchat','','', 'date') }}</td>
                    <td>{{ filterTable('DTE_VAL', infoPagination.filter.filter_date_DTE_VAL, '', '', '', 'filtre_demandeAchat','','', 'date') }}</td>
                    <td>{{ zoomFilter('egal_SOCIETE'~spliter()~'RAIS_SOC', infoPagination.filter['filter_egal_SOCIETE'~spliter()~'RAIS_SOC'], '', 'filtre_demandeAchat', path('Ajax.liste.societe'), 'Societe', '','','Société') }}</td>
                    <td>{{ zoomFilter('NO_DEM', infoPagination.filter['filter_NO_DEM'], '', 'filtre_demandeAchat', path('Ajax.liste.utilisateur'),'Utilisateur', '','','Utilisateur','','','Hastutil') }}</td>
                </tr>
                {% for demandeAchat in listeDA %}
                <tr id="demandeAchat{{ loop.index }}">
                    <td class="toggleSlide" onclick="toggleSlide('{{ path('DemandeAchat.Liste.detailListeEvenementDA', {'idDA' : demandeAchat.NO_DA}) }}' , 'demandeAchat{{ loop.index }}detail');">{{ demandeAchat.NO_DA }}</td>
                    <td>{{ demandeAchat.DTE_EMISS | dateTrad }}</td>
                    <td>{{ demandeAchat.DTE_VAL | dateTrad }}</td>
                    <td>{{ demandeAchat.RAIS_SOC }}{% if demandeAchat.CODE_STE | trim %} ({{ demandeAchat.CODE_STE }}){% endif %}</td>
                    <td>{{ demandeAchat.NOM }}{% if demandeAchat.NO_DEM | trim %} ({{ demandeAchat.NO_DEM }}){% endif %}</td>
                </tr>
                <tr class="detail_ligne hide_detail" id="demandeAchat{{ loop.index }}detail" ></tr>
                {% endfor %}
            </tbody>
        </table>
        {{ paginations(path('DemandeAchat.Liste.listeEvenementDA'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post) }}
    </div>
</form>
{% endblock %}