Compare commits
2 Commits
pkg/stable
...
fictiv_use
Author | SHA1 | Date | |
---|---|---|---|
d5c81668e3 | |||
f82279e9b2 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
*~
|
|
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)
|
|
1
src/schedule-2.0/.gitignore
vendored
1
src/schedule-2.0/.gitignore
vendored
@@ -20,4 +20,3 @@
|
|||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
###< symfony/webpack-encore-bundle ###
|
###< symfony/webpack-encore-bundle ###
|
||||||
*~
|
|
@@ -17,7 +17,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
weekNumbers: true,
|
weekNumbers: true,
|
||||||
selectable: true,
|
selectable: true,
|
||||||
events: 'event/load',
|
events: 'event/load',
|
||||||
eventLimit:8,
|
eventLimit:4,
|
||||||
eventDrop: function(info) {
|
eventDrop: function(info) {
|
||||||
info.revert();
|
info.revert();
|
||||||
},
|
},
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
# See https://symfony.com/doc/current/email/dev_environment.html
|
|
||||||
swiftmailer:
|
|
||||||
# send all emails to a specific address
|
|
||||||
#delivery_addresses: ['me@example.com']
|
|
@@ -44,7 +44,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
weekNumbers: true,
|
weekNumbers: true,
|
||||||
selectable: true,
|
selectable: true,
|
||||||
events: 'event/load',
|
events: 'event/load',
|
||||||
eventLimit: 8,
|
eventLimit: 4,
|
||||||
eventDrop: function eventDrop(info) {
|
eventDrop: function eventDrop(info) {
|
||||||
info.revert();
|
info.revert();
|
||||||
},
|
},
|
||||||
|
@@ -15,7 +15,7 @@ function purge($table) {
|
|||||||
writeligne("$table");
|
writeligne("$table");
|
||||||
$q="DELETE FROM $table";
|
$q="DELETE FROM $table";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute();
|
$query->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test de la connexion à la base
|
// Test de la connexion à la base
|
||||||
@@ -48,8 +48,6 @@ writeligne("MIGRATION");
|
|||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("Purge des Tables Scheudle");
|
writeligne("Purge des Tables Scheudle");
|
||||||
|
|
||||||
Purge("userproject");
|
|
||||||
Purge("timer");
|
|
||||||
Purge("event");
|
Purge("event");
|
||||||
Purge("penalty");
|
Purge("penalty");
|
||||||
Purge("task");
|
Purge("task");
|
||||||
@@ -68,46 +66,46 @@ writeligne("");
|
|||||||
writeligne("== Récupération Customer");
|
writeligne("== Récupération Customer");
|
||||||
$q="SELECT * FROM schedule_customer";
|
$q="SELECT * FROM schedule_customer";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["customer_name"]);
|
writeligne($row["customer_name"]);
|
||||||
$q="INSERT IGNORE INTO customer (id, name, keypass) VALUES (?,?,?)";
|
$q="INSERT IGNORE INTO customer (id, name, keypass) VALUES (?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["customer_id"],$row["customer_name"],$row["customer_key"]]);
|
$query->execute([$row["customer_id"],$row["customer_name"],$row["customer_key"]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération Nature");
|
writeligne("== Récupération Nature");
|
||||||
$q="SELECT * FROM schedule_nature";
|
$q="SELECT * FROM schedule_nature";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["nature_name"]);
|
writeligne($row["nature_name"]);
|
||||||
$q="INSERT IGNORE INTO nature (id, name, isvacation) VALUES (?,?,?)";
|
$q="INSERT IGNORE INTO nature (id, name, isvacation) VALUES (?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["nature_id"],$row["nature_name"],false]);
|
$query->execute([$row["nature_id"],$row["nature_name"],false]);
|
||||||
}
|
}
|
||||||
writeligne("Congés");
|
writeligne("Congés");
|
||||||
$q="INSERT IGNORE INTO nature (id, name, isvacation) VALUES (?,?,?)";
|
$q="INSERT IGNORE INTO nature (id, name, isvacation) VALUES (?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([-200,"Congés",true]);
|
$query->execute([-200,"Congés",true]);
|
||||||
|
|
||||||
writeligne("Temps Partiel");
|
writeligne("Temps Partiel");
|
||||||
$q="INSERT IGNORE INTO nature (id, name, isvacation) VALUES (?,?,?)";
|
$q="INSERT IGNORE INTO nature (id, name, isvacation) VALUES (?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([-190,"Temps Partiel",true]);
|
$query->execute([-190,"Temps Partiel",true]);
|
||||||
|
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération Service");
|
writeligne("== Récupération Service");
|
||||||
$q="SELECT * FROM schedule_service";
|
$q="SELECT * FROM schedule_service";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["service_name"]);
|
writeligne($row["service_name"]);
|
||||||
$q="INSERT IGNORE INTO service (id, name) VALUES (?,?)";
|
$q="INSERT IGNORE INTO service (id, name) VALUES (?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["service_id"],$row["service_name"]]);
|
$query->execute([$row["service_id"],$row["service_name"]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -115,16 +113,16 @@ writeligne("");
|
|||||||
writeligne("== Récupération User");
|
writeligne("== Récupération User");
|
||||||
$q="SELECT * FROM schedule_user WHERE user_login!='system'";
|
$q="SELECT * FROM schedule_user WHERE user_login!='system'";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
|
|
||||||
writeligne($row["user_login"]);
|
writeligne($row["user_login"]);
|
||||||
$q="INSERT IGNORE INTO user (id, username, firstname, lastname, email, service_id, apikey, password) VALUES (?,?,?,?,?,?,?,?)";
|
$q="INSERT IGNORE INTO user (id, username, firstname, lastname, email, service_id, apikey, password) VALUES (?,?,?,?,?,?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["user_id"],$row["user_login"],$row["user_firstname"],$row["user_lastname"],$row["user_email"],$row["user_service"],$row["user_login"],"nopassword" ]);
|
$query->execute([$row["user_id"],$row["user_login"],$row["user_firstname"],$row["user_lastname"],$row["user_email"],$row["user_service"],$row["user_login"],"nopassword" ]);
|
||||||
|
|
||||||
$output = shell_exec('/var/www/html/schedule/bin/console app:setPassword '.$row["user_login"].' '.$row["user_login"]);
|
$output = shell_exec('/var/www/html/schedule/bin/console app:setPassword '.$row["user_login"].' '.$row["user_login"]);
|
||||||
|
|
||||||
if($row["user_login"]=="afornerot") $roles='ROLE_ADMIN,ROLE_USER';
|
if($row["user_login"]=="afornerot") $roles='ROLE_ADMIN,ROLE_USER';
|
||||||
else {
|
else {
|
||||||
switch($row["user_profil"]) {
|
switch($row["user_profil"]) {
|
||||||
@@ -133,7 +131,7 @@ while($row=$queryold->fetch()) {
|
|||||||
case 50: $roles='ROLE_USER'; break;
|
case 50: $roles='ROLE_USER'; break;
|
||||||
case 99: $roles='ROLE_VISITOR'; break;
|
case 99: $roles='ROLE_VISITOR'; break;
|
||||||
default: $roles='ROLE_VISITOR'; break;
|
default: $roles='ROLE_VISITOR'; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$output = shell_exec('/var/www/html/schedule/bin/console app:setRoles '.$row["user_login"].' '.$roles);
|
$output = shell_exec('/var/www/html/schedule/bin/console app:setRoles '.$row["user_login"].' '.$roles);
|
||||||
}
|
}
|
||||||
@@ -143,12 +141,12 @@ writeligne("");
|
|||||||
writeligne("== Récupération Project");
|
writeligne("== Récupération Project");
|
||||||
$q="SELECT * FROM schedule_project";
|
$q="SELECT * FROM schedule_project";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["project_name"]);
|
writeligne($row["project_name"]);
|
||||||
$q="INSERT IGNORE INTO project (id, name, active, service_id, customer_id ) VALUES (?,?,?,?,?)";
|
$q="INSERT IGNORE INTO project (id, name, active, service_id, customer_id ) VALUES (?,?,?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["project_id"],$row["project_name"],$row["project_actif"],$row["project_service"],$row["project_customer"] ]);
|
$query->execute([$row["project_id"],$row["project_name"],$row["project_actif"],$row["project_service"],$row["project_customer"] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -156,19 +154,19 @@ writeligne("");
|
|||||||
writeligne("== Récupération Offer");
|
writeligne("== Récupération Offer");
|
||||||
$q="SELECT * FROM schedule_order";
|
$q="SELECT * FROM schedule_order";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["order_name"]);
|
writeligne($row["order_name"]);
|
||||||
$q="INSERT IGNORE INTO offer (id, name, ref, quantity, pu, validate, active, project_id ) VALUES (?,?,?,?,?,?,?,?)";
|
$q="INSERT IGNORE INTO offer (id, name, ref, quantity, pu, validate, active, project_id ) VALUES (?,?,?,?,?,?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["order_id"],$row["order_name"],$row["order_ref"],$row["order_quantity"],$row["order_pu"],$row["order_validate"],$row["order_actif"],$row["order_project"] ]);
|
$query->execute([$row["order_id"],$row["order_name"],$row["order_ref"],$row["order_quantity"],$row["order_pu"],$row["order_validate"],$row["order_actif"],$row["order_project"] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération Task");
|
writeligne("== Récupération Task");
|
||||||
$q="SELECT * FROM schedule_task";
|
$q="SELECT * FROM schedule_task";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["task_name"]);
|
writeligne($row["task_name"]);
|
||||||
$nature=$row["task_nature"];
|
$nature=$row["task_nature"];
|
||||||
@@ -177,78 +175,67 @@ while($row=$queryold->fetch()) {
|
|||||||
$q="INSERT IGNORE INTO task (id, name, color, quantity, validate, project_id, nature_id ) VALUES (?,?,?,?,?,?,?)";
|
$q="INSERT IGNORE INTO task (id, name, color, quantity, validate, project_id, nature_id ) VALUES (?,?,?,?,?,?,?)";
|
||||||
$quantity=($row["task_quantity"]==0?null:$row["task_quantity"]);
|
$quantity=($row["task_quantity"]==0?null:$row["task_quantity"]);
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["task_id"],$row["task_name"],"#".$row["task_color"],$quantity,$row["task_validate"],$row["task_project"],$nature ]);
|
$query->execute([$row["task_id"],$row["task_name"],"#".$row["task_color"],$quantity,$row["task_validate"],$row["task_project"],$nature ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération Event");
|
writeligne("== Récupération Event");
|
||||||
$q="SELECT * FROM schedule_event, schedule_task WHERE event_task=task_id";
|
$q="SELECT * FROM schedule_event";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
// Event vacation ?
|
|
||||||
$isvacation=false;
|
|
||||||
if($row["task_id"]<=-70) $isvacation=true;
|
|
||||||
if($row["task_id"]==-85 || $row["task_id"]==-70) $isvacation=true;
|
|
||||||
|
|
||||||
// Validation
|
|
||||||
$validate=$row["event_validate"];
|
|
||||||
$validateholiday=false;
|
|
||||||
if($isvacation) $validateholiday=$row["event_validate"];
|
|
||||||
|
|
||||||
// Génération de l'event
|
|
||||||
writeligne($row["event_id"]);
|
writeligne($row["event_id"]);
|
||||||
$q="INSERT IGNORE INTO event (id, description, start, end, allday, duration, validate, validateholiday, task_id, user_id ) VALUES (?,?,?,?,?,?,?,?,?,?)";
|
$q="INSERT IGNORE INTO event (id, description, start, end, allday, duration, validate, validateholiday, task_id, user_id ) VALUES (?,?,?,?,?,?,?,?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["event_id"],$row["event_description"],$row["event_start"],$row["event_end"],$row["event_allday"],$row["event_duration"],$validate,$validateholiday,$row["event_task"],$row["event_user"] ]);
|
$query->execute([$row["event_id"],$row["event_description"],$row["event_start"],$row["event_end"],$row["event_allday"],$row["event_duration"],$row["event_validate"],$row["event_validate"],$row["event_task"],$row["event_user"] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération Penalty");
|
writeligne("== Récupération Penalty");
|
||||||
$q="SELECT * FROM schedule_penalty";
|
$q="SELECT * FROM schedule_penalty";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["penalty_id"]);
|
writeligne($row["penalty_id"]);
|
||||||
$q="INSERT IGNORE INTO penalty (id, description, start, end, allday, duration, validate, task_id, user_id ) VALUES (?,?,?,?,?,?,?,?,?)";
|
$q="INSERT IGNORE INTO penalty (id, description, start, end, allday, duration, validate, task_id, user_id ) VALUES (?,?,?,?,?,?,?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["penalty_id"],$row["penalty_description"],$row["penalty_start"],$row["penalty_end"],$row["penalty_allday"],$row["penalty_duration"],$row["penalty_validate"],$row["penalty_task"],$row["penalty_user"] ]);
|
$query->execute([$row["penalty_id"],$row["penalty_description"],$row["penalty_start"],$row["penalty_end"],$row["penalty_allday"],$row["penalty_duration"],$row["penalty_validate"],$row["penalty_task"],$row["penalty_user"] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération Breakday");
|
writeligne("== Récupération Breakday");
|
||||||
$q="SELECT * FROM schedule_breakday";
|
$q="SELECT * FROM schedule_breakday";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["breakday_id"]);
|
writeligne($row["breakday_id"]);
|
||||||
$q="INSERT IGNORE INTO breakday (id, start, end ) VALUES (?,?,?)";
|
$q="INSERT IGNORE INTO breakday (id, start, end ) VALUES (?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["breakday_id"],$row["breakday_start"],$row["breakday_end"] ]);
|
$query->execute([$row["breakday_id"],$row["breakday_start"],$row["breakday_end"] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération Job");
|
writeligne("== Récupération Job");
|
||||||
$q="SELECT * FROM schedule_job";
|
$q="SELECT * FROM schedule_job";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["job_id"]);
|
writeligne($row["job_id"]);
|
||||||
$q="INSERT IGNORE INTO job (id, name, type ) VALUES (?,?,?)";
|
$q="INSERT IGNORE INTO job (id, name, type ) VALUES (?,?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["job_id"],$row["job_name"],$row["type"] ]);
|
$query->execute([$row["job_id"],$row["job_name"],$row["type"] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeligne("");
|
writeligne("");
|
||||||
writeligne("== Récupération UserJob");
|
writeligne("== Récupération UserJob");
|
||||||
$q="SELECT * FROM schedule_user_jobs WHERE project_id=-100";
|
$q="SELECT * FROM schedule_user_jobs WHERE project_id=-100";
|
||||||
$queryold=$bddold->prepare($q);
|
$queryold=$bddold->prepare($q);
|
||||||
$queryold->execute();
|
$queryold->execute();
|
||||||
while($row=$queryold->fetch()) {
|
while($row=$queryold->fetch()) {
|
||||||
writeligne($row["user_job_id"]);
|
writeligne($row["user_job_id"]);
|
||||||
$q="INSERT IGNORE INTO userjob (user, job ) VALUES (?,?)";
|
$q="INSERT IGNORE INTO userjob (user, job ) VALUES (?,?)";
|
||||||
$query=$bddnew->prepare($q);
|
$query=$bddnew->prepare($q);
|
||||||
$query->execute([$row["user_id"],$row["job_id"] ]);
|
$query->execute([$row["user_id"],$row["job_id"] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\n\n";
|
echo "\n\n";
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
cd /var/www/html/schedule
|
cd /var/www/html/schedule
|
||||||
|
|
||||||
# Déclaration d'un proxy
|
# Déclaration d'un proxy
|
||||||
. scripts/proxy.sh
|
. proxy.sh
|
||||||
|
|
||||||
# Mise en place du fichier d'environnement model
|
# Mise en place du fichier d'environnement model
|
||||||
if [ ! -f /var/www/html/schedule/.env ]; then
|
if [ ! -f /var/www/html/schedule/.env ]; then
|
||||||
|
@@ -26,6 +26,7 @@ class EventController extends AbstractController
|
|||||||
public function list(Request $request)
|
public function list(Request $request)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$users = $em->getRepository("App:User")->findAll();
|
$users = $em->getRepository("App:User")->findAll();
|
||||||
$tasks = $em->getRepository("App:Task")->findAll();
|
$tasks = $em->getRepository("App:Task")->findAll();
|
||||||
|
|
||||||
@@ -41,56 +42,38 @@ class EventController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$tbevents=[];
|
$tbevents=[];
|
||||||
$start = $request->query->get('start');
|
|
||||||
$end = $request->query->get('end');
|
|
||||||
$iduser=$this->get("session")->get("iduser");
|
|
||||||
// Evenements
|
// Evenements
|
||||||
if($iduser=="all") {
|
$iduser=$this->get("session")->get("iduser");
|
||||||
|
$user=$em->getRepository("App:User")->find($iduser);
|
||||||
|
if($iduser=="all")
|
||||||
$events=$em->getRepository("App:Event")->findAll();
|
$events=$em->getRepository("App:Event")->findAll();
|
||||||
$events = $em
|
|
||||||
->createQueryBuilder('event')
|
|
||||||
->select('event')
|
|
||||||
->from('App:Event','event')
|
|
||||||
->Where('event.start>=:start AND event.end <:end')
|
|
||||||
->setParameter('start',$start)
|
|
||||||
->setParameter('end',$end)
|
|
||||||
->getQuery()->getResult();
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
$user=$em->getRepository("App:User")->find($iduser);
|
$users= [];
|
||||||
$events=$em->getRepository("App:Event")->findBy(["user"=>$user]);
|
$fictivuser = $em->getRepository("App:User")->findOneBy([
|
||||||
$events = $em
|
'service' => $user->getService(),
|
||||||
->createQueryBuilder('event')
|
'fictive' => true,
|
||||||
->select('event')
|
]);
|
||||||
->from('App:Event','event')
|
array_push($users,$fictivuser);
|
||||||
->Where('event.user=:user AND event.start>=:start AND event.end <:end')
|
$selectedusers = $this->get("session")->get("selectedusers");
|
||||||
->setParameter('user',$user->getId())
|
if (isset($selectedusers) && sizeof($selectedusers)>1){
|
||||||
->setParameter('start',$start)
|
foreach($selectedusers as $user) {
|
||||||
->setParameter('end',$end)
|
array_push($users,$em->getRepository("App:User")->find($user));
|
||||||
->getQuery()->getResult();
|
|
||||||
}
|
|
||||||
foreach($events as $event) {
|
|
||||||
//Filtre par service
|
|
||||||
|
|
||||||
if($this->get('session')->get('idservice')!="all") {
|
|
||||||
|
|
||||||
$idservice=$event->getUser()->getService()->getId();
|
|
||||||
if ($idservice!=$this->get('session')->get('idservice')){
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
$events=$em->getRepository("App:Event")->findBy(["user"=>$users]);
|
||||||
|
}else{
|
||||||
|
array_push($users,$em->getRepository("App:User")->find($iduser));
|
||||||
|
$events=$em->getRepository("App:Event")->findBy(["user"=>$users]);
|
||||||
}
|
}
|
||||||
// Filtre par project
|
}
|
||||||
|
|
||||||
if($this->get('session')->get('idproject')!="all") {
|
foreach($events as $event) {
|
||||||
$idproject=$event->getTask()->getProject()->getId();
|
|
||||||
if($idproject!=$this->get('session')->get('idproject'))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$tmp=$this->formatEvent($event);
|
$tmp=$this->formatEvent($event);
|
||||||
array_push($tbevents,$tmp);
|
array_push($tbevents,$tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Astreintes
|
// Astreintes
|
||||||
|
$iduser=$this->get("session")->get("iduser");
|
||||||
if($iduser=="all")
|
if($iduser=="all")
|
||||||
$penaltys=$em->getRepository("App:Penalty")->findAll();
|
$penaltys=$em->getRepository("App:Penalty")->findAll();
|
||||||
else {
|
else {
|
||||||
@@ -98,9 +81,11 @@ class EventController extends AbstractController
|
|||||||
$user=$em->getRepository("App:User")->find($iduser);
|
$user=$em->getRepository("App:User")->find($iduser);
|
||||||
$penaltys=$em->getRepository("App:Penalty")->findBy(["user"=>$user]);
|
$penaltys=$em->getRepository("App:Penalty")->findBy(["user"=>$user]);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($penaltys as $penalty) {
|
foreach($penaltys as $penalty) {
|
||||||
$tmp=$this->formatEvent($penalty);
|
$tmp=$this->formatEvent($penalty);
|
||||||
array_push($tbevents,$tmp);
|
array_push($tbevents,$tmp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Breakday
|
// Breakday
|
||||||
@@ -111,6 +96,7 @@ class EventController extends AbstractController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Retour
|
// Retour
|
||||||
return new Response(json_encode($tbevents));
|
return new Response(json_encode($tbevents));
|
||||||
}
|
}
|
||||||
@@ -512,6 +498,7 @@ class EventController extends AbstractController
|
|||||||
"holiday" => $event->getTask()->getNature()->getIsvacation(),
|
"holiday" => $event->getTask()->getNature()->getIsvacation(),
|
||||||
"externaltrip" => ($event instanceof Penalty?false:$event->getExternalTrip()),
|
"externaltrip" => ($event instanceof Penalty?false:$event->getExternalTrip()),
|
||||||
"editable" => $editable,
|
"editable" => $editable,
|
||||||
|
"fictivuser" => $event->getUser()->getFictive(),
|
||||||
"durationEditable" => false,
|
"durationEditable" => false,
|
||||||
"extendedProps" => [
|
"extendedProps" => [
|
||||||
"fulldescription" => ($event instanceof Penalty?"ASTREINTE\n":"").strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),
|
"fulldescription" => ($event instanceof Penalty?"ASTREINTE\n":"").strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),
|
||||||
|
@@ -327,7 +327,6 @@ class ExportController extends AbstractController
|
|||||||
if(!isset($tbproject["weeks_by_task_by_user"][$event->getStart()->format("Y")][$event->getStart()->format("W")]["tasks"][$event->getTask()->getId()])){
|
if(!isset($tbproject["weeks_by_task_by_user"][$event->getStart()->format("Y")][$event->getStart()->format("W")]["tasks"][$event->getTask()->getId()])){
|
||||||
$tbproject["weeks_by_task_by_user"][$event->getStart()->format("Y")][$event->getStart()->format("W")]["tasks"][$event->getTask()->getId()] = [
|
$tbproject["weeks_by_task_by_user"][$event->getStart()->format("Y")][$event->getStart()->format("W")]["tasks"][$event->getTask()->getId()] = [
|
||||||
"taskname" => $event->getTask()->getName(),
|
"taskname" => $event->getTask()->getName(),
|
||||||
"nature" => $event->getTask()->getNature()->getName(),
|
|
||||||
"users" => [],
|
"users" => [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -406,7 +405,6 @@ class ExportController extends AbstractController
|
|||||||
if(!isset($tbproject["weeks_by_task_by_user"][$penalty->getStart()->format("Y")][$penalty->getStart()->format("W")]["tasks"][$penalty->getTask()->getId()])){
|
if(!isset($tbproject["weeks_by_task_by_user"][$penalty->getStart()->format("Y")][$penalty->getStart()->format("W")]["tasks"][$penalty->getTask()->getId()])){
|
||||||
$tbproject["weeks_by_task_by_user"][$penalty->getStart()->format("Y")][$penalty->getStart()->format("W")]["tasks"][$penalty->getTask()->getId()] = [
|
$tbproject["weeks_by_task_by_user"][$penalty->getStart()->format("Y")][$penalty->getStart()->format("W")]["tasks"][$penalty->getTask()->getId()] = [
|
||||||
"taskname" => $penalty->getTask()->getName(),
|
"taskname" => $penalty->getTask()->getName(),
|
||||||
"nature" => $event->getTask()->getNature()->getName(),
|
|
||||||
"users" => [],
|
"users" => [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,9 @@ class HomeController extends AbstractController
|
|||||||
public function selectuser(Request $request)
|
public function selectuser(Request $request)
|
||||||
{
|
{
|
||||||
$iduser = $request->request->get('iduser');
|
$iduser = $request->request->get('iduser');
|
||||||
|
$selectedusers = $request->request->get('selectedusers');
|
||||||
$this->get('session')->set('iduser',$iduser);
|
$this->get('session')->set('iduser',$iduser);
|
||||||
|
$this->get('session')->set('selectedusers',$selectedusers);
|
||||||
$output=["return"=>"OK"];
|
$output=["return"=>"OK"];
|
||||||
return new Response(json_encode($output));
|
return new Response(json_encode($output));
|
||||||
}
|
}
|
||||||
|
@@ -352,7 +352,7 @@ class ReportController extends AbstractController
|
|||||||
$end=new \Datetime('first day of this month');
|
$end=new \Datetime('first day of this month');
|
||||||
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
||||||
$end->sub(new \DateInterval('P1D'));
|
$end->sub(new \DateInterval('P1D'));
|
||||||
|
|
||||||
foreach($users as $user) {
|
foreach($users as $user) {
|
||||||
$tbevents = $this->getEventuser($user,$start,$end,false);
|
$tbevents = $this->getEventuser($user,$start,$end,false);
|
||||||
|
|
||||||
@@ -955,7 +955,7 @@ class ReportController extends AbstractController
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$tbevents[$idproject][$idday]["duration"]+=($event->getAllday()?1:0.5);
|
$tbevents[$idproject][$idday]["duration"]=($event->getAllday()?1:0.5);
|
||||||
|
|
||||||
|
|
||||||
$st->add(new \DateInterval('P1D'));
|
$st->add(new \DateInterval('P1D'));
|
||||||
|
@@ -9,6 +9,7 @@ use Symfony\Component\Form\FormError;
|
|||||||
use Knp\Bundle\SnappyBundle\Snappy\Response\PdfResponse;
|
use Knp\Bundle\SnappyBundle\Snappy\Response\PdfResponse;
|
||||||
|
|
||||||
use App\Entity\Service as Entity;
|
use App\Entity\Service as Entity;
|
||||||
|
use App\Entity\User as Fictiv;
|
||||||
use App\Form\ServiceType as Form;
|
use App\Form\ServiceType as Form;
|
||||||
|
|
||||||
class ServiceController extends AbstractController
|
class ServiceController extends AbstractController
|
||||||
@@ -69,6 +70,16 @@ class ServiceController extends AbstractController
|
|||||||
$em->persist($data);
|
$em->persist($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
$fictivuser = new Fictiv();
|
||||||
|
$fictivuser->setUsername($data->getName());
|
||||||
|
$fictivuser->setPassword(bin2hex(openssl_random_pseudo_bytes(4)));
|
||||||
|
$fictivuser->setLastname("Service");
|
||||||
|
$fictivuser->setFirstname($data->getName());
|
||||||
|
$fictivuser->setEmail($data->getName());
|
||||||
|
$fictivuser->setService($data->getId());
|
||||||
|
$fictivuser->setFictive(true);
|
||||||
|
$em->persist($fictivuser);
|
||||||
|
$em->flush();
|
||||||
// Retour à la liste
|
// Retour à la liste
|
||||||
return $this->redirectToRoute($this->route);
|
return $this->redirectToRoute($this->route);
|
||||||
}
|
}
|
||||||
@@ -147,8 +158,14 @@ class ServiceController extends AbstractController
|
|||||||
return $this->redirectToRoute($this->route."_update",["id"=>$id]);
|
return $this->redirectToRoute($this->route."_update",["id"=>$id]);
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
$fictivuser = $em->getRepository("App:User")->findOneBy([
|
||||||
|
'service' => $data->getService(),
|
||||||
|
'fictive' => true,
|
||||||
|
]);
|
||||||
|
$em->remove($fictivuser);
|
||||||
$em->remove($data);
|
$em->remove($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(\Doctrine\DBAL\DBALException $e) {
|
catch(\Doctrine\DBAL\DBALException $e) {
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
|
@@ -43,6 +43,7 @@ class TimerController extends AbstractController
|
|||||||
$user = $em->getRepository("App:User")->find($iduser);
|
$user = $em->getRepository("App:User")->find($iduser);
|
||||||
$tasks = $em->getRepository("App:Task")->findAll();
|
$tasks = $em->getRepository("App:Task")->findAll();
|
||||||
$timers = $em->getRepository("App:Timer")->findBy(["user"=>$iduser]);
|
$timers = $em->getRepository("App:Timer")->findBy(["user"=>$iduser]);
|
||||||
|
|
||||||
return $this->render($this->render.'list.cal.html.twig',[
|
return $this->render($this->render.'list.cal.html.twig',[
|
||||||
"useheader" => true,
|
"useheader" => true,
|
||||||
"usesidebar" => true,
|
"usesidebar" => true,
|
||||||
@@ -96,6 +97,11 @@ class TimerController extends AbstractController
|
|||||||
$officeworkend = clone $officeworkstart;
|
$officeworkend = clone $officeworkstart;
|
||||||
$officeworkstart->SetTime(9,0,0);
|
$officeworkstart->SetTime(9,0,0);
|
||||||
$officeworkend->SetTime(17,30,0);
|
$officeworkend->SetTime(17,30,0);
|
||||||
|
if ($start < $officeworkstart || $end > $officeworkend) {
|
||||||
|
$timer->setAdditionalHour(true);
|
||||||
|
}else{
|
||||||
|
$timer->setAdditionalHour($additionalhour);
|
||||||
|
}
|
||||||
|
|
||||||
$timer = new Entity();
|
$timer = new Entity();
|
||||||
$timer->setUser($user);
|
$timer->setUser($user);
|
||||||
@@ -104,12 +110,7 @@ class TimerController extends AbstractController
|
|||||||
$timer->setEnd($end);
|
$timer->setEnd($end);
|
||||||
$timer->setDuration($duration);
|
$timer->setDuration($duration);
|
||||||
$timer->setDescription($description);
|
$timer->setDescription($description);
|
||||||
$timer->setActivePenalty($activepenalty ? $activepenalty : false);
|
$timer->setActivePenalty($activepenalty);
|
||||||
if ($start < $officeworkstart || $end > $officeworkend) {
|
|
||||||
$timer->setAdditionalHour(true);
|
|
||||||
}else{
|
|
||||||
$timer->setAdditionalHour($additionalhour ? $additionalhour : false);
|
|
||||||
}
|
|
||||||
$em->persist($timer);
|
$em->persist($timer);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* User
|
* User
|
||||||
*
|
*
|
||||||
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
|
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
|
||||||
* @ORM\Table(name="user",indexes={@ORM\Index(name="username", columns={"username"})})
|
* @ORM\Table(name="user",indexes={@ORM\Index(name="username", columns={"username"})})
|
||||||
* @UniqueEntity("username", message="Ce nom d'utilisateur existe dèja")
|
* @UniqueEntity("username", message="Ce nom d'utilisateur existe dèja")
|
||||||
@@ -84,7 +84,7 @@ class User implements UserInterface, \Serializable
|
|||||||
* @ORM\ManyToOne(targetEntity="Service", inversedBy="users")
|
* @ORM\ManyToOne(targetEntity="Service", inversedBy="users")
|
||||||
* @ORM\JoinColumn(nullable=true)
|
* @ORM\JoinColumn(nullable=true)
|
||||||
*/
|
*/
|
||||||
private $service;
|
private $service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\OneToMany(targetEntity="Event", mappedBy="user", cascade={"persist"}, orphanRemoval=false)
|
* @ORM\OneToMany(targetEntity="Event", mappedBy="user", cascade={"persist"}, orphanRemoval=false)
|
||||||
@@ -104,11 +104,16 @@ class User implements UserInterface, \Serializable
|
|||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
protected $jobs;
|
protected $jobs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\OneToMany(targetEntity="Userproject", mappedBy="user", cascade={"persist"}, orphanRemoval=true)
|
* @ORM\OneToMany(targetEntity="Userproject", mappedBy="user", cascade={"persist"}, orphanRemoval=true)
|
||||||
*/
|
*/
|
||||||
private $userprojects;
|
private $userprojects;
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="fictive", type="boolean")
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private $fictive;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@@ -117,6 +122,7 @@ class User implements UserInterface, \Serializable
|
|||||||
$this->penaltys = new ArrayCollection();
|
$this->penaltys = new ArrayCollection();
|
||||||
$this->jobs = new ArrayCollection();
|
$this->jobs = new ArrayCollection();
|
||||||
$this->userprojects = new ArrayCollection();
|
$this->userprojects = new ArrayCollection();
|
||||||
|
$this->fictive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUsername(): ?string
|
public function getUsername(): ?string
|
||||||
@@ -406,7 +412,19 @@ class User implements UserInterface, \Serializable
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFictive(): ?bool
|
||||||
|
{
|
||||||
|
return $this->fictive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFictive(bool $fictive): self
|
||||||
|
{
|
||||||
|
$this->fictive = $fictive;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -81,14 +81,14 @@ class ProjectRepository extends ServiceEntityRepository
|
|||||||
|
|
||||||
public function sumEstimate($id) {
|
public function sumEstimate($id) {
|
||||||
$qb = $this->createQueryBuilder('project')
|
$qb = $this->createQueryBuilder('project')
|
||||||
->select('SUM(task.quantity) as somme')
|
->select('SUM(task.quantity) as somme1, SUM(task.validate) as somme2 ')
|
||||||
->from('App:Task','task')
|
->from('App:Task','task')
|
||||||
->Where('project.id=:id')
|
->Where('project.id=:id')
|
||||||
->andWhere('task.project=project')
|
->andWhere('task.project=project')
|
||||||
->setParameter('id',$id);
|
->setParameter('id',$id);
|
||||||
$result=$qb->getQuery()->getOneOrNullResult();
|
$result=$qb->getQuery()->getOneOrNullResult();
|
||||||
|
|
||||||
$estimate=($result["somme"]?$result["somme"]:0);
|
$estimate=($result["somme1"]?$result["somme1"]:0)+($result["somme2"]?$result["somme2"]:0);
|
||||||
return $estimate;
|
return $estimate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Repository;
|
|
||||||
|
|
||||||
use App\Entity\Timer;
|
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
||||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
|
||||||
|
|
||||||
class TimerRepository extends ServiceEntityRepository
|
|
||||||
{
|
|
||||||
public function __construct(ManagerRegistry $registry)
|
|
||||||
{
|
|
||||||
parent::__construct($registry, Timer::class);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -122,6 +122,8 @@ class sessionListener {
|
|||||||
}
|
}
|
||||||
$session->set('services',$tbservices);
|
$session->set('services',$tbservices);
|
||||||
|
|
||||||
|
$selectedusers=[];
|
||||||
|
$session->set('selectedusers',$selectedusers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -42,6 +42,10 @@
|
|||||||
.eventEstimate {
|
.eventEstimate {
|
||||||
margin: -3px 10px;
|
margin: -3px 10px;
|
||||||
}
|
}
|
||||||
|
.fictive{
|
||||||
|
height:10px!important;
|
||||||
|
background-color:#cdcdcd;
|
||||||
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
@@ -83,7 +87,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<select class="select2entity" id="tasksubmit" name="tasksubmit">
|
<select class="select2entity" id="tasksubmit" name="tasksubmit">
|
||||||
<option></option>
|
<option></option>
|
||||||
{% for task in tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
{% for task in tasks %}
|
||||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@@ -169,7 +173,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<select class="select2entity" id="taskupdate" name="taskupdate">
|
<select class="select2entity" id="taskupdate" name="taskupdate">
|
||||||
<option></option>
|
<option></option>
|
||||||
{% for task in tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
{% for task in tasks %}
|
||||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@@ -215,6 +219,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{% block localjavascript %}
|
{% block localjavascript %}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#modalsubmit #user").select2({
|
$("#modalsubmit #user").select2({
|
||||||
theme: 'bootstrap4',
|
theme: 'bootstrap4',
|
||||||
@@ -243,34 +248,46 @@ $(document).ready(function() {
|
|||||||
// Rendu d'un évenement
|
// Rendu d'un évenement
|
||||||
function eventRender(info) {
|
function eventRender(info) {
|
||||||
console.log(info.event.extendedProps);
|
console.log(info.event.extendedProps);
|
||||||
|
|
||||||
// Récupération des divers élements du rendu event
|
// Récupération des divers élements du rendu event
|
||||||
var content=$(info.el).children('.fc-content');
|
var content=$(info.el).children('.fc-content');
|
||||||
var title=$(content).children('.fc-title');
|
var title=$(content).children('.fc-title');
|
||||||
|
if(!info.event.extendedProps.fictivuser){
|
||||||
|
// Ajouter l'avatar
|
||||||
|
content.prepend("<img src="+info.event.extendedProps.avatar+" class='eventAvatar'>");
|
||||||
|
content.append("<span class='eventUser float-left small'>"+info.event.extendedProps.username+"</span>");
|
||||||
|
var eventInfo=$(content).children('.eventUser');
|
||||||
|
|
||||||
// Ajouter l'avatar
|
// Ajout container
|
||||||
content.prepend("<img src="+info.event.extendedProps.avatar+" class='eventAvatar'>");
|
content.append("<span class='eventInfo float-right'></span>");
|
||||||
content.append("<span class='eventUser float-left small'>"+info.event.extendedProps.username+"</span>");
|
var eventInfo=$(content).children('.eventInfo');
|
||||||
var eventInfo=$(content).children('.eventUser');
|
|
||||||
|
|
||||||
// Ajout container
|
// Ajouter le verrou si event non editable
|
||||||
content.append("<span style='margin-top:-12px' class='eventInfo float-right'></span>");
|
if(info.event.extendedProps.locked) {
|
||||||
var eventInfo=$(content).children('.eventInfo');
|
eventInfo.append("<i class='fa fa-lock float-right'></i>");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(info.event.extendedProps.externaltrip) {
|
||||||
|
eventInfo.append("<i class='fas fa-bed float-right'></i>");
|
||||||
|
}
|
||||||
|
if(info.event.extendedProps.holiday) {
|
||||||
|
eventInfo.append("<i class='fas fa-umbrella-beach float-right'></i>");
|
||||||
|
}
|
||||||
|
// Ajout estimation
|
||||||
|
eventInfo.append("<span class='eventEstimate float-right small'>"+info.event.extendedProps.estimate+"</span>");
|
||||||
|
|
||||||
// Ajouter le verrou si event non editable
|
}else{
|
||||||
if(info.event.extendedProps.locked) {
|
$(content).addClass('fictive');
|
||||||
eventInfo.append("<i class='fa fa-lock float-right'></i>");
|
$(content).children('.fc-title').remove();
|
||||||
}
|
}
|
||||||
if(info.event.extendedProps.externaltrip) {
|
|
||||||
eventInfo.append("<i class='fas fa-bed float-right'></i>");
|
|
||||||
}
|
|
||||||
if(info.event.extendedProps.holiday) {
|
|
||||||
eventInfo.append("<i class='fas fa-umbrella-beach float-right'></i>");
|
|
||||||
}
|
|
||||||
// Ajout estimation
|
|
||||||
eventInfo.append("<span class='eventEstimate float-right small'>"+info.event.extendedProps.estimate+"</span>");
|
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
|
|
||||||
|
content.attr("data-placement","top");
|
||||||
|
content.attr("data-html",true);
|
||||||
|
content.attr("data-toggle","tooltip");
|
||||||
content.attr("title",info.event.extendedProps.fulldescription);
|
content.attr("title",info.event.extendedProps.fulldescription);
|
||||||
|
content.tooltip()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Formulaire Création d'un événement
|
// Formulaire Création d'un événement
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
Client;Projet;Tâche;Nature;Utilisateur;Année;Semaine;Cumul;
|
Client;Projet;Tâche;Utilisateur;Année;Semaine;Cumul;
|
||||||
{% for project in projects %}
|
{% for project in projects %}
|
||||||
{% if project.weeks_by_task_by_user is defined %}
|
{% if project.weeks_by_task_by_user is defined %}
|
||||||
{% for year,weeks in project.weeks_by_task_by_user %}
|
{% for year,weeks in project.weeks_by_task_by_user %}
|
||||||
{% for week in weeks %}
|
{% for week in weeks %}
|
||||||
{% for task in week.tasks%}
|
{% for task in week.tasks%}
|
||||||
{% for user in task.users%}
|
{% for user in task.users%}
|
||||||
{{project.customer}};{{project.name}};{{task.taskname|replace({"&": "et"})}};{{task.nature}};{{user.displayname}};{{year}};S{{week.weeknumber}};{{user.cumul|replace({".": ","})}};
|
{{project.customer}};{{project.name}};{{task.taskname}};{{user.displayname}};{{year}};S{{week.weeknumber}};{{user.cumul|replace({".": ","})}};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@@ -99,10 +99,9 @@
|
|||||||
<h2>{{ project.displayname }}</h2>
|
<h2>{{ project.displayname }}</h2>
|
||||||
<div class="synthese">
|
<div class="synthese">
|
||||||
Estimé = {{ project.estimate }}<br>
|
Estimé = {{ project.estimate }}<br>
|
||||||
Commandé = {{ project.proposed }}<br>
|
|
||||||
Validé = {{ project.validate }}<br>
|
Validé = {{ project.validate }}<br>
|
||||||
Planifié = {{ project.planified }}<br>
|
Planifié = {{ project.planified }}<br>
|
||||||
<b>RESTE = {{ ( project.proposed - project.validate - project.planified) }}</b>
|
<b>RESTE = {{ (project.estimate - project.validate - project.planified) }}</b>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -14,11 +14,9 @@
|
|||||||
SUIVI HORAIRE
|
SUIVI HORAIRE
|
||||||
</h1>
|
</h1>
|
||||||
<div id="timer" class="card">
|
<div id="timer" class="card">
|
||||||
|
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
<a class="btn btn-success" style="float:right" href={{ path('app_timer_submit') }}>Créer un Timer</a>
|
||||||
<a class="btn btn-success" style="float:right" href={{ path('app_timer_submit') }}>Créer un Timer</a>
|
|
||||||
{% if user %}
|
|
||||||
Lancer un Timer :
|
Lancer un Timer :
|
||||||
<select class="select2entity" id="timer-task" name="timer-task">
|
<select class="select2entity" id="timer-task" name="timer-task">
|
||||||
<option> Tâche </option>
|
<option> Tâche </option>
|
||||||
@@ -30,12 +28,7 @@ SUIVI HORAIRE
|
|||||||
<a href='#' title='Add' id='addtimer'>
|
<a href='#' title='Add' id='addtimer'>
|
||||||
<i class='fas fa-plus-circle'></i>
|
<i class='fas fa-plus-circle'></i>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
|
||||||
Veuillez choisir un Intervenant pour lancer un Timer.
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@@ -277,36 +277,27 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<a>
|
|
||||||
<label class="control-label">
|
|
||||||
Service
|
|
||||||
</label>
|
|
||||||
</a>
|
|
||||||
<div class="select-control">
|
|
||||||
<select class="form-control select2entity" id="sideservice" name="sideservice">
|
|
||||||
<option value="all" selected>Tout les services</option>
|
|
||||||
{% for service in app.session.get('services') %}
|
|
||||||
{% set selected="" %}
|
|
||||||
{%if service.id==app.session.get('idservice') %}
|
|
||||||
{% set selected="selected" %}
|
|
||||||
{% endif %}
|
|
||||||
<option value="{{service.id}}" {{selected}}>{{service.name}}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<a>
|
<a>
|
||||||
<label class="control-label">
|
<label class="control-label">
|
||||||
Intervenant
|
Intervenant
|
||||||
</label>
|
</label>
|
||||||
</a>
|
</a>
|
||||||
<div class="select-control">
|
<div class="select-control">
|
||||||
<select class="form-control select2entity" id="sideuser" name="sideuser">
|
<select class="form-control select2entity" id="sideuser" name="sideuser" multiple>
|
||||||
<option value="all" selected>Tout le monde</option>
|
<option value="all" {%if app.session.get('iduser')=="all" %}selected{% endif %}>Tout le monde</option>
|
||||||
|
|
||||||
{% for user in app.session.get('users') %}
|
{% for user in app.session.get('users') %}
|
||||||
{% set selected="" %}
|
{% set selected="" %}
|
||||||
{%if user.id==app.session.get('iduser') %}
|
{% if app.session.get('selectedusers')|length > 1 %}
|
||||||
{% set selected="selected" %}
|
{% for suser in app.session.get('selectedusers') %}
|
||||||
|
{%if user.id == suser %}
|
||||||
|
{% set selected="selected" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
{%if user.id==app.session.get('iduser') %}
|
||||||
|
{% set selected="selected" %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<option value="{{user.id}}" {{selected}}>{{user.displayname}}</option>
|
<option value="{{user.id}}" {{selected}}>{{user.displayname}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -330,7 +321,23 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<a>
|
||||||
|
<label class="control-label">
|
||||||
|
Service
|
||||||
|
</label>
|
||||||
|
</a>
|
||||||
|
<div class="select-control">
|
||||||
|
<select class="form-control select2entity" id="sideservice" name="sideservice">
|
||||||
|
<option value="all" selected>Tout les services</option>
|
||||||
|
{% for service in app.session.get('services') %}
|
||||||
|
{% set selected="" %}
|
||||||
|
{%if service.id==app.session.get('idservice') %}
|
||||||
|
{% set selected="selected" %}
|
||||||
|
{% endif %}
|
||||||
|
<option value="{{service.id}}" {{selected}}>{{service.name}}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="last"></li>
|
<li class="last"></li>
|
||||||
@@ -513,10 +520,13 @@
|
|||||||
|
|
||||||
$('#sideuser').on('select2:select', function (e) {
|
$('#sideuser').on('select2:select', function (e) {
|
||||||
var data = e.params.data;
|
var data = e.params.data;
|
||||||
|
var selectedusers = $('#sideuser').val();
|
||||||
|
console.log(selectedusers)
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
iduser: data.id,
|
iduser: data.id,
|
||||||
|
selectedusers: selectedusers,
|
||||||
},
|
},
|
||||||
url: "{{ path('app_home_selectuser') }}",
|
url: "{{ path('app_home_selectuser') }}",
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
|
@@ -35,7 +35,4 @@ DATABASE_HOST=%%adresse_ip_mysql
|
|||||||
# CAS = Redefine local
|
# CAS = Redefine local
|
||||||
CAS_HOST=%%eolesso_adresse
|
CAS_HOST=%%eolesso_adresse
|
||||||
CAS_PORT=%%eolesso_port
|
CAS_PORT=%%eolesso_port
|
||||||
CAS_PATH=%%eolesso_cas_folder
|
CAS_PATH=%%eolesso_cas_folder
|
||||||
|
|
||||||
OFFICE_HOUR_START=09:00
|
|
||||||
OFFICE_HOUR_END=17:30
|
|
Reference in New Issue
Block a user