This commit is contained in:
afornerot 2022-02-09 18:09:54 +01:00
parent ca594730ea
commit df691d7b10
10 changed files with 423 additions and 70 deletions

View File

@ -208,3 +208,7 @@ app_tallyday_userupdate:
app_tallyday_userlist:
path: /user/tallydays
defaults: { _controller: App\Controller\TallydayController:usertallydays }
app_tallyday_masterlist:
path: /master/tallydays
defaults: { _controller: App\Controller\TallydayController:mastertallydays }

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

View File

@ -35,7 +35,42 @@ class TallydayController extends AbstractController
public function usertallydays(Request $request) {
$this->tallydays($this->getUser(),$request,$dates,$datenext,$dateprev,$timeweek);
if($request->get("week")) {
$weeknow=new \DateTime($request->get("week"));
$weeknow->modify('monday this week');
$weeknext=clone $weeknow;
$weeknext->modify('monday next week');
$weekprev=clone $weeknow;
$weekprev->modify('monday previous week');
}
else {
$weeknow=new \DateTime('monday this week');
$weeknext=new \DateTime('monday next week');
$weekprev=new \DateTime('monday previous week');
}
$em = $this->getDoctrine()->getManager();
$dates=[];
$dateend=clone $weeknow;
$dateend->modify("sunday this week");
$e = new \DateTime('00:00');
$f = clone $e;
$datenow=clone $weeknow;
while($datenow<=$dateend) {
$data= $em->getRepository($this->entity)->findTallyday($this->getUser(),$datenow);
array_push($dates,["date"=>clone $datenow,"tallyday"=>$data]);
if($data) $e->add($data->getTimeday());
$datenow->add(new \DateInterval('P1D'));
}
$interval = $f->diff($e);
$timeweek = (($interval->days*24) + $interval->h).":".sprintf("%02s",$interval->i);
// récupérer la premier validation master
$firstvalidate= $em->getRepository($this->entity)->findOneBy(["user"=>$this->getUser(),"validatemaster"=>true],["dateof"=>"ASC"]);
return $this->render('Tallyday/list.html.twig',[
"useheader" => true,
@ -43,49 +78,102 @@ class TallydayController extends AbstractController
"usemonocolor" => false,
"maxwidth" => true,
"dates" => $dates,
"datenext" => $datenext,
"dateprev" => $dateprev,
"week" => $weeknow,
"weeknext" => $weeknext,
"weekprev" => $weekprev,
"timeweek" => $timeweek,
"firstvalidate" => $firstvalidate,
"message" => $request->get("message"),
]);
}
private function tallydays($user, Request $request,&$dates,&$datenext,&$dateprev,&$timeweek) {
if($request->get("date")) {
$datenow=new \DateTime($request->get("date"));
$datenow->modify('monday this week');
$datenext=clone $datenow;
$datenext->modify('monday next week');
$dateprev=clone $datenow;
$dateprev->modify('monday previous week');
}
else {
$datenow=new \DateTime('monday this week');
$datenext=new \DateTime('monday next week');
$dateprev=new \DateTime('monday previous week');
}
$em = $this->getDoctrine()->getManager();
public function mastertallydays(Request $request) {
$dates=[];
$dateend=clone $datenow;
// Pour l'ensemble des utlisateurs
$em = $this->getDoctrine()->getManager();
$users = $em->getRepository("App:User")->findBy([],["firstname"=>"ASC","lastname"=>"ASC"]);
foreach($users as $user) {
if($user->hasRole("ROLE_USER")) {
$dates[$user->getId()] = [
"id"=>$user->getId(),
"avatar"=>$user->getAvatar(),
"displayname"=>$user->getDisplayname(),
"validates"=>[],
"notvalidates"=>[],
];
// On recherche le dernier pointage validé
$tallydate=$em->getRepository(("App:Tallyday"))->findOneBy(["user"=>$user,"validatemaster"=>true],["dateof"=>"DESC"]);
if($tallydate) {
$datenow=clone $tallydate->getDateof();
$datenow=$datenow->modify("monday this week");
$dateend=clone $tallydate->getDateof();
$dateend->modify("sunday this week");
$e = new \DateTime('00:00');
$f = clone $e;
while($datenow<=$dateend) {
$data= $em->getRepository($this->entity)->findTallyday($user,$datenow);
array_push($dates,["date"=>clone $datenow,"tallyday"=>$data]);
if($data) $e->add($data->getTimeday());
$tallydate= $em->getRepository($this->entity)->findTallyday($user,$datenow);
$tmp= [
"dateof"=>clone $datenow,
"tallyday"=>$tallydate,
"timeweek"=>"",
];
array_push($dates[$user->getId()]["validates"],$tmp);
if($tallydate) $e->add($tallydate->getTimeday());
$datenow->add(new \DateInterval('P1D'));
}
$timeweek = $f->diff($e)->format("%H:%I");
$interval = $f->diff($e);
$timeweek = (($interval->days*24) + $interval->h).":".sprintf("%02s",$interval->i);
$dates[$user->getId()]["validates"][0]["timeweek"]=$timeweek;
}
// On recherche le pointage à valider
$tallydate=$em->getRepository(("App:Tallyday"))->findOneBy(["user"=>$user,"validatemaster"=>false],["dateof"=>"ASC"]);
if($tallydate) {
$datenow=clone $tallydate->getDateof();
$dateend=clone $tallydate->getDateof();
$dateend->modify("last day of this month");
$dateend->modify("next sunday");
$e = new \DateTime('00:00');
$f = clone $e;
while($datenow<=$dateend) {
$tallydate= $em->getRepository($this->entity)->findTallyday($user,$datenow);
$tmp= [
"dateof"=>clone $datenow,
"tallyday"=>$tallydate,
"timeweek"=>"",
];
array_push($dates[$user->getId()]["notvalidates"],$tmp);
if($tallydate) $e->add($tallydate->getTimeday());
$datenow->add(new \DateInterval('P1D'));
}
$interval = $f->diff($e);
$timeweek = (($interval->days*24) + $interval->h).":".sprintf("%02s",$interval->i);
$dates[$user->getId()]["notvalidates"][0]["timeweek"]=$timeweek;
}
}
}
return $this->render('Tallyday/master.html.twig',[
"useheader" => true,
"usesidebar" => false,
"usemonocolor" => false,
"maxwidth" => false,
"dates" => $dates,
"message" => $request->get("message"),
]);
}
public function start() {
$em = $this->getDoctrine()->getManager();
@ -177,8 +265,25 @@ class TallydayController extends AbstractController
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->entity)->findTallyday($user,$date);
// récupérer la premier validation master
$firstvalidate= $em->getRepository($this->entity)->findOneBy(["user"=>$this->getUser(),"validatemaster"=>true],["dateof"=>"ASC"]);
// Pas normal
if(!$data) return $this->redirectToRoute("app_tallyday");
if($firstvalidate && $firstvalidate->getDateof() > $date) return $this->redirectToRoute("app_tallyday");
// Si aucun enregistrement on initialise le pointage sur la journée
if(!$data) {
$data = new Entity();
$data->setUser($this->getUser());
$datenow=clone $date;
$data->setDateof($datenow);
$data->setValidateuser(false);
$data->setValidatemaster(false);
$em->persist($data);
$em->flush();
}
if(($data->getDatestartam()&&!$data->getDateendam())||($data->getDatestartpm()&&!$data->getDateendpm())) {
if($request->get("from")=="list")
@ -193,14 +298,23 @@ class TallydayController extends AbstractController
$em->flush();
if($request->get("from")=="list")
return $this->redirectToRoute("app_tallyday_userlist");
return $this->redirectToRoute("app_tallyday_userlist",["week"=>$request->get("week")]);
else
return $this->redirectToRoute("app_tallyday");
}
public function userdevalidate() {
public function userdevalidate(Request $request) {
return $this->devalidate($this->getUser(),$request);
}
public function devalidate($user, Request $request) {
if($request->get("date"))
$date=new \DateTime($request->get("date"));
else
$date=new \DateTime("now");
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->entity)->findTallyday($this->getUser(),new \DateTime("now"));
$data = $em->getRepository($this->entity)->findTallyday($this->getUser(),$date);
// Pas normal
if(!$data) return $this->redirectToRoute("app_tallyday");
@ -212,6 +326,10 @@ class TallydayController extends AbstractController
$data->setValidateuser(false);
$em->persist($data);
$em->flush();
if($request->get("from")=="list")
return $this->redirectToRoute("app_tallyday_userlist",["week"=>$request->get("week")]);
else
return $this->redirectToRoute("app_tallyday");
}
@ -232,6 +350,12 @@ class TallydayController extends AbstractController
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->entity)->findTallyday($this->getUser(),$date);
// Récupérer la premier validation master
$firstvalidate= $em->getRepository($this->entity)->findOneBy(["user"=>$this->getUser(),"validatemaster"=>true],["dateof"=>"ASC"]);
// Pas normal
if($firstvalidate && $firstvalidate->getDateof() > $date) return $this->redirectToRoute("app_tallyday");
// Si aucun enregistrement on initialise le pointage sur la journée
if(!$data) {
$data = new Entity();
@ -259,12 +383,36 @@ class TallydayController extends AbstractController
if ($form->get('submit')->isClicked() && $form->isValid()) {
$data = $form->getData();
if($data->getDatestartam()) {
$datestartam= clone $date;
$datestartam->setTime($data->getDatestartam()->format("H"),$data->getDatestartam()->format("i"));
$data->setDatestartam($datestartam);
} else $data->setDatestartam(null);
if($data->getDateendam()) {
$dateendam= clone $date;
$dateendam->setTime($data->getDateendam()->format("H"),$data->getDateendam()->format("i"));
$data->setDateendam($dateendam);
} else $data->setDateendam(null);
if($data->getDatestartpm()) {
$datestartpm= clone $date;
$datestartpm->setTime($data->getDatestartpm()->format("H"),$data->getDatestartpm()->format("i"));
$data->setDatestartpm($datestartpm);
} else $data->setDatestartpm(null);
if($data->getDateendpm()) {
$dateendpm= clone $date;
$dateendpm->setTime($data->getDateendpm()->format("H"),$data->getDateendpm()->format("i"));
$data->setDateendpm($dateendpm);
} else $data->setDateendpm(null);
$em->persist($data);
$em->flush();
// Retour à la liste
if($request->get("from")=="list")
return $this->redirectToRoute("app_tallyday_userlist");
return $this->redirectToRoute("app_tallyday_userlist",["week"=>$request->get("week")]);
else
return $this->redirectToRoute($this->route);
}
@ -276,6 +424,7 @@ class TallydayController extends AbstractController
"usemonocolor" => true,
"maxwidth" => true,
$this->data => $data,
"week" => $request->get("week"),
"from" => $request->get("from"),
'form' => $form->createView()
]);
@ -284,6 +433,7 @@ class TallydayController extends AbstractController
protected function getErrorForm($id,$form,$request,$data) {
if ($form->get('submit')->isClicked()) {
// On s'assure que l'ensemble des dates sont bien dans la journée
/*
$i1=0;
if($data->getDatestartam()) $i1 = $data->getDateof()->diff($data->getDatestartam())->format("%a");
@ -298,6 +448,7 @@ class TallydayController extends AbstractController
if(($i1+$i2+$i3+$i4)!=0)
$form->addError(new FormError("L'ensemble des dates doivent être pour la journée du = ".$data->getDateof()->format("d/m/Y")));
*/
// Si date fin il faut une date début
if(($data->getDateendam()&&!$data->getDatestartam())||($data->getDateendpm()&&!$data->getDatestartpm()))

View File

@ -167,6 +167,7 @@ class UserController extends AbstractController
return $this->render($this->render.'edit.html.twig', [
'useheader' => true,
'usesidebar' => false,
'maxwidth' => true,
$this->data => $data,
'mode' => 'profil',
'form' => $form->createView()

View File

@ -78,7 +78,9 @@ class Tallyday
}
public function getTimedayformatted() {
return $this->getTimeday()->format("%H:%I");
$interval=$this->getTimeday();
$timeday = sprintf("%02s",(($interval->days*24)) + $interval->h).":".sprintf("%02s",$interval->i);
return $timeday;
}
public function getId(): ?int

View File

@ -5,6 +5,7 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\TimeType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
@ -33,7 +34,7 @@ class TallydayType extends AbstractType
);
$builder->add('datestartam',
DatetimeType::class, [
TimeType::class, [
"label" => "Matin Début",
"required" => false,
"widget" => 'single_text',
@ -41,7 +42,7 @@ class TallydayType extends AbstractType
);
$builder->add('dateendam',
DatetimeType::class, [
TimeType::class, [
"label" => "Matin Fin",
"required" => false,
"widget" => 'single_text',
@ -49,7 +50,7 @@ class TallydayType extends AbstractType
);
$builder->add('datestartpm',
DatetimeType::class, [
TimeType::class, [
"label" => "Aprés-midi Début",
"required" => false,
"widget" => 'single_text',
@ -57,7 +58,7 @@ class TallydayType extends AbstractType
);
$builder->add('dateendpm',
DatetimeType::class, [
TimeType::class, [
"label" => "Aprés-midi Fin",
"required" => false,
"widget" => 'single_text',

View File

@ -8,7 +8,7 @@
{{ form_widget(form.submit) }}
{% if from=="list" %}
<a class="btn btn-secondary" href={{ path('app_tallyday_userlist') }}>Annuler</a>
<a class="btn btn-secondary" href={{ path('app_tallyday_userlist',{week:week|date("Y-m-d")}) }}>Annuler</a>
{% else %}
<a class="btn btn-secondary" href={{ path('app_tallyday') }}>Annuler</a>
{% endif %}
@ -33,10 +33,40 @@
</div>
{% endif %}
{% set trans_day_hash = {
"Monday": "Lundi",
"Tuesday": "Mardi",
"Wednesday": "Mercredi",
"Thursday": "Jeudi",
"Friday": "Vendredi",
"Saturday": "Samedi",
"Sunday": "Dimanche"
}
%}
<h3>{{ trans_day_hash[tallyday.dateof|date('l')] }} {{tallyday.dateof|date("d/m/Y")}}</h3>
<div class="row">
<div class="col-md-6">
{{ form_row(form.datestartam) }}
</div>
<div class="col-md-6">
{{ form_row(form.dateendam) }}
</div>
<div class="col-md-6">
{{ form_row(form.datestartpm) }}
</div>
<div class="col-md-6">
{{ form_row(form.dateendpm) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
$("#tallyday_datestartam").focus();
});
{% endblock %}

View File

@ -8,8 +8,8 @@
</h1>
<a class="btn btn-secondary" href={{ path('app_tallyday') }}>Retour</a>
<a class="btn btn-secondary float-right" href={{ path('app_tallyday_userlist',{date:datenext|date("Y-m-d")}) }}>Semaine Suivante</a>
<a class="btn btn-secondary float-right mr-2" href={{ path('app_tallyday_userlist',{date:dateprev|date("Y-m-d")}) }}>Semaine Précedente</a>
<a class="btn btn-secondary float-right" href={{ path('app_tallyday_userlist',{week:weeknext|date("Y-m-d")}) }}>Semaine Suivante</a>
<a class="btn btn-secondary float-right mr-2" href={{ path('app_tallyday_userlist',{week:weekprev|date("Y-m-d")}) }}>Semaine Précedente</a>
{% if message is defined and not message is empty %}
<div class='alert alert-danger' style='margin: 5px 0px'>
@ -35,25 +35,24 @@
<tr>
<th width="70px" class="no-sort">Action</th>
<th class="no-sort">Date</th>
<th class="no-sort">AM début</th>
<th class="no-sort">AM fin</th>
<th class="no-sort">PM début</th>
<th class="no-sort">PM fin</th>
<th class="no-sort">Durée</th>
<th class="no-sort" width="70px">AM début</th>
<th class="no-sort" width="70px">AM fin</th>
<th class="no-sort" width="70px">PM début</th>
<th class="no-sort" width="70px">PM fin</th>
<th class="no-sort" width="70px">Durée</th>
</tr>
</thead>
<tbody>
{%for date in dates %}
<tr>
<td>
{% if date["tallyday"] is empty or not date["tallyday"].validateuser %}
<a href="{{ path('app_tallyday_userupdate',{date:date["date"]|date("Y-m-d"),from:"list"}) }}"><i class="fa fa-file"></i></a>
{% if date["tallyday"] %}
<a href="{{path("app_tallyday_uservalidate",{date:date["date"]|date("Y-m-d"),from:"list"})}}"><i class="fas fa-check"></i></a>
{% if date["tallyday"] is empty or (not date["tallyday"].validateuser and not date["tallyday"].validatemaster) %}
{% if not firstvalidate or firstvalidate.dateof < date["date"] %}
<a href="{{ path('app_tallyday_userupdate',{date:date["date"]|date("Y-m-d"),from:"list",week:week|date("Y-m-d")}) }}"><i class="fa fa-file"></i></a>
<a href="{{path("app_tallyday_uservalidate",{date:date["date"]|date("Y-m-d"),from:"list",week:week|date("Y-m-d")})}}"><i class="fas fa-check"></i></a>
{% endif %}
{% elseif not date["tallyday"].validatemaster %}
<a href="{{ path('app_tallyday_userdevalidate',{date:date["date"]|date("Y-m-d"),from:"list"}) }}"><i class="fas fa-lock"></i></i></a>
<a href="{{ path('app_tallyday_userdevalidate',{date:date["date"]|date("Y-m-d"),from:"list",week:week|date("Y-m-d")}) }}"><i class="fas fa-lock"></i></i></a>
{% endif %}
</td>
<td>{{ trans_day_hash[date["date"]|date('l')] }} {{date["date"]|date("d/m/Y")}}</td>
@ -62,13 +61,13 @@
<td></td>
<td></td>
<td></td>
<td>00:00</td>
<td class="text-center">00:00</td>
{% else %}
<td>{% if date["tallyday"].datestartam is not null %}{{date["tallyday"].datestartam|date("H:i")}}{%endif%}</td>
<td>{% if date["tallyday"].dateendam is not null %}{{date["tallyday"].dateendam|date("H:i")}}{%endif%}</td>
<td>{% if date["tallyday"].datestartpm is not null %}{{date["tallyday"].datestartpm|date("H:i")}}{%endif%}</td>
<td>{% if date["tallyday"].dateendpm is not null %}{{date["tallyday"].dateendpm|date("H:i")}}{%endif%}</td>
<td>{{ date["tallyday"].timedayformatted }}</td>
<td class="text-center">{% if date["tallyday"].datestartam is not null %}{{date["tallyday"].datestartam|date("H:i")}}{%endif%}</td>
<td class="text-center">{% if date["tallyday"].dateendam is not null %}{{date["tallyday"].dateendam|date("H:i")}}{%endif%}</td>
<td class="text-center">{% if date["tallyday"].datestartpm is not null %}{{date["tallyday"].datestartpm|date("H:i")}}{%endif%}</td>
<td class="text-center">{% if date["tallyday"].dateendpm is not null %}{{date["tallyday"].dateendpm|date("H:i")}}{%endif%}</td>
<td class="text-center">{{ date["tallyday"].timedayformatted }}</td>
{% endif %}
</tr>
{%endfor%}

View File

@ -0,0 +1,161 @@
{% extends "base.html.twig" %}
{% block localstyle %}
th, td {
border: 1px solid #37474F;
color: #ffffff;
background-color: #37474F;
text-align: center;
width: 85px;
}
td {
background-color: #e8ecf1;
height: 44px;
vertical-align: top;
font-size: 9px;
color: var(--colorftbodylight);
}
.date {
color: #ffffff;
background-color: #37474F;
}
{% endblock %}
{% block body %}
<h1 class="page-header">
VALIDATION DES POINTAGES
</h1>
<a class="btn btn-secondary" href={{ path('app_tallyday') }}>Retour</a>
{% if message is defined and not message is empty %}
<div class='alert alert-danger' style='margin: 5px 0px'>
<strong>Erreur</strong><br>
{{ message|raw }}<br>
</div>
{% endif %}
<div class="mt-3">
{% for date in dates %}
<div class="card mr-1 mb-1 float-left">
<div class="card-header">
{{ date.displayname }}
</div>
<div class="card-body">
<table>
<thead>
<tr>
<th class="no-print"></th>
<th style="width:30px !important">s</th>
<th>L</th>
<th>M</th>
<th>M</th>
<th>J</th>
<th>V</th>
<th>S</th>
<th>D</th>
</tr>
</thead>
<tbody>
{% if date.validates %}
<tr>
{% for validate in date.validates %}
{% if loop.first %}
<td style="font-size:14px; vertical-align:middle;"><i class="fa fa-thumbs-down" style="cursor:pointer; color:red;"></i></td>
<td style="width:30px !important; vertical-align:middle;">
{{validate.dateof|date("W")}}<br>
= {{validate.timeweek }}
</td>
{% endif %}
<td style="align:top">
<div class="date">{{validate.dateof|date("d/m")}}</div>
<div style="min-height:28px">
{% if validate.tallyday %}
{%if validate.tallyday.datestartam %} de {{validate.tallyday.datestartam|date("H:i") }} {% endif %}
{%if validate.tallyday.dateendam %} à {{validate.tallyday.dateendam|date("H:i") }} {% endif %}
{%if validate.tallyday.datestartam or validate.tallyday.dateendam %} <br> {% endif %}
{%if validate.tallyday.datestartpm %} de {{validate.tallyday.datestartpm|date("H:i") }} {% endif %}
{%if validate.tallyday.dateendpm %} à {{validate.tallyday.dateendpm|date("H:i") }} {% endif %}
{% endif %}
</div>
<div>
{% if validate.tallyday %}
= {{validate.tallyday.timedayformatted}}
{% else %}
= 00:00
{% endif %}
</div>
</td>
{% endfor %}
</tr>
{% endif %}
{% if date.notvalidates %}
{% for notvalidate in date.notvalidates %}
{% if loop.first or notvalidate.dateof|date("l")=="Monday" %}
<tr>
<td style="font-size:14px; vertical-align:middle;"><i class="fa fa-thumbs-down" style="cursor:pointer; color:red;"></i></td>
<td style="width:30px !important; vertical-align:middle;">
{{notvalidate.dateof|date("W")}}<br>
= {{notvalidate.timeweek }}
</td>
{% endif %}
<td style="align:top">
<div class="date">{{notvalidate.dateof|date("d/m")}}</div>
<div style="min-height:28px">
{% if notvalidate.tallyday %}
{%if notvalidate.tallyday.datestartam %} de {{notvalidate.tallyday.datestartam|date("H:i") }} {% endif %}
{%if notvalidate.tallyday.dateendam %} à {{notvalidate.tallyday.dateendam|date("H:i") }} {% endif %}
{%if notvalidate.tallyday.datestartam or notvalidate.tallyday.dateendam %} <br> {% endif %}
{%if notvalidate.tallyday.datestartpm %} de {{notvalidate.tallyday.datestartpm|date("H:i") }} {% endif %}
{%if notvalidate.tallyday.dateendpm %} à {{notvalidate.tallyday.dateendpm|date("H:i") }} {% endif %}
{% endif %}
</div>
<div>
{% if notvalidate.tallyday %}
= {{notvalidate.tallyday.timedayformatted}}
{% else %}
= 00:00
{% endif %}
</div>
</td>
{% if loop.last or notvalidate.dateof|date("l")=="Sunday"%}
<tr>
{% endif %}
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
paging: false,
ordering: false,
info: false,
searching: false,
});
});
{% endblock %}

View File

@ -69,6 +69,10 @@
{% endif %}
<a href="{{path("app_tallyday_userlist")}}" class="btn btn-success mt-3" style="width:380px">Gérer mes Pointages</a>
{% if is_granted('ROLE_MASTER') %}
<br>
<a href="{{path("app_tallyday_masterlist")}}" class="btn btn-success mt-3" style="width:380px">Gestion des Pointages</a>
{% endif %}
{% if tallyday and tallyday.validateuser and not tallyday.validatemaster %}
<br><a href="{{path("app_tallyday_userdevalidate")}}" class="btn btn-secondary mt-3" style="width:380px">Dévalider ma journée</a>