{% include "./rsa13-pagination.html" %}

<div class="pk-table-wrapper">
  <table class="pk-data-table pk-table-headers pk-table-borders pk-table-zebra beneficiaires-rsa" style="width:100%;">
    <tr>
      <th>N° CAF ou MSA</th>
      <th>Nom</th>
      <th>Prénom</th>
      <th>Date de naissance</th>
      <th>Référent</th>
      <th>Date de début</th>
      <th>Droits Devoirs</th>
      <th>Consulté</th>
      <th>Sortie</th>
    </tr>
    {% for beneficiaire in json.data %}
    <tr>
      <td><a href="../../beneficiaire-rsa/{{ beneficiaire.id }}/">{{ beneficiaire.matricule }}{% if beneficiaire.actif == "Non" %}&nbsp;&nbsp;<span class="pastille-rouge">Inactif</span>{% endif %}</a></td>
      <td><a href="../../beneficiaire-rsa/{{ beneficiaire.id }}/">{{ beneficiaire.nom|upper }}</a></td>
      <td><a href="../../beneficiaire-rsa/{{ beneficiaire.id }}/">{{ beneficiaire.prenom }}</a></td>
      <td>{{ beneficiaire.date_naissance|date:"d/m/Y" }}</td>
      <td>{{ beneficiaire.referent|default:"" }} <a href="{{ eservices_url }}extranet-rsa/modification-du-referent/?plateforme={{ plateforme_id }}&brsa={{ beneficiaire.id }}&affectation={{ beneficiaire.affectation }}&cancelurl={{ request.META.HTTP_REFERER|urlencode }}">✎</a></td>
      <td>{{ beneficiaire.date_deb_affectation|date:"d/m/Y" }}</td>
      <td>{{ beneficiaire.toppersdrodevorsa }}</td>
      <td>{{ beneficiaire.consulte }}</td>
      <td><a href="{{ eservices_url }}extranet-rsa/reaffectation/?plateforme={{ plateforme_id }}&brsa={{ beneficiaire.id }}&cancelurl={{ request.META.HTTP_REFERER|urlencode }}">❌</a></td>
    </tr>
    {% endfor %}
  </table>
</div>

{% include "./rsa13-pagination.html" %}
