{% extends 'base.html.twig' %} {% block title %} Rendez-vous patients {% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block body %}
{% set now = "now"|date("U") %}

Passées

{% set has_past_appointments = false %} {% set current_date = null %} {% for appointment in appointments %} {% if appointment.dateTime|date("U") < now %} {% set has_past_appointments = true %} {% set appointment_date = appointment.dateTime|date('d/m/Y') %} {% if appointment_date != current_date %} {% if current_date is not null %}
{% endif %} {% set current_date = appointment_date %}
{% endif %}
{{ current_date }}
{{ appointment.dateTime|date('H:i') }}
{{ appointment.statu.name }}
{% endif %} {% endfor %} {% if not has_past_appointments %}

Aucun rendez-vous passé à afficher.

{% endif %}

Mes rendez-vous à venir

{% set has_upcoming_appointments = false %} {% set current_date = null %} {% for appointment in appointments %} {% if appointment.dateTime|date("U") >= now %} {% set has_upcoming_appointments = true %} {% set appointment_date = appointment.dateTime|date('d/m/Y') %} {% if appointment_date != current_date %} {% if current_date is not null %}
{% endif %} {% set current_date = appointment_date %}
{% endif %}
{{ current_date }}
{{ appointment.dateTime|date('H:i') }}
{{ appointment.statu.name }}
{% if not appointment.comment %}

Aucun commentaire renseigné

{% else %}

Commentaire

{{ appointment.comment }}

{% endif %}
{% if not appointment.reason %}

Aucun motif renseigné

{% else %}

Motif

{{ appointment.reason.name }}

{% endif %}
{{include('appointment/_delete_form.html.twig')}}
{% endif %} {% endfor %} {% if not has_upcoming_appointments %}

Aucun rendez-vous à venir à afficher.

{% endif %}
{% endblock %}