Ticket
{% if tickets | length == 1 %} {{ tickets | keys | last }} {% endif %}
{% include 'statistique/chart/line.html.twig' with {d1 : tickets[2022],d1_label : 'Nombres' , label : 'Tickets' , id : 1, width : 100 , height : 50} %}
{% if app.user.is('dev') %}
Temps Tickets
{% if tempstickets | length == 1 %} {{ tempstickets | keys | last }} {% endif %}
{% set tempsticketsMois = [] %} {% for month in tempstickets %} {% set tempsticketsMois = tempsticketsMois | merge({ (month.month) : (month.tempsEstime) }) %} {% endfor %} {% set tempsticketsMoisReel = [] %} {% for month in tempsticketsReel %} {% set tempsticketsMoisReel = tempsticketsMoisReel | merge({ (month.month) : (month.tempsReel) }) %} {% endfor %} {% include 'statistique/chart/line.html.twig' with { d1 : tempsticketsMois ,d1_label : "Temps estimé",d2 : tempsticketsMoisReel ,d2_label : "Temps réel", label : 'Tickets', id : 3, width : 100, height : 50} %}
{% endif %} {% if caYear == null %} {% set year = CA|keys|last %} {% else %} {% set year = caYear %} {% endif %}
CA
{% set keys = CA | keys %} {% set index = 1 %} {% for item in keys %} {% if item == year %} {% set index = loop.index - 1 %} {% endif %} {% endfor %} {% if index > 0 %}
{{ keys[index - 1] }}
{% endif %} {{ year }} {% if index < keys | length - 1 %}
{{ keys[index + 1] }}
{% endif %}
{% include 'statistique/chart/line.html.twig' with {d1 : CA[year],d1_label : 'Total' , label : 'CA' , id : 2, width : 100 , height : 50} %}