Compare commits
No commits in common. "7b7b79e7a671bdf25e1820cf52affa6995d13702" and "972abf50ffe95991c9815c3add51a5133c53ba04" have entirely different histories.
7b7b79e7a6
...
972abf50ff
|
@ -2,9 +2,9 @@ knp_snappy:
|
|||
temporary_folder: "%kernel.cache_dir%/snappy"
|
||||
pdf:
|
||||
enabled: true
|
||||
binary: '/var/www/html/ninebadge/scripts/wkhtmltopdf/wkhtmltopdf'
|
||||
binary: '/var/www/html/ninegitea/scripts/wkhtmltopdf/wkhtmltopdf'
|
||||
options: []
|
||||
image:
|
||||
enabled: true
|
||||
binary: '/var/www/html/ninebadge/scripts/wkhtmltopdf/wkhtmltoimage'
|
||||
binary: '/var/www/html/ninegitea/scripts/wkhtmltopdf/wkhtmltoimage'
|
||||
options: []
|
||||
|
|
|
@ -182,11 +182,11 @@ app_tallyday:
|
|||
defaults: { _controller: App\Controller\TallydayController:tallyday }
|
||||
|
||||
app_tallyday_start:
|
||||
path: /user/tallyday/start/{istelework}/{ispenaltypassive}/{ispenaltyactive}
|
||||
path: /user/tallyday/start
|
||||
defaults: { _controller: App\Controller\TallydayController:start }
|
||||
|
||||
app_tallyday_end:
|
||||
path: /user/tallyday/end/{istelework}/{ispenaltypassive}/{ispenaltyactive}
|
||||
path: /user/tallyday/end
|
||||
defaults: { _controller: App\Controller\TallydayController:end }
|
||||
|
||||
app_tallyday_userlist:
|
||||
|
|
|
@ -107,13 +107,6 @@ class RestController extends AbstractFOSRestController
|
|||
* description="User APIKey",
|
||||
* type="string"
|
||||
* )
|
||||
* @SWG\Parameter(
|
||||
* name="type",
|
||||
* in="formData",
|
||||
* required=false,
|
||||
* description="Type of time = null | istelework | ispenaltypassive | ispenaltyactive",
|
||||
* type="string"
|
||||
* )
|
||||
*/
|
||||
|
||||
|
||||
|
@ -127,7 +120,6 @@ class RestController extends AbstractFOSRestController
|
|||
|
||||
// Récupération des parametres
|
||||
$key=$request->get("key");
|
||||
$type=$request->get("type");
|
||||
|
||||
// Rechercher l'utilisateur associé à la clé
|
||||
$user = $em->getRepository("App:User")->findOneBy(["apikey"=>$key]);
|
||||
|
@ -135,13 +127,6 @@ class RestController extends AbstractFOSRestController
|
|||
$view = $this->view("API Key inconnue", 403);
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
// Tester le type
|
||||
if($type!=null && $type!="istelework" && $type!="ispenaltypassive" && $type!="ispenaltyactive") {
|
||||
$view = $this->view("Type inconnu", 403);
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
$datenow=new \DateTime("now");
|
||||
$datenow->setTime ( $datenow->format("H"), $datenow->format("i"), 0 );
|
||||
|
||||
|
@ -161,9 +146,6 @@ class RestController extends AbstractFOSRestController
|
|||
$data->setValidateuser(false);
|
||||
$data->setValidatemaster(false);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework(($type=="istelework"));
|
||||
$data->setIspenaltyactive(($type=="ispenaltyactive"));
|
||||
$data->setIspenaltypassive(($type=="ispenaltypassive"));
|
||||
$data->setDatestart($datenow);
|
||||
$status="started";
|
||||
}
|
||||
|
@ -171,9 +153,6 @@ class RestController extends AbstractFOSRestController
|
|||
// Sinon c'est que l'on ferme un creneau
|
||||
elseif($data) {
|
||||
$data->setDateend($datenow);
|
||||
$data->setIstelework(($type=="istelework"));
|
||||
$data->setIspenaltyactive(($type=="ispenaltyactive"));
|
||||
$data->setIspenaltypassive(($type=="ispenaltypassive"));
|
||||
$status="stopped";
|
||||
}
|
||||
|
||||
|
@ -232,13 +211,6 @@ class RestController extends AbstractFOSRestController
|
|||
* description="User APIKey",
|
||||
* type="string"
|
||||
* )
|
||||
* @SWG\Parameter(
|
||||
* name="type",
|
||||
* in="formData",
|
||||
* required=false,
|
||||
* description="Type of time = null | istelework | ispenaltypassive | ispenaltyactive",
|
||||
* type="string"
|
||||
* )
|
||||
*/
|
||||
|
||||
|
||||
|
@ -252,7 +224,6 @@ class RestController extends AbstractFOSRestController
|
|||
|
||||
// Récupération des parametres
|
||||
$key=$request->get("key");
|
||||
$type=$request->get("type");
|
||||
|
||||
// Rechercher l'utilisateur associé à la clé
|
||||
$user = $em->getRepository("App:User")->findOneBy(["apikey"=>$key]);
|
||||
|
@ -260,13 +231,6 @@ class RestController extends AbstractFOSRestController
|
|||
$view = $this->view("API Key inconnue", 403);
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
// Tester le type
|
||||
if($type!=null && $type!="istelework" && $type!="ispenaltypassive" && $type!="ispenaltyactive") {
|
||||
$view = $this->view("Type inconnu", 403);
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
$datenow=new \DateTime("now");
|
||||
$datenow->setTime ( $datenow->format("H"), $datenow->format("i"), 0 );
|
||||
|
||||
|
@ -286,9 +250,6 @@ class RestController extends AbstractFOSRestController
|
|||
$data->setValidateuser(false);
|
||||
$data->setValidatemaster(false);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework(($type=="istelework"));
|
||||
$data->setIspenaltyactive(($type=="ispenaltyactive"));
|
||||
$data->setIspenaltypassive(($type=="ispenaltypassive"));
|
||||
$data->setDatestart($datenow);
|
||||
}
|
||||
|
||||
|
@ -348,13 +309,6 @@ class RestController extends AbstractFOSRestController
|
|||
* description="User APIKey",
|
||||
* type="string"
|
||||
* )
|
||||
* @SWG\Parameter(
|
||||
* name="type",
|
||||
* in="formData",
|
||||
* required=false,
|
||||
* description="Type of time = null | istelework | ispenaltypassive | ispenaltyactive",
|
||||
* type="string"
|
||||
* )
|
||||
*/
|
||||
|
||||
|
||||
|
@ -368,7 +322,6 @@ class RestController extends AbstractFOSRestController
|
|||
|
||||
// Récupération des parametres
|
||||
$key=$request->get("key");
|
||||
$type=$request->get("type");
|
||||
|
||||
// Rechercher l'utilisateur associé à la clé
|
||||
$user = $em->getRepository("App:User")->findOneBy(["apikey"=>$key]);
|
||||
|
@ -376,13 +329,6 @@ class RestController extends AbstractFOSRestController
|
|||
$view = $this->view("API Key inconnue", 403);
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
// Tester le type
|
||||
if($type!=null && $type!="istelework" && $type!="ispenaltypassive" && $type!="ispenaltyactive") {
|
||||
$view = $this->view("Type inconnu", 403);
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
$datenow=new \DateTime("now");
|
||||
$datenow->setTime ( $datenow->format("H"), $datenow->format("i"), 0 );
|
||||
|
||||
|
@ -403,9 +349,6 @@ class RestController extends AbstractFOSRestController
|
|||
// Sinon c'est que l'on ferme un creneau
|
||||
elseif($data) {
|
||||
$data->setDateend($datenow);
|
||||
$data->setIstelework(($type=="istelework"));
|
||||
$data->setIspenaltyactive(($type=="ispenaltyactive"));
|
||||
$data->setIspenaltypassive(($type=="ispenaltypassive"));
|
||||
}
|
||||
|
||||
// Sinon pas normal
|
||||
|
@ -480,14 +423,6 @@ class RestController extends AbstractFOSRestController
|
|||
* description="Date end format YYYY-MM-DD H:I",
|
||||
* type="string"
|
||||
* )
|
||||
*
|
||||
* @SWG\Parameter(
|
||||
* name="type",
|
||||
* in="formData",
|
||||
* required=false,
|
||||
* description="Type of time = null | istelework | ispenaltypassive | ispenaltyactive",
|
||||
* type="string"
|
||||
* )
|
||||
*/
|
||||
|
||||
public function addtimer(Request $request) {
|
||||
|
@ -502,7 +437,6 @@ class RestController extends AbstractFOSRestController
|
|||
$start=new \DateTime($request->get("start"));
|
||||
$end=$request->get("end");
|
||||
if(!is_null($end)) $end=new \DateTime($end);
|
||||
$type=$request->get("type");
|
||||
|
||||
// Rechercher l'utilisateur associé à la clé
|
||||
$user = $em->getRepository("App:User")->findOneBy(["apikey"=>$key]);
|
||||
|
@ -511,14 +445,6 @@ class RestController extends AbstractFOSRestController
|
|||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
|
||||
// Tester le type
|
||||
if($type!=null && $type!="istelework" && $type!="ispenaltypassive" && $type!="ispenaltyactive") {
|
||||
$view = $this->view("Type inconnu", 403);
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
// Controler la validité des timers
|
||||
if(!$em->getRepository("App:Tallyday")->ctrlTallyday($user,$start)) {
|
||||
$view = $this->view("Impossible d'entamer une journée sans avoir terminé les jours précédents", 404);
|
||||
return $this->handleView($view);
|
||||
|
@ -533,9 +459,6 @@ class RestController extends AbstractFOSRestController
|
|||
$data->setValidateuser(false);
|
||||
$data->setValidatemaster(false);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework(($type=="istelework"));
|
||||
$data->setIspenaltyactive(($type=="ispenaltyactive"));
|
||||
$data->setIspenaltypassive(($type=="ispenaltypassive"));
|
||||
$data->setDatestart($start);
|
||||
$data->setDateend($end);
|
||||
|
||||
|
@ -746,9 +669,6 @@ class RestController extends AbstractFOSRestController
|
|||
$data->setValidateuser(true);
|
||||
$data->setValidatemaster(false);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework(false);
|
||||
$data->setIspenaltyactive(false);
|
||||
$data->setIspenaltypassive(false);
|
||||
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
@ -942,11 +862,7 @@ class RestController extends AbstractFOSRestController
|
|||
foreach($datas as $data) {
|
||||
$isvalideuser=$data->getValidateuser();
|
||||
$isvalidemaster=$data->getValidatemaster();
|
||||
$type="";
|
||||
if($data->getIstelework()) $type="istelework";
|
||||
if($data->getIspenaltypassive()) $type="ispenaltypassive";
|
||||
if($data->getIspenaltyactive()) $type="ispenaltyactive";
|
||||
array_push($timers,["start"=>$data->getDatestart(),"end"=>$data->getDateend(),"type"=>$type]);
|
||||
array_push($timers,["start"=>$data->getDatestart(),"end"=>$data->getDateend()]);
|
||||
$e->add($data->getTimeday());
|
||||
}
|
||||
$interval = $f->diff($e);
|
||||
|
|
|
@ -298,9 +298,6 @@ class TallydayController extends AbstractController
|
|||
$data->setValidateuser(false);
|
||||
$data->setValidatemaster(false);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework(false);
|
||||
$data->setIspenaltyactive(false);
|
||||
$data->setIspenaltypassive(false);
|
||||
|
||||
// Création du formulaire
|
||||
$form = $this->createForm(Form::class,$data);
|
||||
|
@ -520,9 +517,6 @@ class TallydayController extends AbstractController
|
|||
$data->setValidateuser(true);
|
||||
$data->setValidatemaster(false);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework(false);
|
||||
$data->setIspenaltyactive(false);
|
||||
$data->setIspenaltypassive(false);
|
||||
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
@ -573,9 +567,6 @@ class TallydayController extends AbstractController
|
|||
$data->setValidateuser(false);
|
||||
$data->setValidatemaster(true);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework(false);
|
||||
$data->setIspenaltyactive(false);
|
||||
$data->setIspenaltypassive(false);
|
||||
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
@ -718,9 +709,6 @@ class TallydayController extends AbstractController
|
|||
"avatar"=>$user->getAvatar(),
|
||||
"displayname"=>$user->getDisplayname(),
|
||||
"timemonth"=>"00:00",
|
||||
"timetelework"=>"00:00",
|
||||
"timepenaltypassive"=>"00:00",
|
||||
"timepenaltyactive"=>"00:00",
|
||||
"validates"=>[],
|
||||
];
|
||||
|
||||
|
@ -737,15 +725,6 @@ class TallydayController extends AbstractController
|
|||
$emonth = new \DateTime('00:00');
|
||||
$fmonth = clone $emonth;
|
||||
|
||||
$eteleworkmonth = new \DateTime('00:00');
|
||||
$fteleworkmonth = clone $eteleworkmonth;
|
||||
|
||||
$epenaltypassivemonth = new \DateTime('00:00');
|
||||
$fpenaltypassivemonth = clone $epenaltypassivemonth;
|
||||
|
||||
$epenaltyactivemonth = new \DateTime('00:00');
|
||||
$fpenaltyactivemonth = clone $epenaltyactivemonth;
|
||||
|
||||
while($datenow<=$dateend) {
|
||||
$eday = new \DateTime('00:00');
|
||||
$fday = clone $eday;
|
||||
|
@ -754,15 +733,6 @@ class TallydayController extends AbstractController
|
|||
foreach($datas as $data) {
|
||||
$emonth->add($data->getTimeday());
|
||||
$eday->add($data->getTimeday());
|
||||
|
||||
if($data->getIstelework())
|
||||
$eteleworkmonth->add($data->getTimeday());
|
||||
|
||||
if($data->getIspenaltypassive())
|
||||
$epenaltypassivemonth->add($data->getTimeday());
|
||||
|
||||
if($data->getIspenaltyactive())
|
||||
$epenaltyactivemonth->add($data->getTimeday());
|
||||
}
|
||||
|
||||
$interval = $fday->diff($eday);
|
||||
|
@ -780,18 +750,6 @@ class TallydayController extends AbstractController
|
|||
$interval = $fmonth->diff($emonth);
|
||||
$timemonth = (($interval->days*24) + $interval->h).":".sprintf("%02s",$interval->i);
|
||||
$dates[$user->getId()]["timemonth"]=$timemonth;
|
||||
|
||||
$interval = $fteleworkmonth->diff($eteleworkmonth);
|
||||
$timemonth = (($interval->days*24) + $interval->h).":".sprintf("%02s",$interval->i);
|
||||
$dates[$user->getId()]["timetelework"]=$timemonth;
|
||||
|
||||
$interval = $fpenaltypassivemonth->diff($epenaltypassivemonth);
|
||||
$timemonth = (($interval->days*24) + $interval->h).":".sprintf("%02s",$interval->i);
|
||||
$dates[$user->getId()]["timepenaltypassive"]=$timemonth;
|
||||
|
||||
$interval = $fpenaltyactivemonth->diff($epenaltyactivemonth);
|
||||
$timemonth = (($interval->days*24) + $interval->h).":".sprintf("%02s",$interval->i);
|
||||
$dates[$user->getId()]["timepenaltyactive"]=$timemonth;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -821,6 +779,7 @@ class TallydayController extends AbstractController
|
|||
$appAlias=$this->getParameter("appAlias");
|
||||
|
||||
$render=str_replace("/$appAlias/","https://$appWeburl/$appAlias/",$render);
|
||||
//dump($render);
|
||||
|
||||
$this->knpSnappy->generateFromHtml($render,$fileloc);
|
||||
return $this->file($fileloc);
|
||||
|
@ -880,7 +839,7 @@ class TallydayController extends AbstractController
|
|||
return $response;
|
||||
}
|
||||
|
||||
public function start(bool $istelework,bool $ispenaltypassive,bool $ispenaltyactive) {
|
||||
public function start() {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$datenow=new \DateTime("now");
|
||||
|
@ -897,10 +856,6 @@ class TallydayController extends AbstractController
|
|||
$data->setValidateuser(false);
|
||||
$data->setValidatemaster(false);
|
||||
$data->setIsbreakday(false);
|
||||
$data->setIstelework($istelework);
|
||||
$data->setIspenaltyactive($ispenaltyactive);
|
||||
$data->setIspenaltypassive($ispenaltypassive);
|
||||
|
||||
$data->setDatestart($datenow);
|
||||
}
|
||||
|
||||
|
@ -916,7 +871,7 @@ class TallydayController extends AbstractController
|
|||
|
||||
}
|
||||
|
||||
public function end(bool $istelework,bool $ispenaltypassive,bool $ispenaltyactive) {
|
||||
public function end() {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
// On recherche le dernier pointage de la journée
|
||||
|
@ -943,10 +898,6 @@ class TallydayController extends AbstractController
|
|||
}
|
||||
|
||||
$data->setDateend($datenow);
|
||||
$data->setIstelework($istelework);
|
||||
$data->setIspenaltyactive($ispenaltyactive);
|
||||
$data->setIspenaltypassive($ispenaltypassive);
|
||||
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
||||
|
@ -1014,7 +965,7 @@ class TallydayController extends AbstractController
|
|||
|
||||
protected function getErrorForm($id,$form,$request,$data,$mode) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
if(!$em->getRepository("App:Tallyday")->ctrlTallyday($data->getUser(),$data->getDateof()))
|
||||
if(!$em->getRepository("App:Tallyday")->ctrlTallyday($data->getUser(),$data->getDateof()));
|
||||
$form->addError(new FormError("Impossible d'entamer une journée sans avoir terminé les jours précédents"));
|
||||
|
||||
if ($form->get('submit')->isClicked()) {
|
||||
|
|
|
@ -52,21 +52,6 @@ class Tallyday
|
|||
*/
|
||||
private $isbreakday;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $istelework;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $ispenaltypassive;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $ispenaltyactive;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=true)
|
||||
*/
|
||||
|
@ -196,42 +181,6 @@ class Tallyday
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getIstelework(): ?bool
|
||||
{
|
||||
return $this->istelework;
|
||||
}
|
||||
|
||||
public function setIstelework(bool $istelework): self
|
||||
{
|
||||
$this->istelework = $istelework;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIspenaltypassive(): ?bool
|
||||
{
|
||||
return $this->ispenaltypassive;
|
||||
}
|
||||
|
||||
public function setIspenaltypassive(bool $ispenaltypassive): self
|
||||
{
|
||||
$this->ispenaltypassive = $ispenaltypassive;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIspenaltyactive(): ?bool
|
||||
{
|
||||
return $this->ispenaltyactive;
|
||||
}
|
||||
|
||||
public function setIspenaltyactive(bool $ispenaltyactive): self
|
||||
{
|
||||
$this->ispenaltyactive = $ispenaltyactive;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -52,30 +52,6 @@ class TallydayType extends AbstractType
|
|||
"attr" => ["class"=>"timepicker"],
|
||||
]
|
||||
);
|
||||
|
||||
$choices=["non" => "0","oui" => "1"];
|
||||
$builder->add("istelework",
|
||||
ChoiceType::class,[
|
||||
"label" =>"En Télétravail ?",
|
||||
"choices" => $choices
|
||||
]
|
||||
);
|
||||
|
||||
$choices=["non" => "0","oui" => "1"];
|
||||
$builder->add("ispenaltypassive",
|
||||
ChoiceType::class,[
|
||||
"label" =>"En Astreinte passive ?",
|
||||
"choices" => $choices
|
||||
]
|
||||
);
|
||||
|
||||
$choices=["non" => "0","oui" => "1"];
|
||||
$builder->add("ispenaltyactive",
|
||||
ChoiceType::class,[
|
||||
"label" =>"En Astreinte active ?",
|
||||
"choices" => $choices
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
|
|
|
@ -81,26 +81,18 @@
|
|||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#tallyday_istelework").change(function(){
|
||||
if($("#tallyday_istelework").val()==1) {
|
||||
$("#tallyday_ispenaltypassive").val(0);
|
||||
$("#tallyday_ispenaltyactive").val(0);
|
||||
}
|
||||
});
|
||||
|
||||
$("#tallyday_ispenaltypassive").change(function(){
|
||||
if($("#tallyday_ispenaltypassive").val()==1) {
|
||||
$("#tallyday_istelework").val(0);
|
||||
$("#tallyday_ispenaltyactive").val(0);
|
||||
}
|
||||
});
|
||||
|
||||
$("#tallyday_ispenaltyactive").change(function(){
|
||||
if($("#tallyday_ispenaltyactive").val()==1) {
|
||||
$("#tallyday_ispenaltypassive").val(0);
|
||||
$("#tallyday_istelework").val(0);
|
||||
}
|
||||
/*
|
||||
$('.timepicker').timepicki({
|
||||
show_meridian:false,
|
||||
min_hour_value:0,
|
||||
max_hour_value:23,
|
||||
step_size_minutes:5,
|
||||
overflow_minutes:true,
|
||||
increase_direction:'up',
|
||||
disable_keyboard_mobile: true,
|
||||
reset: true
|
||||
});
|
||||
*/
|
||||
|
||||
$('.timepicker').timepicker({
|
||||
timeFormat: 'HH:mm',
|
||||
|
|
|
@ -6,7 +6,7 @@ th, td {
|
|||
color: #ffffff;
|
||||
background-color: #37474F;
|
||||
text-align: center;
|
||||
width: 115px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
td {
|
||||
|
@ -44,7 +44,7 @@ td {
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="mt-3" style="margin:auto; max-width:2035px;">
|
||||
<div class="mt-3" style="margin:auto; max-width:1800px;">
|
||||
{% for date in dates %}
|
||||
{% if date.validates or date.notvalidates %}
|
||||
<div class="card mr-1 mb-1 float-left">
|
||||
|
@ -93,16 +93,6 @@ td {
|
|||
{% else %}
|
||||
{%if tallyday.datestart %} de {{tallyday.datestart|date("H:i") }} {% endif %}
|
||||
{%if tallyday.dateend %} à {{tallyday.dateend|date("H:i") }} {% endif %}
|
||||
|
||||
{% if tallyday.istelework %}
|
||||
<i class="fas fa-home" title="Télétravail"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltypassive %}
|
||||
<i class="fas fa-glasses" title="Astreinte Passive"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltyactive %}
|
||||
<i class="fas fa-fire" title="Astreinte Active"></i>
|
||||
{% endif %}
|
||||
{%endif%}
|
||||
<br>
|
||||
{% endfor %}
|
||||
|
@ -147,15 +137,6 @@ td {
|
|||
<a href="{{path("app_tallyday_masterupdate",{id:tallyday.id})}}">
|
||||
{%if tallyday.datestart %} de {{tallyday.datestart|date("H:i") }} {% endif %}
|
||||
{%if tallyday.dateend %} à {{tallyday.dateend|date("H:i") }} {% endif %}
|
||||
{% if tallyday.istelework %}
|
||||
<i class="fas fa-home" title="Télétravail"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltypassive %}
|
||||
<i class="fas fa-glasses" title="Astreinte Passive"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltyactive %}
|
||||
<i class="fas fa-fire" title="Astreinte Active"></i>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<br>
|
||||
|
|
|
@ -6,7 +6,7 @@ th, td {
|
|||
color: #ffffff;
|
||||
background-color: #37474F;
|
||||
text-align: center;
|
||||
width: {% if fgprint %}135px{%else%}115px{%endif%};
|
||||
width: {% if fgprint %}120px{%else%}100px{%endif%};
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ td {
|
|||
{% endif %}
|
||||
|
||||
|
||||
<div class="mt-3" style="margin:auto; max-width:1810px;">
|
||||
<div class="mt-3" style="margin:auto; max-width:1800px;">
|
||||
{% set nbusers=0 %}
|
||||
{% for date in dates %}
|
||||
{% if date.validates %}
|
||||
|
@ -70,7 +70,7 @@ td {
|
|||
<div class="card mr-1 mb-1 float-left {% if nbusers==2 %}breakpage{% endif %} ">
|
||||
<div class="card-header">
|
||||
<img src="{{date.avatar|urlavatar}}" class="avatar"> {{ date.displayname }}
|
||||
<div class="float-right text-right">
|
||||
<div class="float-right">
|
||||
{{date.timemonth}} / {{ timetowork }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -123,17 +123,6 @@ td {
|
|||
{% else %}
|
||||
{%if tallyday.datestart %} de {{tallyday.datestart|date("H:i") }} {% endif %}
|
||||
{%if tallyday.dateend %} à {{tallyday.dateend|date("H:i") }} {% endif %}
|
||||
|
||||
|
||||
{% if tallyday.istelework %}
|
||||
<i class="fas fa-home" title="Télétravail"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltypassive %}
|
||||
<i class="fas fa-glasses" title="Astreinte Passive"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltyactive %}
|
||||
<i class="fas fa-fire" title="Astreinte Active"></i>
|
||||
{% endif %}
|
||||
{%endif%}
|
||||
<br>
|
||||
{% endfor %}
|
||||
|
@ -150,27 +139,6 @@ td {
|
|||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{%if date.timetelework!="0:00" or date.timepenaltypassive!="0:00" or date.timepenaltyactive!="0:00" %}
|
||||
<div class="mt-3" style="font-family:var(--fontbody)">
|
||||
<table><tr>
|
||||
{% endif %}
|
||||
{%if date.timetelework!="0:00"%}
|
||||
<td class="p-2" ><i class="fas fa-home fa-2x"></i><br>Télétravail<br>{{date.timetelework}}</td>
|
||||
{%endif%}
|
||||
|
||||
{%if date.timepenaltypassive!="0:00"%}
|
||||
<td class="p-2"><i class="fas fa-glasses fa-2x"></i><br>Astreinte Passive<br>{{date.timepenaltypassive}}</td>
|
||||
{%endif%}
|
||||
|
||||
{%if date.timepenaltyactive!="0:00"%}
|
||||
<td class="p-2"><i class="fas fa-fire fa-2x"></i><br>Astreinte Active<br>{{date.timepenaltyactive}}</td>
|
||||
{%endif%}
|
||||
|
||||
{%if date.timetelework!="0:00" or date.timepenaltypassive!="0:00" or date.timepenaltyactive!="0:00" %}
|
||||
</tr></table></div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
font-size: 40px;
|
||||
text-align: center;
|
||||
line-height:30px;
|
||||
width:300px;
|
||||
width:250px;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.clock small {
|
||||
|
@ -27,11 +27,11 @@
|
|||
}
|
||||
|
||||
.alert {
|
||||
width:300px;
|
||||
width:250px;
|
||||
}
|
||||
|
||||
.tallydaydetail {
|
||||
width:300px;
|
||||
width:250px;
|
||||
text-align: left;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
@ -61,10 +61,12 @@
|
|||
|
||||
{% if not tallydays or not tallydays|last.dateend is null %}
|
||||
{% if not isvalideuser and not isvalidemaster %}
|
||||
<bouton id="btnstart" class="btn btn-success" style="font-size:220%; width:300px;">Début Pointage</bouton>
|
||||
<a href="{{path("app_tallyday_start")}}" class="btn btn-success" style="font-size:150%; width:250px;">Début Pointage</a>
|
||||
{% endif %}
|
||||
{% elseif not isvalideuser and not isvalidemaster %}
|
||||
<bouton id="btnend" class="btn btn-success" style="font-size:220%; width:300px;">Fin Pointage</bouton>
|
||||
|
||||
<a href="{{path("app_tallyday_end")}}" class="btn btn-success" style="font-size:150%; width:250px;">Fin Pointage</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="tallydaydetail">
|
||||
|
@ -74,24 +76,16 @@
|
|||
<th>Début</th>
|
||||
<th>Fin</th>
|
||||
<th>Temps</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% set isvalideuser=false %}
|
||||
{% set isvalidemaster=false %}
|
||||
{% set istelework=false %}
|
||||
{% set ispenaltypassive=false %}
|
||||
{% set ispenaltyactive=false %}
|
||||
|
||||
{% for tallyday in tallydays %}
|
||||
{% set isvalideuser=tallyday.validateuser %}
|
||||
{% set isvalidemaster=tallyday.validatemaster %}
|
||||
{% set istelework=tallyday.istelework %}
|
||||
{% set ispenaltypassive=tallyday.ispenaltypassive %}
|
||||
{% set ispenaltyactive=tallyday.ispenaltyactive %}
|
||||
|
||||
{% if tallyday.datestart %}
|
||||
<tr>
|
||||
{% if tallyday.isbreakday %}
|
||||
|
@ -109,17 +103,6 @@
|
|||
</td>
|
||||
{% endif %}
|
||||
<td>{{tallyday.timedayformatted}}</td>
|
||||
<td>
|
||||
{% if tallyday.istelework %}
|
||||
<i class="fas fa-home" title="Télétravail"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltypassive %}
|
||||
<i class="fas fa-glasses" title="Astreinte Passive"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltyactive %}
|
||||
<i class="fas fa-fire" title="Astreinte Active"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -139,23 +122,6 @@
|
|||
</div>
|
||||
|
||||
{% if not isvalideuser and not isvalidemaster %}
|
||||
<div style="width:380px; text-align:left">
|
||||
<div class="custom-control custom-switch" style="zoom:130%">
|
||||
<input type="checkbox" class="custom-control-input" id="istelework" {%if istelework%}checked{%endif%}>
|
||||
<label class="custom-control-label" for="istelework">Télétravail</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch" style="zoom:130%">
|
||||
<input type="checkbox" class="custom-control-input" id="ispenaltypassive" {%if ispenaltypassive%}checked{%endif%}>
|
||||
<label class="custom-control-label" for="ispenaltypassive">Astreinte Passive</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch" style="zoom:130%">
|
||||
<input type="checkbox" class="custom-control-input" id="ispenaltyactive" {%if ispenaltyactive%}checked{%endif%}>
|
||||
<label class="custom-control-label" for="ispenaltyactive">Astreinte Active</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{path("app_tallyday_uservalidate",{dateof:"now"|date("Y-m-d")})}}" class="btn btn-danger mt-3" style="width:380px" data-method="confirm" data-confirm="Êtes-vous sûr de vouloir valider votre journée ?">Valider ma journée</a>
|
||||
<br>
|
||||
{% endif %}
|
||||
|
@ -169,7 +135,7 @@
|
|||
{% if is_granted('ROLE_MASTER') %}
|
||||
<hr class="mt-5" style="width: 300px; background-color:var(--colorbgbodylight);">
|
||||
<h3>GESTION</h3>
|
||||
<a href="{{path("app_tallyday_masterlist")}}" class="btn btn-success mt-3 mb-3" style="width:380px">Gestion des Pointages</a>
|
||||
<a href="{{path("app_tallyday_masterlist")}}" class="btn btn-success mt-3" style="width:380px">Gestion des Pointages</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -183,59 +149,6 @@
|
|||
var nextrecalcul=new Date();
|
||||
var firstrecalcul=true;
|
||||
|
||||
$('#istelework').change(function() {
|
||||
if($("#istelework").is(":checked")) {
|
||||
$("#ispenaltyactive").prop("checked",false);
|
||||
$("#ispenaltypassive").prop("checked",false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#ispenaltypassive').change(function() {
|
||||
if($("#ispenaltypassive").is(":checked")) {
|
||||
$("#istelework").prop("checked",false);
|
||||
$("#ispenaltyactive").prop("checked",false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#ispenaltyactive').change(function() {
|
||||
if($("#ispenaltyactive").is(":checked")) {
|
||||
$("#istelework").prop("checked",false);
|
||||
$("#ispenaltypassive").prop("checked",false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnstart").click(function() {
|
||||
istelework=0;
|
||||
ispenaltypassive=0;
|
||||
ispenaltyactive=0;
|
||||
|
||||
if($("#istelework").is(":checked")) istelework=1;
|
||||
if($("#ispenaltypassive").is(":checked")) ispenaltypassive=1;
|
||||
if($("#ispenaltyactive").is(":checked")) ispenaltyactive=1;
|
||||
|
||||
url="{{ path("app_tallyday_start",{istelework:'xxx',ispenaltypassive:'yyy',ispenaltyactive:'zzz'}) }}";
|
||||
url=url.replace('xxx',istelework);
|
||||
url=url.replace('yyy',ispenaltypassive);
|
||||
url=url.replace('zzz',ispenaltyactive);
|
||||
document.location.href=url;
|
||||
});
|
||||
|
||||
$("#btnend").click(function() {
|
||||
istelework=0;
|
||||
ispenaltypassive=0;
|
||||
ispenaltyactive=0;
|
||||
|
||||
if($("#istelework").is(":checked")) istelework=1;
|
||||
if($("#ispenaltypassive").is(":checked")) ispenaltypassive=1;
|
||||
if($("#ispenaltyactive").is(":checked")) ispenaltyactive=1;
|
||||
|
||||
url="{{ path("app_tallyday_end",{istelework:'xxx',ispenaltypassive:'yyy',ispenaltyactive:'zzz'}) }}";
|
||||
url=url.replace('xxx',istelework);
|
||||
url=url.replace('yyy',ispenaltypassive);
|
||||
url=url.replace('zzz',ispenaltyactive);
|
||||
document.location.href=url;
|
||||
});
|
||||
|
||||
function showTime(){
|
||||
// to get current time/ date.
|
||||
var date = new Date();
|
||||
|
|
|
@ -87,17 +87,6 @@
|
|||
{%endif%}
|
||||
{% endif %}
|
||||
= {{tallyday.timedayformatted}}
|
||||
|
||||
{% if tallyday.istelework %}
|
||||
<i class="fas fa-home" title="Télétravail"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltypassive %}
|
||||
<i class="fas fa-glasses" title="Astreinte Passive"></i>
|
||||
{% endif %}
|
||||
{% if tallyday.ispenaltyactive %}
|
||||
<i class="fas fa-fire" title="Astreinte Active"></i>
|
||||
{% endif %}
|
||||
|
||||
<br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue