{% extends "base.html.twig" %} {% block localstyle %} table { width:100% } th, td { border: 1px solid var(--colorbgbodylight); width:33.333333%; padding:5px; text-align:center; font-size: 10px; } .clock { background-color: var(--dark); color: #fff; padding: 0px 20px 20px 20px; font-size: 40px; text-align: center; line-height:30px; width:250px; border-radius: 0.25rem; } .clock small { font-size: 30%; margin-top:-15px; } .alert { width:250px; } .tallydaydetail { width:250px; text-align: left; margin-top: 20px; } @media (max-width: 991px) { .zoomed { zoom: 240%; } } {% endblock %} {% block body %}
{% if message is defined and not message is empty %}
Erreur
{{ message|raw }}
{% endif %} {% set isvalideuser=false %} {% set isvalidemaster=false %} {% for tallyday in tallydays %} {% set isvalideuser=tallyday.validateuser %} {% set isvalidemaster=tallyday.validatemaster %} {% endfor %} {% if not tallydays or not tallydays|last.dateend is null %} {% if not isvalideuser and not isvalidemaster %} Début Pointage {% endif %} {% else %} Fin Pointage {% endif %}
{% set isvalideuser=false %} {% set isvalidemaster=false %} {% for tallyday in tallydays %} {% set isvalideuser=tallyday.validateuser %} {% set isvalidemaster=tallyday.validatemaster %} {% endfor %}
Début Fin Temps
{{tallyday.datestart|date("H:i")}} {% if tallyday.dateend %} {{tallyday.dateend|date("H:i")}} {%endif%} {{tallyday.timedayformatted}}
Temps de travail
{{timeday}}
Capital Temps
{{capitaltime}}
{% if not isvalideuser and not isvalidemaster %} Valider ma journée
{% endif %} Gérer mes Pointages {% if isvalideuser and not isvalidemaster %}
Dévalider ma journée {% endif %} {% if is_granted('ROLE_MASTER') %}

GESTION

Gestion des Pointages {% endif %}
{% endblock %} {% block localjavascript %} var now=new Date(); function showTime(){ // to get current time/ date. var date = new Date(); // Recharger la page au cas où on change de jour if(moment(date).diff(moment(now), "days")!=0) location.reload(); // Masquer les alerte au bout 30s if(moment(date).diff(moment(now), "seconds")>5 && $(".alert").length) window.location.replace("{{path("app_tallyday")}}"); var dm = date.toLocaleDateString('fr-FR', { weekday: 'long' }); // to get the current hour var h = date.getHours(); // to get the current minutes var m = date.getMinutes(); //to get the current second var s = date.getSeconds(); m = ( m < 10 ) ? m = "0" + m : m; s = ( s < 10 ) ? s = "0" + s : s; // putting time in one variable var time = "" + dm + " " + date.toLocaleDateString("fr") + "
" + h + ":" + m + ":" + s; // putting time in our div $('#clock').html(time); //to change time in every seconds setTimeout( showTime, 1000 ); } showTime(); {% endblock %}