templates/backend/advanced_search/partials/_adv_search_cotisation_results.html.twig line 1

Open in your IDE?
  1. {# @var \App\Entity\Cotisation cotisation #}
  2. <div class="mt-2">
  3.     {% include 'backend/partials/_table_result_header.html.twig' with {
  4.         entityName: 'Cotisation(s)',
  5.         count: advancedSearchResults.getTotalItemCount,
  6.         showExportButtons: searchParams.is_exportable,
  7.         buttons: [{
  8.             display: is_granted('ROLE_ADD_ENTITY') ? true : false,
  9.             url: path('add_cotisation'),
  10.             class: 'btn btn-sm btn-success',
  11.             icon: 'fas fa-plus',
  12.             label: 'Ajouter'
  13.         }]
  14.     } %}
  15.     <div class="table-responsive">
  16.         <table class="table" id="table-result">
  17.             <thead>
  18.             <tr>
  19.                 <th>Année</th>
  20.                 <th>Statut paiement</th>
  21.                 <th>Type offre</th>
  22.                 <th class="text-center">Import / Export</th>
  23.                 <th class="text-center">MAPA</th>
  24.                 <th>Date paiement</th>
  25.                 <th>Total TTC</th>
  26.                 <th>Raison Sociale</th>
  27.                 <th>Commune/Ville</th>
  28.                 <th>Code Postal</th>
  29.                 <th>Département</th>
  30.                 <th>Région</th>
  31.                 <th># Entreprise</th>
  32.                 <th>#</th>
  33.                 {% if forNotDisplayArchived %}
  34.                     <th>Statut</th>
  35.                 {% endif %}
  36.                 <th class="text-center">Actions</th>
  37.             </tr>
  38.             </thead>
  39.             <tbody>
  40.             {% for key, cotisation in advancedSearchResults %}
  41.                 <tr>
  42.                     <td>
  43.                         {% if cotisation.year %}
  44.                             <a href="{{ path('show_cotisation',{'id': cotisation.id }) }}">
  45.                                 {{ cotisation.year }}
  46.                             </a>
  47.                         {% endif %}
  48.                     </td>
  49.                     <td>
  50.                         {% if cotisation.cotisationStatut %}
  51.                             {{ bagdeStatusCotisation(cotisation.cotisationStatut.id) }}
  52.                         {% endif %}
  53.                     </td>
  54.                     <td>{{ cotisation.cotisationType ? cotisation.cotisationType.name : 'Autre' }}</td>
  55.                     <td class="text-center">{{ cotisation.optionImportExport ? 'Oui' : 'Non' }}</td>
  56.                     <td class="text-center">{{ cotisation.optionMapa ? 'Oui' : 'Non' }}</td>
  57.                     <td>{{ cotisation.datePaiement ? cotisation.datePaiement|date('d/m/Y') }}</td>
  58.                     <td>{{ cotisation.priceTtc ? cotisation.priceTtc|number_format(2, ',', ' ') ~ ' €' }}</td>
  59.                     <td>
  60.                         {{ cotisation.entreprise.raisonSocial }}
  61.                     </td>
  62.                     <td>
  63.                         {{ cotisation.entreprise.ville }}
  64.                     </td>
  65.                     <td>
  66.                         {{ cotisation.entreprise.codePostal|trim }}
  67.                     </td>
  68.                     <td>
  69.                         {% if cotisation.entreprise.departement %}
  70.                             {{ cotisation.entreprise.departement.nom }}
  71.                         {% endif %}
  72.                     </td>
  73.                     <td>
  74.                         {% if cotisation.entreprise %}
  75.                             {% if cotisation.entreprise.departement.regions is defined %}
  76.                                 {% for region in cotisation.entreprise.departement.regions %}
  77.                                     {{ region.nom }}
  78.                                 {% endfor %}
  79.                             {% endif %}
  80.                         {% endif %}
  81.                     </td>
  82.                     <td>{{ cotisation.entreprise.id }}</td>
  83.                     <td>{{ cotisation.id }}</td>
  84.                     {% if forNotDisplayArchived %}
  85.                         <td>{{ bagdeStatus(cotisation.status, true) }}</td>
  86.                     {% endif %}
  87.                     <td class="text-center">
  88.                         <button class="btn btn-outline-secondary btn-icon btn-rounded dropdown-toggle custom-dropdown"
  89.                                 type="button" id="dropdownMenu_{{ key }}" data-bs-toggle="dropdown"
  90.                                 aria-expanded="false">
  91.                             <i class="fa-solid fa-ellipsis"></i>
  92.                         </button>
  93.                         <ul class="dropdown-menu" aria-labelledby="dropdownMenu_{{ key }}">
  94.                             <li>
  95.                                 <a class="dropdown-item" href="{{ path('show_cotisation',{'id': cotisation.id }) }}">
  96.                                     <i class="fas fa-eye"></i> Consulter
  97.                                 </a>
  98.                             </li>
  99.                             {% if is_granted('ROLE_UPDATE_ENTITY') %}
  100.                                 <li>
  101.                                     <a class="dropdown-item"
  102.                                        href="{{ path('edit_cotisation',{'id': cotisation.id }) }}">
  103.                                         <i class="fas fa-edit"></i> Editer
  104.                                     </a>
  105.                                 </li>
  106.                             {% endif %}
  107.                             {% if is_granted('ROLE_DELETE_ENTITY') %}
  108.                                 {% if cotisation.status == constant('App\\Entity\\Cotisation::STATUS_ARCHIVED') %}
  109.                                     {% if not cotisation.entreprise.statutPaiement %}
  110.                                         <li>
  111.                                             <a
  112.                                                     class="dropdown-item"
  113.                                                     href="#"
  114.                                                     data-controller="confirm-delete"
  115.                                                     data-confirm-delete-url-value="{{ path('enable_cotisation', {id: cotisation.id}) }}"
  116.                                                     data-confirm-delete-message-value="Etes-vous sûr de vouloir activer cette cotisation ?"
  117.                                                     data-confirm-delete-token-value="{{ csrf_token('cotisation_' ~ cotisation.id) }}"
  118.                                                     data-confirm-delete-action-value="reload"
  119.                                             >
  120.                                                 <i class="fas fa-check"></i> Activer
  121.                                             </a>
  122.                                         </li>
  123.                                     {% endif %}
  124.                                 {% else %}
  125.                                     <li>
  126.                                         <a
  127.                                                 class="dropdown-item"
  128.                                                 href="#"
  129.                                                 data-controller="confirm-delete"
  130.                                                 data-confirm-delete-url-value="{{ path('archive_cotisation', {id: cotisation.id}) }}"
  131.                                                 data-confirm-delete-message-value="Etes-vous sûr de vouloir archiver cette cotisation ?"
  132.                                                 data-confirm-delete-token-value="{{ csrf_token('cotisation_' ~ cotisation.id) }}"
  133.                                                 data-confirm-delete-action-value="reload"
  134.                                         >
  135.                                             <i class="fas fa-archive"></i> Archiver
  136.                                         </a>
  137.                                     </li>
  138.                                 {% endif %}
  139.                             {% endif %}
  140.                         </ul>
  141.                     </td>
  142.                 </tr>
  143.             {% endfor %}
  144.             </tbody>
  145.         </table>
  146.         <div class="navigation mt-4 text-end">
  147.             {{ knp_pagination_render(advancedSearchResults) }}
  148.         </div>
  149.     </div>
  150. </div>