{% extends 'Front/layout.html.twig' %}

{% set constUserTypeProf = constant('AppBundle\\Enum\\UserType::TEACHER') %}

{% set bodyClass = 'la-rioja' %}

{% block body %}
<div class="espace-perso-actions clearfix">
    <a class="btn btn-theme float-right" href="{{ path('espace_perso_pee_add') }}">{{ 'word.make_request'|trans({}, 'word') }}</a>
</div>
<div class="block-operations">
    <div class="operations">
        <div class="operations-list">
            {% if constant('AppBundle\\Enum\\UserType::TEACHER') == app.user.type %}
                {% if (operations is defined and operations is iterable and operations|length > 0) or (demandes is defined and demandes is iterable and demandes|length > 0) or (operationsDone is defined and operationsDone is iterable and operationsDone|length > 0) %}
                    <div class="operation-block blockProgramed list-cards">
                        {{
                            include('Front/User/_component/describeOperationPee.html.twig', {
                                operations: operations,
                                dWaitingValidation: demandesWaitingValidation
                            })
                        }}
                    </div>
                    
                    <div class="demande-block blockPee list-cards">
                        {{ include('Front/User/_component/describeDemandePee.html.twig', {demandes:demandes}) }}
                    </div>
                    <div class="operation-block blockRealized list-cards">
                        {{ include('Front/User/_component/describeOperationPee.html.twig', {operations:operationsDone}) }}
                    </div>
                {% else %}
                    <div class="alert alert-warning text-center">
                        Vous n'avez aucune demande en cours. <br/>Pour participer à l'une de nos opérations faites une nouvelle demande
                    </div>   
                {% endif %}
            {% else %} {# Engineer #}
                
            {% endif %}
        </div>
    </div>      
</div>
{% endblock %}

{% block before_body %} 
    {% set pageHeaderActiveMenu = 'pee' %}
    {% include "Front/_part/page-header-profile.html.twig" %}
{% endblock %}

{% block after_body %} 
    {% include "Front/User/Teacher/first_login.html.twig" %}
{% endblock %}