templates/backend/entreprise/show_cotisation.html.twig line 1

Open in your IDE?
  1. {% extends 'backend/base.html.twig' %}
  2. {% block title %}Cotisation entreprise {{ entreprise.raisonSocial }}{% endblock %}
  3. {% block content %}
  4.     {% include 'backend/partials/_breadcrumb.html.twig' with {
  5.         datas: [
  6.             {label: 'Entreprises', url: path('advanced_search', {entity: 'entreprise'})},
  7.             {
  8.                 label: entreprise.raisonSocial ~ ' <i>(#' ~ entreprise.id ~ ')</i>',
  9.                 url: path('show_entreprise', {'id': entreprise.id})
  10.             }, {
  11.                 label: 'Cotisation(s)'
  12.             }
  13.         ],
  14.         buttons: [
  15.             {
  16.                 display: true,
  17.                 url: path('show_entreprise', {'id': entreprise.id }),
  18.                 class: 'btn btn-sm btn-secondary',
  19.                 icon: 'fas fa-chevron-left',
  20.                 label: 'Retour'
  21.             }
  22.         ]
  23.     } %}
  24.     <div class="card">
  25.         <div class="card-body">
  26.             <div class="table-responsive">
  27.                 <table class="table">
  28.                     <thead>
  29.                         <tr>
  30.                             <th>Année</th>
  31.                             <th>Statut</th>
  32.                             <th>Total TTC</th>
  33.                             <th>Date de paiement</th>
  34.                             <th class="text-center">Action(s)</th>
  35.                         </tr>
  36.                     </thead>
  37.                     <tbody>
  38.                         {% for key, cotisation in entreprise.cotisations|filter(el => el.status != constant('App\\Entity\\Order::STATUS_ARCHIVED')) %}
  39.                             <tr>
  40.                                 <td>
  41.                                     <a href="{{ path('show_cotisation',{'id': cotisation.id }) }}">
  42.                                         {{ cotisation.year }}
  43.                                     </a>
  44.                                 </td>
  45.                                 <td>{{ bagdeStatusCotisation(cotisation.cotisationStatut.id) }}</td>
  46.                                 <td>{{ cotisation.priceTtc ? cotisation.priceTtc|number_format(2, ',', ' ') ~ ' €' }}</td>
  47.                                 <td>{{ cotisation.datePaiement ? cotisation.datePaiement|date('d/m/Y') }}</td>
  48.                                 <td class="text-center">
  49.                                     <button class="btn btn-outline-secondary btn-icon btn-rounded dropdown-toggle custom-dropdown" type="button" id="dropdownMenu_{{ key }}" data-bs-toggle="dropdown" aria-expanded="false">
  50.                                         <i class="fa-solid fa-ellipsis"></i>
  51.                                     </button>
  52.                                     <ul class="dropdown-menu" aria-labelledby="dropdownMenu_{{ key }}">
  53.                                         <li>
  54.                                             <a class="dropdown-item" href="{{ path('show_cotisation',{'id': cotisation.id }) }}">
  55.                                                 <i class="fas fa-eye"></i> Consulter
  56.                                             </a>
  57.                                         </li>
  58.                                         {% if is_granted('ROLE_ADMIN') %}
  59.                                             <li>
  60.                                                 <a class="dropdown-item" href="{{ path('edit_cotisation',{'id': cotisation.id }) }}">
  61.                                                     <i class="fas fa-edit"></i> Editer
  62.                                                 </a>
  63.                                             </li>
  64.                                         {% endif %}
  65.                                         {% if is_granted('ROLE_DELETE_ENTITY') %}
  66.                                             <li>
  67.                                                 <a
  68.                                                         class="dropdown-item"
  69.                                                         href="#"
  70.                                                         data-controller="confirm-delete"
  71.                                                         data-confirm-delete-url-value="{{ path('archive_cotisation', {id: cotisation.id}) }}"
  72.                                                         data-confirm-delete-message-value="Etes-vous sûr de vouloir archiver cette cotisation ?"
  73.                                                         data-confirm-delete-token-value="{{ csrf_token('cotisation_' ~ cotisation.id) }}"
  74.                                                         data-confirm-delete-action-value="reload"
  75.                                                 >
  76.                                                     <i class="fas fa-archive"></i> Archiver
  77.                                                 </a>
  78.                                             </li>
  79.                                         {% endif %}
  80.                                     </ul>
  81.                                 </td>
  82.                             </tr>
  83.                         {% endfor %}
  84.                     </tbody>
  85.                 </table>
  86.             </div>
  87.         </div>
  88.     </div>
  89.     {% if entreprise.cotisations|filter(el => el.status == constant('App\\Entity\\Order::STATUS_ARCHIVED'))|length %}
  90.         <div class="card">
  91.             <div class="card-body">
  92.                 <h4 class="mb-4">Cotisations archivées</h4>
  93.                 <div class="table-responsive">
  94.                     <table class="table">
  95.                         <thead>
  96.                             <tr>
  97.                                 <th>Année</th>
  98.                                 <th>Statut</th>
  99.                                 <th>Total TTC</th>
  100.                                 <th>Date de paiement</th>
  101.                                 <th class="text-center">Action(s)</th>
  102.                             </tr>
  103.                         </thead>
  104.                         <tbody>
  105.                             {% for key, cotisation in entreprise.cotisations|filter(el => el.status == constant('App\\Entity\\Order::STATUS_ARCHIVED')) %}
  106.                                 <tr>
  107.                                     <td>
  108.                                         <a href="{{ path('show_cotisation',{'id': cotisation.id }) }}">
  109.                                             {{ cotisation.year }}
  110.                                         </a>
  111.                                     </td>
  112.                                     <td>{{ bagdeStatusCotisation(cotisation.cotisationStatut.id) }}</td>
  113.                                     <td>{{ cotisation.priceTtc ? cotisation.priceTtc|number_format(2, ',', ' ') ~ ' €' }}</td>
  114.                                     <td>{{ cotisation.datePaiement ? cotisation.datePaiement|date('d/m/Y') }}</td>
  115.                                     <td class="text-center">
  116.                                         <button class="btn btn-outline-secondary btn-icon btn-rounded dropdown-toggle custom-dropdown" type="button" id="dropdownMenu_{{ key }}" data-bs-toggle="dropdown" aria-expanded="false">
  117.                                             <i class="fa-solid fa-ellipsis"></i>
  118.                                         </button>
  119.                                         <ul class="dropdown-menu" aria-labelledby="dropdownMenu_{{ key }}">
  120.                                             <li>
  121.                                                 <a class="dropdown-item" href="{{ path('show_cotisation',{'id': cotisation.id }) }}">
  122.                                                     <i class="fas fa-eye"></i> Consulter
  123.                                                 </a>
  124.                                             </li>
  125.                                             {% if is_granted('ROLE_ADMIN') %}
  126.                                                 <li>
  127.                                                     <a class="dropdown-item" href="{{ path('edit_cotisation',{'id': cotisation.id }) }}">
  128.                                                         <i class="fas fa-edit"></i> Editer
  129.                                                     </a>
  130.                                                 </li>
  131.                                             {% endif %}
  132.                                             {% if is_granted('ROLE_DELETE_ENTITY') %}
  133.                                                 <li>
  134.                                                     <a
  135.                                                             class="dropdown-item"
  136.                                                             href="#"
  137.                                                             data-controller="confirm-delete"
  138.                                                             data-confirm-delete-url-value="{{ path('archive_cotisation', {id: cotisation.id}) }}"
  139.                                                             data-confirm-delete-message-value="Etes-vous sûr de vouloir archiver cette cotisation ?"
  140.                                                             data-confirm-delete-token-value="{{ csrf_token('cotisation_' ~ cotisation.id) }}"
  141.                                                             data-confirm-delete-action-value="reload"
  142.                                                     >
  143.                                                         <i class="fas fa-archive"></i> Archiver
  144.                                                     </a>
  145.                                                 </li>
  146.                                             {% endif %}
  147.                                         </ul>
  148.                                     </td>
  149.                                 </tr>
  150.                             {% endfor %}
  151.                         </tbody>
  152.                     </table>
  153.                 </div>
  154.             </div>
  155.         </div>
  156.     {% endif %}
  157. {% endblock %}