publik-base-theme/templates/variants/bouches-du-rhone/combo/json/rsa13-beneficiaire-affectat...

87 lines
4.6 KiB
HTML

{% load combo %}
<h2>Affectations</h2>
<div class="cell--body clearfix">
{% if json.data and not json.err and premier.data and not premier.err %}
{% with json.data as liste %}
{% with premier.data as prem %}
<h3> Affectation en cours</h3>
<div class="grid-1-1">
<p><a href="{{ eservices_url }}extranet-rsa/reaffectation/?plateforme={{ plateforme_id }}&brsa={{ brsa_id }}&cancelurl={{ portal_url }}portail-extranet-rsa/plateforme/{{ plateforme_id }}/beneficiaire-rsa/{{ brsa_id }}/affectations/&provenance=dossier">❌ Sortie</a></p>
</div>
<div class="grid-1-3">
<p>Dispositif : <strong>{{ prem.dispositif|default:"" }}</strong></p>
<p>Plateforme : <strong>{{ prem.plateforme|default:"" }}</strong></p>
<p>PI : <strong>{{ prem.code_pi|default:"" }}</strong></p>
<p>Date de début : <strong>{{ prem.date_deb|date:"d/m/Y"|default:"" }}</strong></p>
<p>Origine : <strong>{{ prem.origine|default:"" }}</strong></p>
<p>Prescripteur : <strong>{{ prem.prescripteur.plateforme|default:"" }}&nbsp;{{ prem.prescripteur.dispositif|default:"" }}&nbsp;{{ prem.prescripteur.type|default:"" }}</strong></p>
<p>Commentaire PI : <strong>{{ prem.commentaire_pi|default:"Aucun"|linebreaks }}</strong></p>
{% if prem.fin.date or prem.fin.lib_motif %}
<div class="infonotice">
<p><strong>Fin</strong></p>
<p>Date : <strong>{{ prem.fin.date|date:"d/m/Y"|default:"" }}</strong></p>
<p>Motif : <strong>{{ prem.fin.lib_motif|default:"" }}</strong></p>
</div>
{% endif %}
</div>
<div class="grid-1-3">
<h4>Premier rendez-vous</h4>
<p><a href="{{ eservices_url }}extranet-rsa/modification-du-premier-rendez-vous/?plateforme={{ plateforme_id }}&brsa={{ brsa_id }}&affectation={{ prem.id }}&cancelurl={{ portal_url }}portail-extranet-rsa/plateforme/{{ plateforme_id }}/beneficiaire-rsa/{{ brsa_id }}/affectations/">✎ Modifier</a></p>
{% with prem.rendezvous as rdv %}
<p>Date prise RdV : <strong>{{ rdv.date_prise|date:"d/m/Y"|default:"" }}</strong></p>
<p>Date de relance : <strong>{{ rdv.relance.date|date:"d/m/Y"|default:"" }}</strong></p>
<p>Motif de relance : <strong>{{ rdv.relance.lib_motif|default:"" }}</strong></p>
<p>Date réelle : <strong>{{ rdv.date_reelle|date:"d/m/Y"|default:"" }}</strong></p>
<p>Résultat : <strong>{{ rdv.lib_resultat|default:"" }}</strong></p>
<p>Date d'intégration : <strong>{{ prem.date_integration|date:"d/m/Y"|default:"" }}</strong></p>
{% endwith %}
</div>
<div class="grid-1-3">
<h4>Référent</h4>
<p><a href="{{ eservices_url }}extranet-rsa/modification-du-referent/?plateforme={{ plateforme_id }}&brsa={{ brsa_id }}&affectation={{ prem.id }}&cancelurl={{ portal_url }}portail-extranet-rsa/plateforme/{{ plateforme_id }}/beneficiaire-rsa/{{ brsa_id }}/affectations/">✎ Modifier</a></p>
<p>Référent : <strong>{% if prem.referent.nom %}{{ prem.referent.nom|upper }} {{ prem.referent.prenom|default:"" }}{% else %}Non renseigné{% endif %}</strong></p>
<p>Commentaire : <strong>{{ prem.commentaire_ref|default:"Aucun"|linebreaks }}</strong></p>
</div>
<div class="grid-1-1">
<h3>Historique des affectations</h3>
<div class="pk-table-wrapper">
<table class="pk-data-table pk-table-headers pk-table-borders pk-table-zebra" style="width:100%;">
<tr>
<th></th>
<th>Dispositif</th>
<th>Plateforme</th>
<th>Date de début</th>
<th>Référent</th>
<th>Origine</th>
<th>Prescripteur</th>
</tr>
{% for aff in liste %}
<tr>
<td><a href="affectation/{{ aff.id }}">🔎</a></td>
<td>{{ aff.dispositif|default:"" }}</td>
<td>{{ aff.plateforme|default:"" }}</td>
<td>{{ aff.date_deb|date:"d/m/Y"|default:"" }}</td>
<td>{{ aff.referent|default:"" }}</td>
<td>{{ aff.origine|default:"" }}</td>
<td>{{ aff.prescripteur.plateforme|default:"" }}&nbsp;{{ aff.prescripteur.dispositif|default:"" }}&nbsp;{{ aff.prescripteur.type|default:"" }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endwith %}
{% endwith %}
{% else %}
<p>Aucune information.</p>
{% endif %}
</div>