Compare commits
9 Commits
pkg/stable
...
master
Author | SHA1 | Date | |
---|---|---|---|
a3f54b2f11 | |||
386d639151 | |||
a2899ee93b | |||
efe978130c | |||
9c752523b4 | |||
|
43c1b6f5ce | ||
|
bfedc2f593 | ||
|
f1baf4d87e | ||
|
57220794b9 |
1
debian/compat
vendored
1
debian/compat
vendored
@@ -1 +0,0 @@
|
||||
7
|
24
debian/control
vendored
24
debian/control
vendored
@@ -1,24 +0,0 @@
|
||||
Source: eole-schedule
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Cadoles <contact@cadoles.com>
|
||||
Build-Depends: debhelper (>= 7.0.50)
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: https://forge.cadoles.com/Cadoles/schedule
|
||||
Vcs-Git: https://forge.cadoles.com/Cadoles/schedule
|
||||
Vcs-Browser: https://forge.cadoles.com/Cadoles/schedule
|
||||
|
||||
Package: schedule-sso
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, eole-sso
|
||||
Description: Filtre SSO pour schedule "EOLE".
|
||||
|
||||
Package: eole-schedule
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, eole-envole-dependances, schedule-sso
|
||||
Description: Eolisation de l'application schedule.
|
||||
|
||||
Package: schedule-apps
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, envole-dependances-apps
|
||||
Description: Sources pour schedule "EOLE".
|
44
debian/copyright
vendored
44
debian/copyright
vendored
@@ -1,44 +0,0 @@
|
||||
Format: http://dep.debian.net/deps/dep5
|
||||
Upstream-Name: {PROJECT}
|
||||
Source: {URL}
|
||||
|
||||
Files: *
|
||||
Copyright: YEAR {UPSTREAM} {AUTHOR} <{MAIL}>
|
||||
License: {UPSTREAM LICENSE}
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2012 Équipe EOLE <eole@ac-dijon.fr>
|
||||
License: CeCILL-2
|
||||
|
||||
License: {UPSTREAM LICENSE}
|
||||
{TEXT OF THE LICENSE}
|
||||
|
||||
License: CeCILL-2
|
||||
This software is governed by the CeCILL-2 license under French law and
|
||||
abiding by the rules of distribution of free software. You can use,
|
||||
modify and or redistribute the software under the terms of the CeCILL-2
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info";.
|
||||
.
|
||||
As a counterpart to the access to the source code and rights to copy,
|
||||
modify and redistribute granted by the license, users are provided only
|
||||
with a limited warranty and the software's author, the holder of the
|
||||
economic rights, and the successive licensors have only limited
|
||||
liability.
|
||||
.
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL-2 license and that you accept its terms.
|
||||
.
|
||||
On Eole systems, the complete text of the CeCILL-2 License can be found
|
||||
in '/usr/share/common-licenses/CeCILL-2-en'.
|
1
debian/eole-schedule.install
vendored
1
debian/eole-schedule.install
vendored
@@ -1 +0,0 @@
|
||||
usr/share/eole
|
3
debian/gbp.conf
vendored
3
debian/gbp.conf
vendored
@@ -1,3 +0,0 @@
|
||||
# Set per distribution debian tag
|
||||
[DEFAULT]
|
||||
debian-tag = debian/envole/%(version)s
|
8
debian/rules
vendored
8
debian/rules
vendored
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@
|
1
debian/schedule-apps.install
vendored
1
debian/schedule-apps.install
vendored
@@ -1 +0,0 @@
|
||||
var/www/html
|
1
debian/schedule-sso.install
vendored
1
debian/schedule-sso.install
vendored
@@ -1 +0,0 @@
|
||||
usr/share/sso
|
1
debian/source/format
vendored
1
debian/source/format
vendored
@@ -1 +0,0 @@
|
||||
3.0 (native)
|
@@ -6,7 +6,9 @@
|
||||
|
||||
<containers>
|
||||
<container name='web'>
|
||||
<package>schedule-apps</package>
|
||||
<!--
|
||||
<package>schedule-apps</package>
|
||||
-->
|
||||
|
||||
<!-- service de configuration apache -->
|
||||
<service method="apache" servicelist="schedule">schedule</service>
|
||||
|
@@ -51,7 +51,10 @@
|
||||
"preferred-install": {
|
||||
"*": "dist"
|
||||
},
|
||||
"sort-packages": true
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"symfony/flex": true
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -72,6 +75,9 @@
|
||||
"symfony/polyfill-php56": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"pre-install-cmd": [
|
||||
"php scripts/checkcomposer.php"
|
||||
],
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd",
|
||||
"cache:clear --env=prod": "symfony-cmd",
|
||||
|
13
src/schedule-2.0/scripts/checkcomposer.php
Normal file
13
src/schedule-2.0/scripts/checkcomposer.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$requiredVersion = 'version 1'; // La version interdite
|
||||
|
||||
$composerVersion = trim(shell_exec('COMPOSER_ALLOW_SUPERUSER=1 composer --version --no-ansi'));
|
||||
echo $composerVersion."\n";
|
||||
|
||||
if (stripos($composerVersion,$requiredVersion)===false ) {
|
||||
echo "La version de Composer $requiredVersion n'est pas autorisée" . PHP_EOL;
|
||||
echo "Veuillez mettre à jour Composer avec 'composer self-update --1'." . PHP_EOL;
|
||||
echo "Ou executez le scripts/reconfigure.sh" . PHP_EOL;
|
||||
exit(1); // Quitte avec un code d'erreur
|
||||
}
|
@@ -6,12 +6,13 @@ cd /var/www/html/schedule
|
||||
. scripts/proxy.sh
|
||||
|
||||
# Mise en place du fichier d'environnement model
|
||||
if [ ! -f /var/www/html/schedule/.env ]; then
|
||||
mv /var/www/html/schedule/scripts/.env.model /var/www/html/schedule/.env
|
||||
fi
|
||||
yes 2>/dev/null | cp /var/www/html/schedule/scripts/.env.model $DIR/.env
|
||||
|
||||
# Installation des dépendances composer
|
||||
composer install
|
||||
echo COMPOSER = Install
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
composer self-update --1 --quiet
|
||||
composer install --quiet
|
||||
|
||||
php bin/console app:AppInit --env=prod
|
||||
php bin/console app:CronInit --env=prod
|
||||
|
@@ -174,7 +174,13 @@ class EventController extends AbstractController
|
||||
|
||||
// Astreinte
|
||||
if($astreinte) {
|
||||
// On regarde si une tache ne commence pas pendant une autre intervention ou qui se termine pendant une autre intervention ou qui a une intervention compris dans ses dates
|
||||
// Une astreinte ne peut-etre un congès
|
||||
if($task->getNature()->getIsvacation()) {
|
||||
$output=["return"=>"KO","error"=>"Une astreinte ne peut être de nature congès","start"=>$datestart,"end"=>$dateend,"events"=>null];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
// On regarde si une astreinte ne commence pas pendant une autre astreinte ou qui se termine pendant une autre astreinte ou qui a une astreinte compris dans ses dates
|
||||
$penaltys = $em->createQueryBuilder('penalty')
|
||||
->select('penalty')
|
||||
->from('App:Penalty','penalty')
|
||||
@@ -199,6 +205,42 @@ class EventController extends AbstractController
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
// On regarde si un évenement ne commence pas pendant un autre évenement ou qui se termine pendant un autre évenement ou qui a un évenement compris dans ses dates
|
||||
$events = $em->createQueryBuilder('event')
|
||||
->select('event')
|
||||
->from('App:Event','event')
|
||||
->Where('event.user=:user AND event.start<=:start AND event.end >:start')
|
||||
->orWhere('event.user=:user AND event.start<:end AND event.end >=:end')
|
||||
->orWhere('event.user=:user AND event.start>:start AND event.end <:end')
|
||||
->setParameter('user',$iduser)
|
||||
->setParameter('start',$datestart)
|
||||
->setParameter('end',$dateend)
|
||||
->getQuery()->getResult();
|
||||
if($events) {
|
||||
$tbevent=[];
|
||||
$validate=false;
|
||||
$holiday=false;
|
||||
foreach($events as $event) {
|
||||
$tmp=[
|
||||
"id" => $event->getId(),
|
||||
"start" => $event->getStart(),
|
||||
"end" => $event->getEnd(),
|
||||
];
|
||||
array_push($tbevent,$tmp);
|
||||
if($event->getValidate()) $validate=true;
|
||||
if($event->getTask()->getNature()->getIsvacation()) $holiday=true;
|
||||
}
|
||||
|
||||
if($validate) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a sa semaine de validé","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
elseif($holiday) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a posé des congés sur cette période","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
}
|
||||
|
||||
// Création de l'astreinte
|
||||
$penalty = new Penalty();
|
||||
$penalty->setStart($datestart);
|
||||
@@ -232,6 +274,8 @@ class EventController extends AbstractController
|
||||
->getQuery()->getResult();
|
||||
if($events) {
|
||||
$tbevent=[];
|
||||
$validate=false;
|
||||
$holiday=false;
|
||||
foreach($events as $event) {
|
||||
$tmp=[
|
||||
"id" => $event->getId(),
|
||||
@@ -239,9 +283,26 @@ class EventController extends AbstractController
|
||||
"end" => $event->getEnd(),
|
||||
];
|
||||
array_push($tbevent,$tmp);
|
||||
if($event->getValidate()) $validate=true;
|
||||
if($event->getTask()->getNature()->getIsvacation()) $holiday=true;
|
||||
}
|
||||
|
||||
if(!$this->isGranted('ROLE_ADMIN')&&!$this->isGranted('ROLE_MASTER')) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
elseif($validate) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a sa semaine de validé","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
elseif($holiday) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a posé des congés sur cette période","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
elseif($task->getNature()->getIsvacation()) {
|
||||
$output=["return"=>"KO","error"=>"Vous ne pouvez pas poser de congés à cette date, une intervention y est déjà plannifiée","start"=>$datestart,"end"=>$dateend,"events"=>null];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
// On regarde si un jour férié ne commence pas pendant une autre intervention ou qui se termine pendant une autre intervention ou qui a une intervention compris dans ses dates
|
||||
@@ -288,7 +349,7 @@ class EventController extends AbstractController
|
||||
$idevent=$event->getId();
|
||||
//$valid_url = $this->generateUrl('app_validationholiday',[],true);
|
||||
$valid_url = $this->router->generate('app_validationholiday', [], urlGeneratorInterface::ABSOLUTE_URL);
|
||||
$this->notificator->sendNotifAttenteValid("Congés en attente de validation", $iduser, $idevent, $valid_url);
|
||||
// $this->notificator->sendNotifAttenteValid("Congés en attente de validation", $iduser, $idevent, $valid_url);
|
||||
|
||||
}
|
||||
|
||||
@@ -328,6 +389,12 @@ class EventController extends AbstractController
|
||||
|
||||
// Astreinte
|
||||
if($fgastreinte) {
|
||||
// Une astreinte ne peut-etre un congès
|
||||
if($task->getNature()->getIsvacation()) {
|
||||
$output=["return"=>"KO","error"=>"Une astreinte ne peut être de nature congès"];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
// Recherche de l'event
|
||||
$penalty = $em->getRepository("App:Penalty")->find($idevent);
|
||||
if(!$penalty) {
|
||||
@@ -394,6 +461,7 @@ class EventController extends AbstractController
|
||||
$dateend->SetTime(17,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
// On regarde si une tache ne commence pas pendant une autre intervention ou qui se termine pendant une autre intervention ou qui a une intervention compris dans ses dates
|
||||
$events = $em->createQueryBuilder('event')
|
||||
->select('event')
|
||||
@@ -407,6 +475,9 @@ class EventController extends AbstractController
|
||||
->getQuery()->getResult();
|
||||
if($events) {
|
||||
$tbevent=[];
|
||||
$validate=false;
|
||||
$holiday=false;
|
||||
|
||||
foreach($events as $ev) {
|
||||
if ($event->getId() != $ev->getId()) {
|
||||
$tmp=[
|
||||
@@ -416,11 +487,28 @@ class EventController extends AbstractController
|
||||
"end" => $ev->getEnd(),
|
||||
];
|
||||
array_push($tbevent,$tmp);
|
||||
if($ev->getValidate()) $validate=true;
|
||||
if($ev->getTask()->getNature()->getIsvacation()) $holiday=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($tbevent)>0) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
if(!$this->isGranted('ROLE_ADMIN')&&!$this->isGranted('ROLE_MASTER')) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
elseif($validate) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a sa semaine de validé","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
elseif($holiday) {
|
||||
$output=["return"=>"KO","error"=>"Cet intervant a posé des congés sur cette période","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
elseif($task->getNature()->getIsvacation()) {
|
||||
$output=["return"=>"KO","error"=>"Vous ne pouvez pas poser de congés à cette date, une intervention y est déjà plannifiée","start"=>$datestart,"end"=>$dateend,"events"=>null];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -53,15 +53,7 @@ class ReportController extends AbstractController
|
||||
|
||||
$tmp["events"][$idday] = [
|
||||
"date"=>clone $start,
|
||||
"allday"=>false,
|
||||
"colorday"=>"",
|
||||
"descriptionday"=>"",
|
||||
"am"=>false,
|
||||
"coloram"=>"",
|
||||
"descriptionam"=>"",
|
||||
"ap"=>false,
|
||||
"colorap"=>"",
|
||||
"descriptionap"=>"",
|
||||
"events"=>[],
|
||||
"astreinte"=>false,
|
||||
"colorastreinte"=>"",
|
||||
"descriptionastreinte"=>"",
|
||||
@@ -99,22 +91,16 @@ class ReportController extends AbstractController
|
||||
while($st<$event->getEnd()) {
|
||||
$idday=$st->format("Ymd");
|
||||
if($event->getAllday()) {
|
||||
$tmp["events"][$idday]["allday"]=true;
|
||||
$tmp["events"][$idday]["colorday"]=$event->getTask()->getColor();
|
||||
$tmp["events"][$idday]["descriptionday"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
|
||||
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>true,"colorday"=>$event->getTask()->getColor(),"descriptionday"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription()];
|
||||
}
|
||||
else {
|
||||
// Matin ou après-midi ?
|
||||
$time=$event->getStart()->format("H");
|
||||
if($time==9) {
|
||||
$tmp["events"][$idday]["am"]=true;
|
||||
$tmp["events"][$idday]["coloram"]=$event->getTask()->getColor();
|
||||
$tmp["events"][$idday]["descriptionam"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
|
||||
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>true,"ap"=>false,"coloram"=>$event->getTask()->getColor(),"descriptionam"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription()];
|
||||
}
|
||||
else {
|
||||
$tmp["events"][$idday]["ap"]=true;
|
||||
$tmp["events"][$idday]["colorap"]=$event->getTask()->getColor();
|
||||
$tmp["events"][$idday]["descriptionap"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
|
||||
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>false,"ap"=>true,"colorap"=>$event->getTask()->getColor(),"descriptionap"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription()];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,18 +166,19 @@ class ReportController extends AbstractController
|
||||
$st=clone $breakday->getStart();
|
||||
while($st<$breakday->getEnd()) {
|
||||
$idday=$st->format("Ymd");
|
||||
$tmp["events"][$idday]["allday"]=true;
|
||||
$tmp["events"][$idday]["colorday"]="#6c7a89";
|
||||
$tmp["events"][$idday]["descriptionday"]="Jour Férié";
|
||||
$tmp["events"][$idday]["events"][-2000]["allday"]=true;
|
||||
$tmp["events"][$idday]["events"][-2000]["colorday"]="#6c7a89";
|
||||
$tmp["events"][$idday]["events"][-2000]["descriptionday"]="Jour Férié";
|
||||
|
||||
$st->add(new \DateInterval('P1D'));
|
||||
}
|
||||
}
|
||||
|
||||
array_push($tbevents,$tmp);
|
||||
}
|
||||
}
|
||||
|
||||
//dump($tbevents);
|
||||
|
||||
if($request->query->get('fgprint')) {
|
||||
$render = $this->renderView('Report/synthese.html.twig',[
|
||||
"useheader" => true,
|
||||
|
@@ -64,13 +64,11 @@ class RestController extends AbstractFOSRestController
|
||||
}
|
||||
|
||||
// On formate le tableau de jour
|
||||
$start=new \Datetime('00:00');
|
||||
$start->modify("monday this week");
|
||||
$start=new \Datetime('2022-03-07 00:00');
|
||||
$end=new \Datetime('00:00');
|
||||
$end->modify("last day of this month");
|
||||
$end->modify("next sunday");
|
||||
|
||||
|
||||
$events = $em
|
||||
->createQueryBuilder('event')
|
||||
->select('event')
|
||||
|
@@ -101,16 +101,7 @@ class ValidationController extends AbstractController
|
||||
|
||||
$tmp["events"][$idday] = [
|
||||
"date"=>clone $start,
|
||||
"allday"=>false,
|
||||
"colorday"=>"",
|
||||
"descriptionday"=>"",
|
||||
"am"=>false,
|
||||
"coloram"=>"",
|
||||
"descriptionam"=>"",
|
||||
"ap"=>false,
|
||||
"colorap"=>"",
|
||||
"descriptionap"=>"",
|
||||
"validate"=>$validate,
|
||||
"events"=>[],
|
||||
"astreinte"=>false,
|
||||
"colorastreinte"=>"",
|
||||
"descriptionastreinte"=>"",
|
||||
@@ -138,22 +129,16 @@ class ValidationController extends AbstractController
|
||||
while($st<$event->getEnd()) {
|
||||
$idday=$st->format("Ymd");
|
||||
if($event->getAllday()) {
|
||||
$tmp["events"][$idday]["allday"]=true;
|
||||
$tmp["events"][$idday]["colorday"]=$event->getTask()->getColor();
|
||||
$tmp["events"][$idday]["descriptionday"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
|
||||
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>true,"colorday"=>$event->getTask()->getColor(),"descriptionday"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),"validate"=>$event->getValidate()];
|
||||
}
|
||||
else {
|
||||
// Matin ou après-midi ?
|
||||
$time=$event->getStart()->format("H");
|
||||
if($time==9) {
|
||||
$tmp["events"][$idday]["am"]=true;
|
||||
$tmp["events"][$idday]["coloram"]=$event->getTask()->getColor();
|
||||
$tmp["events"][$idday]["descriptionam"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
|
||||
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>true,"ap"=>false,"coloram"=>$event->getTask()->getColor(),"descriptionam"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),"validate"=>$event->getValidate()];
|
||||
}
|
||||
else {
|
||||
$tmp["events"][$idday]["ap"]=true;
|
||||
$tmp["events"][$idday]["colorap"]=$event->getTask()->getColor();
|
||||
$tmp["events"][$idday]["descriptionap"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
|
||||
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>false,"ap"=>true,"colorap"=>$event->getTask()->getColor(),"descriptionap"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),"validate"=>$event->getValidate()];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +280,7 @@ class ValidationController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
if($duration!= 5) {
|
||||
if($duration< 5) {
|
||||
$output=["return"=>"KO","error"=>"Validation impossible = semaine incomplète"];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
@@ -500,7 +485,7 @@ class ValidationController extends AbstractController
|
||||
$em->flush();
|
||||
$iduser=$event->getUser()->getId();
|
||||
$idevent=$event->getId();
|
||||
$this->notificator->sendNotifValid("Congé validé", $iduser, $event);
|
||||
// $this->notificator->sendNotifValid("Congé validé", $iduser, $event);
|
||||
}
|
||||
|
||||
$output=[];
|
||||
|
@@ -227,6 +227,20 @@
|
||||
"phpdocumentor/type-resolver": {
|
||||
"version": "1.1.0"
|
||||
},
|
||||
"phpunit/phpunit": {
|
||||
"version": "8.5",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "4.7",
|
||||
"ref": "db276258424d15e572d35a4eb834b8f815662b25"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
"phpunit.xml.dist",
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"psr/cache": {
|
||||
"version": "1.0.1"
|
||||
},
|
||||
|
@@ -35,6 +35,7 @@
|
||||
float:left;
|
||||
width:100%;
|
||||
height: 18px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.am, .ap {
|
||||
@@ -42,6 +43,7 @@
|
||||
float:left;
|
||||
width:50%;
|
||||
height: 18px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.astreinte {
|
||||
@@ -83,27 +85,30 @@
|
||||
{% endif %}
|
||||
<td>
|
||||
<div class="date">{{ event.date | date("d/m") }}</div>
|
||||
{% if event.allday %}
|
||||
<div class='allday' style='background-color:{{ event.colorday }};' title='{{ event.descriptionday }}'>1</div>
|
||||
{% else %}
|
||||
{%if event.am %}
|
||||
<div class='am' style='background-color:{{ event.coloram }};' title='{{ event.descriptionam }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='am'></div>
|
||||
{% endif %}
|
||||
<div class="d-flex flex-wrap">
|
||||
{% set haveam=false %}
|
||||
{% for detail in event.events %}
|
||||
{% if detail.allday %}
|
||||
<div class='allday' style='background-color:{{ detail.colorday }};' title='{{ detail.descriptionday }}'>1</div>
|
||||
{% else %}
|
||||
{%if detail.am %}
|
||||
{% set haveam=true %}
|
||||
<div class='am' style='background-color:{{ detail.coloram }};' title='{{ detail.descriptionam }}'>0.5</div>
|
||||
{% endif %}
|
||||
|
||||
{%if event.ap %}
|
||||
<div class='ap' style='background-color:{{ event.colorap }};' title='{{ event.descriptionap }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='ap'></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%if detail.ap %}
|
||||
{% if not haveam %}<div class='am'></div>{%endif%}
|
||||
<div class='ap ml-auto' style='background-color:{{ detail.colorap }};' title='{{ detail.descriptionap }}'>0.5</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if event.astreinte %}
|
||||
<div class='astreinte' style='background-color:{{ event.colorastreinte }};' title='{{ event.descriptionastreinte }}'>*</div>
|
||||
{% else %}
|
||||
<div class='astreinte'></div>
|
||||
{% endif %}
|
||||
{% if event.astreinte %}
|
||||
<div class='astreinte' style='background-color:{{ event.colorastreinte }};' title='{{ event.descriptionastreinte }}'>*</div>
|
||||
{% else %}
|
||||
<div class='astreinte'></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{% set nbday=nbday+1 %}
|
||||
@@ -126,4 +131,14 @@
|
||||
function myprint() {
|
||||
document.location.href="{{path(app.request.attributes.get('_route'),{fgprint:true})}}";
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
maxheight=0;
|
||||
$( ".card" ).each(function( index ) {
|
||||
if($(this).height()>maxheight)
|
||||
maxheight=$(this).height();
|
||||
});
|
||||
$( ".card" ).height(maxheight);
|
||||
});
|
||||
|
||||
{% endblock %}
|
@@ -35,6 +35,7 @@
|
||||
float:left;
|
||||
width:100%;
|
||||
height: 18px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.am, .ap {
|
||||
@@ -42,6 +43,7 @@
|
||||
float:left;
|
||||
width:50%;
|
||||
height: 18px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.astreinte {
|
||||
@@ -83,7 +85,8 @@
|
||||
{% if nbday==1 %}
|
||||
<tr id="{{user.user.id}}-{{event.date|date("Ymd")}}"}">
|
||||
<td class="no-print" style="vertical-align:middle">
|
||||
{% if event.validate %}
|
||||
{% set first=event.events|first %}
|
||||
{% if first and first.validate %}
|
||||
<i class="fa fa-thumbs-down devalidate-{{user.user.id}}" onClick="devalidate({{user.user.id}},'{{event.date|date("Ymd")}}','{{event.date|date("m/d/Y")}}')" style="cursor:pointer; color:red;"></i>
|
||||
{%else%}
|
||||
<i class="fa fa-thumbs-up validate-{{user.user.id}}" onClick="validate({{user.user.id}},'{{event.date|date("Ymd")}}','{{event.date|date("m/d/Y")}}')" style="cursor:pointer; color:green;{% if btnvalidate %}display:none{% endif %}"></i>
|
||||
@@ -95,21 +98,24 @@
|
||||
|
||||
<td>
|
||||
<div class="date">{{ event.date | date("d/m") }}</div>
|
||||
{% if event.allday %}
|
||||
<div class='allday' style='background-color:{{ event.colorday }};' title='{{ event.descriptionday }}'>1</div>
|
||||
{% else %}
|
||||
{%if event.am %}
|
||||
<div class='am' style='background-color:{{ event.coloram }};' title='{{ event.descriptionam }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='am'></div>
|
||||
{% endif %}
|
||||
<div class="d-flex flex-wrap">
|
||||
{% set haveam=false %}
|
||||
{% for detail in event.events %}
|
||||
{% if detail.allday %}
|
||||
<div class='allday' style='background-color:{{ detail.colorday }};' title='{{ detail.descriptionday }}'>1</div>
|
||||
{% else %}
|
||||
{%if detail.am %}
|
||||
{% set haveam=true %}
|
||||
<div class='am' style='background-color:{{ detail.coloram }};' title='{{ detail.descriptionam }}'>0.5</div>
|
||||
{% endif %}
|
||||
|
||||
{%if event.ap %}
|
||||
<div class='ap' style='background-color:{{ event.colorap }};' title='{{ event.descriptionap }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='ap'></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%if detail.ap %}
|
||||
{% if not haveam %}<div class='am'></div>{%endif%}
|
||||
<div class='ap' style='background-color:{{ detail.colorap }};' title='{{ detail.descriptionap }}'>0.5</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if event.astreinte %}
|
||||
<div class='astreinte' style='background-color:{{ event.colorastreinte }};' title='{{ event.descriptionastreinte }}'>*</div>
|
||||
|
Reference in New Issue
Block a user