toulouse: add json cells (#47243)
This commit is contained in:
parent
9f5d07ce02
commit
0c8d24f729
|
@ -41,6 +41,71 @@
|
|||
"picto:encombrants-petit-electromenager": { "label": "Encombrants : Petit électroménager" },
|
||||
"picto:encombrants-refrigerateur": { "label": "Encombrants : Réfrigérateur" },
|
||||
"picto:encombrants-refrigerateur-americain": { "label": "Encombrants : Réfrigérateur américain" }
|
||||
},
|
||||
"JSON_CELL_TYPES.update": {
|
||||
"toulouse_activites": {
|
||||
"cache_duration": 0,
|
||||
"force_async": true,
|
||||
"name": "DUI (Teamnet Axel) : Activités auxquelles l'enfant est inscrit·e",
|
||||
"url": "{{passerelle_url}}toulouse-axel/{{slug}}/clae_children_activities_info?NameID={{user_nameid}}&booking_date={% now \"Y-m-d\" %}",
|
||||
"form": [
|
||||
{"label": "Identifiant du connecteur", "varname": "slug", "required": true}
|
||||
]
|
||||
},
|
||||
"toulouse_enfant": {
|
||||
"cache_duration": 0,
|
||||
"force_async": true,
|
||||
"name": "DUI (Teamnet Axel) : Informations générales sur l'enfant",
|
||||
"url": "{{passerelle_url}}toulouse-axel/{{slug}}/child_info?NameID={{user_nameid}}&idpersonne={{idpersonne}}",
|
||||
"form": [
|
||||
{"label": "Identifiant du connecteur", "varname": "slug", "required": true}
|
||||
]
|
||||
},
|
||||
"toulouse_enfants": {
|
||||
"cache_duration": 0,
|
||||
"force_async": true,
|
||||
"name": "DUI (Teamnet Axel) : Liste des enfants",
|
||||
"url": "{{passerelle_url}}toulouse-axel/{{slug}}/family_info?NameID={{user_nameid}}",
|
||||
"form": [
|
||||
{"label": "Identifiant du connecteur", "varname": "slug", "required": true}
|
||||
]
|
||||
},
|
||||
"toulouse_foyer": {
|
||||
"cache_duration": 0,
|
||||
"force_async": true,
|
||||
"name": "DUI (Teamnet Axel) : Informations générales sur le foyer",
|
||||
"url": "{{passerelle_url}}toulouse-axel/{{slug}}/family_info?NameID={{user_nameid}}",
|
||||
"form": [
|
||||
{"label": "Identifiant du connecteur", "varname": "slug", "required": true}
|
||||
]
|
||||
},
|
||||
"toulouse_reservations": {
|
||||
"cache_duration": 0,
|
||||
"force_async": true,
|
||||
"name": "DUI (Teamnet Axel) : Réservations sur les 4 prochaines semaines",
|
||||
"url": "{{passerelle_url}}toulouse-axel/{{slug}}/clae_booking_activities_info?NameID={{ user_nameid }}&idpersonne={{ idpersonne }}&start_date={% now \"Y-m-d\" as today %}{{ today|date:\"Y-m-d\" }}&end_date={{ today|add_days:28|date:\"Y-m-d\" }}",
|
||||
"form": [
|
||||
{"label": "Identifiant du connecteur", "varname": "slug", "required": true}
|
||||
]
|
||||
},
|
||||
"toulouse_responsables": {
|
||||
"cache_duration": 0,
|
||||
"force_async": true,
|
||||
"name": "DUI (Teamnet Axel) : Liste des responsables du foyer",
|
||||
"url": "{{passerelle_url}}toulouse-axel/{{slug}}/family_info?NameID={{user_nameid}}",
|
||||
"form": [
|
||||
{"label": "Identifiant du connecteur", "varname": "slug", "required": true}
|
||||
]
|
||||
},
|
||||
"toulouse_revenus": {
|
||||
"cache_duration": 0,
|
||||
"force_async": true,
|
||||
"name": "DUI (Teamnet Axel) : Revenus mensuel pris en compte",
|
||||
"url": "{{passerelle_url}}toulouse-axel/{{slug}}/family_info?NameID={{user_nameid}}",
|
||||
"form": [
|
||||
{"label": "Identifiant du connecteur", "varname": "slug", "required": true}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{% if not json.err %}
|
||||
<h2>Activités auxquelles l'enfant est inscrit·e</h2>
|
||||
<div>
|
||||
|
||||
{% for enfant in json.data %}{% if enfant.IDPERSONNE == idpersonne %}
|
||||
<ul>
|
||||
{% for activite in enfant.ACTIVITE %}
|
||||
<li>{{ activite.LIBELLEACTIVITE }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}{% endfor %}
|
||||
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
{{ json.err_desc|default:"erreur inconnue" }}
|
||||
|
||||
{% endif %}
|
|
@ -0,0 +1,29 @@
|
|||
<div>
|
||||
{% if not json.err %}
|
||||
{% with enfant=json.data %}
|
||||
<h3>{{enfant.PRENOM}} {{enfant.NOM}} , {% if enfant.SEXE == "F" %}née le{% else %}né le{% endif %} {{enfant.DATENAISSANCE|date:"d/m/Y"}}</h3>
|
||||
<p></p>
|
||||
<table>
|
||||
<caption>Informations générales</caption>
|
||||
|
||||
{# <tr><th>Numéro d'allocataire</th><td> {{ enfant.IDPERSONNE }} </td></tr> #}
|
||||
|
||||
<tr><th>Medecin</th><td> {% if enfant.SANITAIRE.MEDECIN.NOM %}{{ enfant.SANITAIRE.MEDECIN.NOM }} {{ enfant.SANITAIRE.MEDECIN.TELMEDECIN }}{% else %} Pas de médecin déclaré {% endif %}</td></tr>
|
||||
</table>
|
||||
<p></p>
|
||||
<table>
|
||||
<caption>Vaccins à jour</caption>
|
||||
<tr><th>BCG</th><td> {% if enfant.SANITAIRE.VACCIN.BCGAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>Coqueluche</th><td> {% if enfant.SANITAIRE.VACCIN.COQAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>Diphtérie</th><td> {% if enfant.SANITAIRE.VACCIN.DAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>Hépatite B</th><td> {% if enfant.SANITAIRE.VACCIN.HBAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>HIB</th><td> {% if enfant.SANITAIRE.VACCIN.HIBAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>IIP</th><td> {% if enfant.SANITAIRE.VACCIN.IIPAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>Méningite</th><td> {% if enfant.SANITAIRE.VACCIN.MENINAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>Poliomyélite</th><td> {% if enfant.SANITAIRE.VACCIN.PAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>Rubéole - Oreillons - Rougeole</th><td> {% if enfant.SANITAIRE.VACCIN.RORAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
<tr><th>Tétanos</th><td> {% if enfant.SANITAIRE.VACCIN.TAJOUR == False %}Non{% else %}Oui{% endif %}</td></tr>
|
||||
</table>
|
||||
{% endwith%}
|
||||
{% endif%}
|
||||
</div>
|
|
@ -0,0 +1,24 @@
|
|||
<h1>Les enfants</h1>
|
||||
|
||||
<div>
|
||||
{% if not json.err %}
|
||||
{% with famille=json.data %}
|
||||
|
||||
{% for enfant in famille.ENFANT|dictsortreversed:"DATENAISSANCE" %}
|
||||
<p>
|
||||
<table>
|
||||
<tr><th>Identité</th><td><a href="enfant/{{enfant.IDPERSONNE}}">{{enfant.NOM}} {{enfant.PRENOM}}</a></td></tr>
|
||||
<tr><th>Date de naissance</td><td>{{enfant.DATENAISSANCE|date:"d/m/Y"}}</td></th>
|
||||
<tr><th>Numéro de police d'assurance</th><td>{{enfant.ASSURANCE.NUMERO|default:""}}</td></tr>
|
||||
<tr><th>Nom de la compagnie d'assurance</th><td>{{enfant.ASSURANCE.NOM|default:""}}</td></tr>
|
||||
<tr><th>Date de validité assurance</th><td>{% if enfant.ASSURANCE.NUMERO %}{{enfant.ASSURANCE.DATEFIN|default:""}}{% else %}{% endif%}</td></tr>
|
||||
</table>
|
||||
</p>
|
||||
{% endfor%}
|
||||
|
||||
{% endwith %}
|
||||
|
||||
{% else %}
|
||||
{{ json.err_desc|default:"erreur inconnue" }}
|
||||
{% endif %}
|
||||
</div>
|
|
@ -0,0 +1,23 @@
|
|||
<h1>Votre famille</h1>
|
||||
|
||||
<div>
|
||||
{% if not json.err %}
|
||||
{% with famille=json.data %}
|
||||
|
||||
Votre numéro DUI : <strong>{{famille.IDDUI}}</strong>
|
||||
|
||||
<table>
|
||||
<tr><th>Adresse</th><td>{{famille.ADRESSE.NUMVOIE|default:""}}, {{famille.ADRESSE.VOIE|default:""}}{% if famille.ADRESSE.COMPLEMENTVOIE %}{{famille.ADRESSE.COMPLEMENTVOIE}}{% endif %}{% if famille.ADRESSE.COMPLEMENT1 %}{{famille.ADRESSE.COMPLEMENT1}}{% endif %}{% if famille.ADRESSE.COMPLEMENT2 %}{{famille.ADRESSE.COMPLEMENT2}}{% endif %}, {{famille.ADRESSE.CODEPOSTAL|default:""}} {{famille.ADRESSE.VILLE|default:""}}</td></tr>
|
||||
<tr><th>Téléphone fixe</th><td>{{famille.TELFIXE|default:""}}</td></tr>
|
||||
<tr><th>Situation familiale</th><td>{{famille.SITUATIONFAMILIALE_label}}</td></tr>
|
||||
<tr><th>Nombre d'enfants</th><td>{{famille.REVENUS.NBENFANTSACHARGE}}</td></tr>
|
||||
{# les infos suivantes sont retirées, cf https://dev.entrouvert.org/issues/40716 #}
|
||||
{# <tr><th>Numéro d'allocataire CAF</th><td>{{famille.REVENUS.NUMEROCAF|default:""}}</td></tr> #}
|
||||
{# <tr><th>Régime</th><td>{{famille.REVENUS.TYPEREGIME_label|default:""}}</td></tr> #}
|
||||
</table>
|
||||
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{{ json.err_desc|default:"erreur inconnue" }}
|
||||
{% endif %}
|
||||
</div>
|
|
@ -0,0 +1,13 @@
|
|||
<h2>Réservations en cours sur les 4 prochaines semaines</h2>
|
||||
<div>
|
||||
{% regroup json.data by day as activites %}
|
||||
{% for act in activites %}
|
||||
{% with f=act.list|first %}
|
||||
{% ifchanged %}<h3>Semaine du {{ f.week|split:":"|slice:"1:2"|first|date:"j F Y" }} au {{ f.week|split:":"|last|date:"j F Y" }}</h3>{% endifchanged %}
|
||||
{% endwith %}
|
||||
<p>{{ act.grouper|date:"l j F Y" }}</p>
|
||||
<ul>
|
||||
{% for l in act.list %}<li><span {% if not l.booked %}style="color: lightgray;"{% endif %}>{{ l.activity_label }}</span>{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</div>
|
|
@ -0,0 +1,32 @@
|
|||
<h1>Responsables</h1>
|
||||
|
||||
<div>
|
||||
{% if not json.err %}
|
||||
{% with famille=json.data %}
|
||||
<p>
|
||||
<table>
|
||||
<tr><th>Identité</th><td>{% if famille.RL1.CIVILITE == "M" %}Monsieur{% else %}Madame{% endif %} {{famille.RL1.NOM}} {{famille.RL1.PRENOM}}, né(e) le {{famille.RL1.DATENAISSANCE}}</td></tr>
|
||||
<tr><th>Courriel</th><td>{{famille.RL1.COURRIEL|default:""}}</td></tr>
|
||||
<tr><th>Téléphone portable</th><td>{{famille.RL1.TELPORTABLE|default:""}}</td></tr>
|
||||
<tr><th>Profession</th><td>{{famille.RL1.PROFESSION|default:""}}</td></tr>
|
||||
<tr><th>Nom de l'employeur</th><td>{{famille.RL1.NOMEMPLOYEUR|default:""}}</td></tr>
|
||||
<tr><th>Adresse de l'employeur</th><td>{{famille.RL1.ADREMPLOYEUR.NUMVOIE|default:""}} {{famille.RL1.ADREMPLOYEUR.VOIE|default:""}}{% if famille.RL1.ADREMPLOYEUR.COMPLEMENTVOIE %} {{famille.RL1.ADREMPLOYEUR.COMPLEMENTVOIE|default:""}}{% endif %}{% if famille.RL1.ADREMPLOYEUR.COMPLEMENT1 %} {{famille.RL1.ADREMPLOYEUR.COMPLEMENT1|default:""}}{% endif %}{% if famille.RL1.ADREMPLOYEUR.COMPLEMENT2 %} {{famille.RL1.ADREMPLOYEUR.COMPLEMENT2|default:""}}{% endif %}, {{famille.RL1.ADREMPLOYEUR.CODEPOSTAL|default:""}} {{famille.RL1.ADREMPLOYEUR.VILLE|default:""}}</td></tr>
|
||||
</table>
|
||||
</p>
|
||||
{% if famille.RL2.NOM %}
|
||||
<p>
|
||||
<table>
|
||||
<tr><th>Identité</th><td>{% if famille.RL2.NOM %}{% if famille.RL2.CIVILITE == "M" %}Monsieur{% else %}Madame{% endif %} {{famille.RL2.NOM}} {{famille.RL2.PRENOM}}, né(e) le {{famille.RL2.DATENAISSANCE}}{% endif %}</td></tr>
|
||||
<tr><th>Courriel</th><td>{{famille.RL2.COURRIEL|default:""}}</td></tr>
|
||||
<tr><th>Téléphone portable</th><td>{{famille.RL2.TELPORTABLE|default:""}}</td></tr>
|
||||
<tr><th>Profession</th><td>{{famille.RL2.PROFESSION|default:""}}</td></tr>
|
||||
<tr><th>Nom de l'employeur</th><td>{{famille.RL2.NOMEMPLOYEUR|default:""}}</td></tr>
|
||||
<tr><th>Adresse de l'employeur</th><td>{{famille.RL2.ADREMPLOYEUR.NUMVOIE|default:""}} {{famille.RL2.ADREMPLOYEUR.VOIE|default:""}}{% if famille.RL2.ADREMPLOYEUR.COMPLEMENTVOIE %} {{famille.RL2.ADREMPLOYEUR.COMPLEMENTVOIE}}{% endif %}{% if famille.RL2.ADREMPLOYEUR.COMPLEMENT1 %} {{famille.RL2.ADREMPLOYEUR.COMPLEMENT1}}{% endif %}{% if famille.RL2.ADREMPLOYEUR.COMPLEMENT2 %} {{famille.RL2.ADREMPLOYEUR.COMPLEMENT2}}{% endif %}, {{famille.RL2.ADREMPLOYEUR.CODEPOSTAL|default:""}} {{famille.RL2.ADREMPLOYEUR.VILLE|default:""}}</td></tr>
|
||||
</table>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{{ json.err_desc|default:"erreur inconnue" }}
|
||||
{% endif %}
|
||||
</div>
|
|
@ -0,0 +1,75 @@
|
|||
{% now "md" as md %}
|
||||
{% now "Y" as year %}
|
||||
|
||||
{% if md < "0211" %}
|
||||
|
||||
{# avant le 11 février, on affiche rien, cf règle https://dev.entrouvert.org/issues/39212 #}
|
||||
|
||||
{% else %}
|
||||
|
||||
<h1>Revenu mensuel</h1>
|
||||
|
||||
<div>
|
||||
{% if not json.err %}
|
||||
|
||||
{% if json.data.CODEMISEAJOUR|decimal != json.data.annee_reference_short|decimal %}
|
||||
|
||||
Votre DUI n’est pas à jour, veuillez procéder à sa mise à jour.
|
||||
|
||||
{% else %}
|
||||
|
||||
{% with r=json.data.REVENUS m=json.data.REVENUS.MONTANTTOTAL|decimal d=json.data.REVENUS.DATEVALIDITE|date %}
|
||||
|
||||
{% if d and d|date:"Y"|decimal == json.data.annee_reference|decimal and d|date:"md"|decimal == 1231 %}
|
||||
|
||||
{% if m == 0 %}
|
||||
|
||||
{% if r.RNF == True and r.SFI == True %}
|
||||
Votre dossier est en cours de traitement.
|
||||
{% elif r.RNF == True %}
|
||||
Vous avez choisi de ne pas fournir vos revenus, les tarifs maximums seront appliqués.
|
||||
{% elif r.SFI == True %}
|
||||
Votre situation financière est incomplète, les tarifs maximums sont appliqués jusqu’à réception des justificatifs complets.
|
||||
{% else %}
|
||||
Votre dossier est en cours de traitement.
|
||||
{% endif %}
|
||||
|
||||
{% elif m <= 0.08 %}
|
||||
|
||||
{% if r.RNF == True or r.SFI == True %}
|
||||
Votre dossier est en cours de traitement.
|
||||
{% else %}
|
||||
Le revenu mensuel pris en compte est de <strong>0 €</strong>, les tarifs minimums seront appliqués.
|
||||
{% endif %}
|
||||
|
||||
{% else %}{# pour les revenus classiques (m > 0.08) #}
|
||||
|
||||
{% if r.RNF == True or r.SFI == True %}
|
||||
Votre dossier est en cours de traitement.
|
||||
{% else %}
|
||||
Le revenu mensuel pris en compte est de <strong>{{m|decimal:2}} €</strong>
|
||||
<br />
|
||||
<small>(Revenu net fiscal avant abattement et hors prestations familiales)</small>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
Votre DUI n’est pas à jour, veuillez procéder à sa mise à jour.
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endwith %}
|
||||
|
||||
{% endif %}{# CODEMISEAJOUR == annee_reference_short #}
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ json.err_desc|default:"erreur inconnue" }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
Loading…
Reference in New Issue