{% macro planning_body(dict_planning={}, impression=False) %} {% for unite in dict_planning["liste_unites"] %} {% endfor %} {% set date_precedente = {"valeur" : None} %} {% for date in dict_planning["liste_dates"] %} {% for unite in dict_planning["liste_unites"] %} {% if IsUniteOuverte(unite, date, dict_planning) == True %} {% set etat_case = GetEtatFondCase(unite, date, dict_planning) %} {% set etat_coche = GetEtatCocheCase(unite, date, dict_planning) %} {% set modification_allowed = IsUniteModifiable(unite, date, dict_planning) %} {% else %} {% endif %} {% endfor %} {% if date_precedente.update({'valeur': date}) %}{% endif %} {% endfor %}
{{ unite.nom }}
{{ DateDDEnFrComplet(date) }}
{% if etat_case == "absenti" or etat_case == "absentj" %}
Absent
{% elif etat_case == "present" %}
Présent
{% elif etat_case == "refus" %}
Refus
{% else %} {% if impression == False %}
{% else %} {% if etat_case == "reservation" and etat_coche == True %}
Réservation validée
{% endif %} {% if etat_case == "reservation" and etat_coche == False %}
Réservation
[Annulation non traitée]
{% endif %} {% if etat_case == None and etat_coche == True %}
Réservation
[Demande non traitée]
{% endif %} {% if etat_case == "attente" %}
Réservation refusée
{% endif %} {% endif %} {% endif %}
{% endmacro %} {% macro planning_semaine_type(dict_planning={}, num_semaine=0) %} {% for unite in dict_planning['liste_unites'] %} {% endfor %} {% for jour in ['Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche'] %} {% if loop.index0 in GetJoursOuverts(dict_planning) %} {% set rowloop = loop %} {% for unite in dict_planning['liste_unites'] %} {% endfor %} {% endif %} {% endfor %}
{{ unite.nom }}
{{ jour }}
{% endmacro %} {% macro planning_modals(dict_planning={}) %} {% endmacro %} {% macro planning_scripts(dict_planning={}) %} {% endmacro %}