Compare commits
34 Commits
api_doliba
...
pkg/stable
Author | SHA1 | Date | |
---|---|---|---|
ebe2a09c30 | |||
a9c8825dfa | |||
4d379a6f76 | |||
00a55a9e67 | |||
7ebdf9ba53 | |||
349f5c26e7 | |||
01f56289b4 | |||
18d993f307 | |||
94fa9d1f0b | |||
5343d61401 | |||
6bd189271f | |||
f8b4d0446d | |||
ce10df9293 | |||
b14fc3d0e1 | |||
164da2ee48 | |||
1fec858f01 | |||
697c7a8f1c | |||
24ecd6c87e | |||
6acf427696 | |||
b17024cccd | |||
cdb2537d3f | |||
2ba143e5a2 | |||
5037b0945e | |||
a0b87b907f | |||
c31d14bff4 | |||
dfa5a993ce | |||
91536ed930 | |||
10cb25730b | |||
937ec6f4ca | |||
7e988ff7a9 | |||
c66962097d | |||
db11d66ae0 | |||
2d42e3016d | |||
ba4acc1b89 |
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
||||
7
|
24
debian/control
vendored
Normal file
24
debian/control
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
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
Normal file
44
debian/copyright
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
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
Normal file
1
debian/eole-schedule.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
usr/share/eole
|
3
debian/gbp.conf
vendored
Normal file
3
debian/gbp.conf
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Set per distribution debian tag
|
||||
[DEFAULT]
|
||||
debian-tag = debian/envole/%(version)s
|
8
debian/rules
vendored
Executable file
8
debian/rules
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@
|
1
debian/schedule-apps.install
vendored
Normal file
1
debian/schedule-apps.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var/www/html
|
1
debian/schedule-sso.install
vendored
Normal file
1
debian/schedule-sso.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
usr/share/sso
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (native)
|
@@ -34,8 +34,8 @@
|
||||
<variable type='string' name='schedule_allow_hosts' description="Hôtes authorisés à utiliser la base de données" multi='True'/>
|
||||
<variable type='string' name='schedule_dbuser' description='Utilisateur du serveur de base de données'/>
|
||||
<variable type='string' name='schedule_dbpass' description='Fichier de mot de passe du serveur'/>
|
||||
<variable type='string' name='schedule_email_global_notif' description='URL de connexion au serveur smtp'/>
|
||||
<variable type='string' name='schedule_email_url' description='Email pour envoie de notifications'/>
|
||||
<variable type='string' name='schedule_email_url' description='URL de connexion au serveur smtp'/>
|
||||
<variable type='string' name='schedule_email_global_notif' description='Email pour envoie de notifications'/>
|
||||
<variable type='string' name="schedule_office_hour_start" description="Heure de début d'une journée">
|
||||
<value>09:00</value>
|
||||
</variable>
|
||||
|
@@ -57,15 +57,10 @@ CAS_EMAIL=email
|
||||
CAS_LASTNAME=lastname
|
||||
CAS_FIRSTNAME=firstname
|
||||
|
||||
###> symfony/swiftmailer-bundle ###
|
||||
# For Gmail as a transport, use: "gmail://username:password@localhost"
|
||||
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
|
||||
# Delivery is disabled by default via "null://localhost"
|
||||
MAILER_URL=
|
||||
|
||||
## Sentry DSN
|
||||
SENTRY_DSN=
|
||||
|
||||
# Dolibar
|
||||
DOLIBARR_ACTIVE=false
|
||||
DOLIBARR_API_KEY=
|
||||
DOLIBARR_URI=
|
||||
|
@@ -9,6 +9,8 @@ import interactionPlugin from '@fullcalendar/interaction';
|
||||
import dayGridPlugin from '@fullcalendar/daygrid';
|
||||
|
||||
var calendar;
|
||||
var e = document.getElementById("sideuser");
|
||||
var iduser = e.value;
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var calendarEl = document.getElementById('fullcalendar');
|
||||
calendar = new Calendar(calendarEl, {
|
||||
@@ -16,11 +18,14 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
locale: frLocale,
|
||||
weekNumbers: true,
|
||||
selectable: true,
|
||||
events: 'event/load',
|
||||
eventLimit:8,
|
||||
eventSources: [{
|
||||
'id': 1,
|
||||
'url': 'event/load/'+iduser,
|
||||
}],
|
||||
eventLimit:8,
|
||||
eventDrop: function(info) {
|
||||
info.revert();
|
||||
},
|
||||
},
|
||||
eventRender: function (info) {
|
||||
eventRender(info);
|
||||
},
|
||||
@@ -33,4 +38,4 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
global.calendar = calendar;
|
||||
calendar.render();
|
||||
});
|
||||
});
|
||||
|
@@ -22,7 +22,7 @@ app_home_selectservice:
|
||||
#== Security ====================================================================================================
|
||||
app_login:
|
||||
path: /login
|
||||
defaults: { _controller: App\Controller\SecurityController:login }
|
||||
defaults: { _controller: App\Controller\SecurityController:login }
|
||||
|
||||
app_logincheck:
|
||||
path: /logincheck
|
||||
@@ -53,11 +53,11 @@ app_crop02:
|
||||
oneup_uploader:
|
||||
resource: .
|
||||
type: uploader
|
||||
|
||||
|
||||
#== Cron ========================================================================================================
|
||||
app_cron:
|
||||
path: /admin/cron
|
||||
defaults: { _controller: App\Controller\CronController:list }
|
||||
defaults: { _controller: App\Controller\CronController:list }
|
||||
|
||||
app_cron_ajax_list:
|
||||
path: /admin/cron/ajax/list
|
||||
@@ -65,16 +65,16 @@ app_cron_ajax_list:
|
||||
|
||||
app_cron_update:
|
||||
path: /admin/cron/update/{id}
|
||||
defaults: { _controller: App\Controller\CronController:update }
|
||||
defaults: { _controller: App\Controller\CronController:update }
|
||||
|
||||
app_cron_exec:
|
||||
path: /admin/cron/exec/{id}
|
||||
defaults: { _controller: App\Controller\CronController:exec }
|
||||
defaults: { _controller: App\Controller\CronController:exec }
|
||||
|
||||
app_cron_log:
|
||||
path: /admin/cron/log/{id}
|
||||
controller: App\Controller\Cron:log
|
||||
defaults: { id: "cron" }
|
||||
defaults: { id: "cron" }
|
||||
|
||||
#== User ========================================================================================================
|
||||
app_user:
|
||||
@@ -147,7 +147,7 @@ app_customer_update:
|
||||
app_customer_delete:
|
||||
path: /master/customer/delete/{id}
|
||||
defaults: { _controller: App\Controller\CustomerController:delete }
|
||||
|
||||
|
||||
#== Job =====================================================================================================
|
||||
app_job:
|
||||
path: /admin/job
|
||||
@@ -186,7 +186,7 @@ app_project_update:
|
||||
app_project_delete:
|
||||
path: /master/project/delete/{id}
|
||||
defaults: { _controller: App\Controller\ProjectController:delete }
|
||||
|
||||
|
||||
app_project_activeproject:
|
||||
path: /master/project/activeproject
|
||||
defaults: { _controller: App\Controller\ProjectController:activeproject }
|
||||
@@ -207,7 +207,7 @@ app_project_users_del:
|
||||
app_project_users:
|
||||
path: /master/project/users/{id}
|
||||
defaults: { _controller: App\Controller\ProjectController:users }
|
||||
|
||||
|
||||
#== Offer ====================================================================================================
|
||||
app_offer:
|
||||
path: /master/offer
|
||||
@@ -224,7 +224,7 @@ app_offer_update:
|
||||
app_offer_delete:
|
||||
path: /master/offer/delete/{id}
|
||||
defaults: { _controller: App\Controller\OfferController:delete }
|
||||
|
||||
|
||||
app_offer_activeproject:
|
||||
path: /master/offer/activeproject
|
||||
defaults: { _controller: App\Controller\OfferController:activeproject }
|
||||
@@ -257,18 +257,22 @@ app_task_update:
|
||||
app_task_delete:
|
||||
path: /master/task/delete/{id}
|
||||
defaults: { _controller: App\Controller\TaskController:delete }
|
||||
|
||||
|
||||
app_task_activeproject:
|
||||
path: /master/task/activeproject
|
||||
defaults: { _controller: App\Controller\TaskController:activeproject }
|
||||
|
||||
app_task_activetask:
|
||||
path: /master/task/activetask
|
||||
defaults: { _controller: App\Controller\TaskController:activetask }
|
||||
|
||||
#== Event ====================================================================================================
|
||||
app_event:
|
||||
path: /user/event
|
||||
defaults: { _controller: App\Controller\EventController:list }
|
||||
|
||||
app_event_load:
|
||||
path: /user/event/load
|
||||
path: /user/event/load/{iduser}
|
||||
defaults: { _controller: App\Controller\EventController:load }
|
||||
|
||||
app_event_submit:
|
||||
@@ -399,13 +403,17 @@ app_timer_delete:
|
||||
|
||||
|
||||
#== Customer ======================================================================================================
|
||||
app_customer_home:
|
||||
path: /customer
|
||||
defaults: { _controller: App\Controller\HomeController:customer }
|
||||
|
||||
app_customer_report:
|
||||
path: /customer/report/{key}
|
||||
defaults: { _controller: App\Controller\ReportController:report, access: 'customer' }
|
||||
|
||||
app_customer_planning:
|
||||
path: /customer/planning/{key}
|
||||
defaults: { _controller: App\Controller\ReportController:planning, access: 'customer' }
|
||||
defaults: { _controller: App\Controller\ReportController:planning, access: 'customer' }
|
||||
|
||||
#== Export ======================================================================================================
|
||||
app_export_view:
|
||||
@@ -414,7 +422,7 @@ app_export_view:
|
||||
|
||||
app_export_penalty_additional:
|
||||
path: /export/export_penalty_additional
|
||||
defaults: { _controller: App\Controller\ExportController:export_penalty_additional }
|
||||
defaults: { _controller: App\Controller\ExportController:export_penalty_additional }
|
||||
|
||||
export_project_weekly:
|
||||
path: /export/export_project_weekly
|
||||
@@ -426,7 +434,11 @@ export_full_worked_days:
|
||||
|
||||
export_offers:
|
||||
path: /export/export_offers
|
||||
defaults: { _controller: App\Controller\ExportController:export_offers }
|
||||
defaults: { _controller: App\Controller\ExportController:export_offers }
|
||||
|
||||
export_month_charged_days:
|
||||
path: /export/export_month_charged_days
|
||||
defaults: { _controller: App\Controller\ExportController:export_month_charged_days }
|
||||
|
||||
|
||||
#== Export ======================================================================================================
|
||||
@@ -437,4 +449,4 @@ app_stat_view:
|
||||
#== API ===========================================================================================================
|
||||
app_api:
|
||||
path: /api/{key}
|
||||
defaults: { _controller: App\Controller\ApiController:api }
|
||||
defaults: { _controller: App\Controller\ApiController:api }
|
||||
|
@@ -36,6 +36,8 @@ __webpack_require__(/*! @fullcalendar/daygrid/main.css */ "./node_modules/@fullc
|
||||
|
||||
|
||||
var calendar;
|
||||
var e = document.getElementById("sideuser");
|
||||
var iduser = e.value;
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var calendarEl = document.getElementById('fullcalendar');
|
||||
calendar = new _fullcalendar_core__WEBPACK_IMPORTED_MODULE_3__["Calendar"](calendarEl, {
|
||||
@@ -43,7 +45,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
locale: _fullcalendar_core_locales_fr_js__WEBPACK_IMPORTED_MODULE_4___default.a,
|
||||
weekNumbers: true,
|
||||
selectable: true,
|
||||
events: 'event/load',
|
||||
events: 'event/load/'+iduser,
|
||||
eventLimit: 8,
|
||||
eventDrop: function eventDrop(info) {
|
||||
info.revert();
|
||||
@@ -86,4 +88,4 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
/***/ })
|
||||
|
||||
},[["./assets/js/fullcalendar.js","runtime","vendors~fullcalendar"]]]);
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvanMvZnVsbGNhbGVuZGFyLmpzIl0sIm5hbWVzIjpbInJlcXVpcmUiLCJjYWxlbmRhciIsImRvY3VtZW50IiwiYWRkRXZlbnRMaXN0ZW5lciIsImNhbGVuZGFyRWwiLCJnZXRFbGVtZW50QnlJZCIsIkNhbGVuZGFyIiwicGx1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ZGF5Z3JpZCc7XG5cbnZhciBjYWxlbmRhcjtcbmRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ0RPTUNvbnRlbnRMb2FkZWQnLCBmdW5jdGlvbigpIHtcbiAgICB2YXIgY2FsZW5kYXJFbCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdmdWxsY2FsZW5kYXInKTtcbiAgICBjYWxlbmRhciA9IG5ldyBDYWxlbmRhcihjYWxlbmRhckVsLCB7XG4gICAgICAgIHBsdWdpbnM6IFsgaW50ZXJhY3Rpb25QbHVnaW4sIGRheUdyaWRQbHVnaW4gXSxcbiAgICAgICAgbG9jYWxlOiBmckxvY2FsZSxcbiAgICAgICAgd2Vla051bWJlcnM6IHRydWUsXG4gICAgICAgIHNlbGVjdGFibGU6IHRydWUsXG4gICAgICAgIGV2ZW50czogJ2V2ZW50L2xvYWQnLFxuICAgICAgICBldmVudExpbWl0OjQsIFxuICAgICAgICBldmVudERyb3A6IGZ1bmN0aW9uKGluZm8pIHtcbiAgICAgICAgICAgIGluZm8ucmV2ZXJ0KCk7XG4gICAgICAgIH0sICAgICAgICBcbiAgICAgICAgZXZlbnRSZW5kZXI6IGZ1bmN0aW9uIChpbmZvKSB7XG4gICAgICAgICAgICBldmVudFJlbmRlcihpbmZvKTtcbiAgICAgICAgfSxcbiAgICAgICAgc2VsZWN0OiBmdW5jdGlvbihzZWxlY3Rpb25JbmZvKSB7XG4gICAgICAgICAgICBldmVudFNlbGVjdChzZWxlY3Rpb25JbmZvKTtcbiAgICAgICAgfSxcbiAgICAgICAgZXZlbnRDbGljazogZnVuY3Rpb24oaW5mbykge1xuICAgICAgICAgICAgZXZlbnRDbGljayhpbmZvKTtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIGdsb2JhbC5jYWxlbmRhciA9IGNhbGVuZGFyO1xuICAgIGNhbGVuZGFyLnJlbmRlcigpO1xufSk7ICBcbiJdLCJzb3VyY2VSb290IjoiIn0=
|
||||
//# sourceMappingURL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iAgICAgICAgfSxcbiAgICAgICAgZXZlbnRDbGljazogZnVuY3Rpb24oaW5mbykge1xuICAgICAgICAgICAgZXZlbnRDbGljayhpbmZvKTtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIGdsb2JhbC5jYWxlbmRhciA9IGNhbGVuZGFyO1xuICAgIGNhbGVuZGFyLnJlbmRlcigpO1xufSk7ICBcbiJdLCJzb3VyY2VSb290IjoiIn0=
|
||||
|
@@ -20,10 +20,7 @@ APP_SECRET=52c1cb88ee822cd2643abe29e16a68a6
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> symfony/mailer ###
|
||||
MAILER_METHOD=sendmail
|
||||
MAILER_URL=
|
||||
MAILER_NOREPLY=noreply@noreply.fr
|
||||
MAILER_DEFAULT_NOTIF=
|
||||
# MAILER_DSN=smtp://localhost
|
||||
###< symfony/mailer ###
|
||||
|
||||
###< doctrine/doctrine-bundle ###
|
||||
@@ -35,6 +32,16 @@ APP_NAME=Schedule
|
||||
APP_ENV=PROD
|
||||
APP_CRON=false
|
||||
|
||||
# Office hours
|
||||
OFFICE_HOUR_START=09:00
|
||||
OFFICE_HOUR_END=17:30
|
||||
|
||||
# MAIL sendmail / smtp
|
||||
MAILER_METHOD=sendmail
|
||||
MAILER_URL=
|
||||
MAILER_NOREPLY=noreply@noreply.fr
|
||||
MAILER_DEFAULT_NOTIF=
|
||||
|
||||
# BDD
|
||||
DATABASE_NAME=
|
||||
DATABASE_USER=
|
||||
@@ -45,14 +52,15 @@ DATABASE_HOST=
|
||||
CAS_HOST=
|
||||
CAS_PORT=
|
||||
CAS_PATH=
|
||||
|
||||
OFFICE_HOUR_START=09:00
|
||||
OFFICE_HOUR_END=17:30
|
||||
CAS_USERNAME=username
|
||||
CAS_EMAIL=email
|
||||
CAS_LASTNAME=lastname
|
||||
CAS_FIRSTNAME=firstname
|
||||
|
||||
## Sentry DSN
|
||||
SENTRY_DSN=
|
||||
|
||||
## Dolibarr
|
||||
# Dolibar
|
||||
DOLIBARR_ACTIVE=false
|
||||
DOLIBARR_API_KEY=
|
||||
DOLIBARR_URI=
|
||||
|
@@ -174,10 +174,10 @@ while($row=$queryold->fetch()) {
|
||||
$nature=$row["task_nature"];
|
||||
if($row["task_id"]<=-70) $nature=-200;
|
||||
if($row["task_id"]==-85 || $row["task_id"]==-70) $nature=-190;
|
||||
$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, active) VALUES (?,?,?,?,?,?,?,?)";
|
||||
$quantity=($row["task_quantity"]==0?null:$row["task_quantity"]);
|
||||
$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, 1]);
|
||||
}
|
||||
|
||||
writeligne("");
|
||||
|
@@ -19,7 +19,7 @@ class EventController extends AbstractController
|
||||
private $entity = "App:Event";
|
||||
private $notificator;
|
||||
|
||||
public function __construct(\App\Service\notificationService $notificator) {
|
||||
public function __construct(\App\Service\notificationService $notificator) {
|
||||
$this->notificator = $notificator;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class EventController extends AbstractController
|
||||
$users = $em->getRepository("App:User")->findAll();
|
||||
$tasks = $em->getRepository("App:Task")->findAll();
|
||||
$projects= $em->getRepository("App:Project")->findBy(["active"=>true]);
|
||||
|
||||
|
||||
return $this->render($this->render.'list.html.twig',[
|
||||
"useheader" => true,
|
||||
"usesidebar" => true,
|
||||
@@ -38,13 +38,13 @@ class EventController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
public function load(Request $request)
|
||||
public function load($iduser, Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$tbevents=[];
|
||||
$start = $request->query->get('start');
|
||||
$end = $request->query->get('end');
|
||||
$iduser=$this->get("session")->get("iduser");
|
||||
//$iduser=$this->get("session")->get("iduser");
|
||||
// Evenements
|
||||
if($iduser=="all") {
|
||||
$events=$em->getRepository("App:Event")->findAll();
|
||||
@@ -72,16 +72,16 @@ class EventController extends AbstractController
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
// Filtre par project
|
||||
|
||||
|
||||
if($this->get('session')->get('idproject')!="all") {
|
||||
$idproject=$event->getTask()->getProject()->getId();
|
||||
if($idproject!=$this->get('session')->get('idproject'))
|
||||
@@ -144,7 +144,7 @@ class EventController extends AbstractController
|
||||
$output=["return"=>"KO","error"=>"Tâche inconnu"];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
|
||||
// Convertir les dates string en date
|
||||
$datestart=new \DateTime($start);
|
||||
$dateend =new \DateTime($end);
|
||||
@@ -291,9 +291,9 @@ class EventController extends AbstractController
|
||||
$output=$this->formatEvent($event);
|
||||
}
|
||||
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
@@ -321,8 +321,8 @@ class EventController extends AbstractController
|
||||
$output=["return"=>"KO","error"=>"Tâche inconnue"];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
// Astreinte
|
||||
|
||||
// Astreinte
|
||||
if($fgastreinte) {
|
||||
// Recherche de l'event
|
||||
$penalty = $em->getRepository("App:Penalty")->find($idevent);
|
||||
@@ -418,10 +418,10 @@ class EventController extends AbstractController
|
||||
$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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Modification de l'évenement
|
||||
$event->setStart($datestart);
|
||||
$event->setEnd($dateend);
|
||||
@@ -431,14 +431,14 @@ class EventController extends AbstractController
|
||||
$event->setExternalTrip($externaltrip);
|
||||
$event->setUser($user);
|
||||
$event->setTask($task);
|
||||
|
||||
|
||||
$em->persist($event);
|
||||
$em->flush();
|
||||
|
||||
$output=$this->formatEvent($event);
|
||||
}
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
|
||||
public function delete(Request $request)
|
||||
@@ -449,7 +449,7 @@ class EventController extends AbstractController
|
||||
$idevent = str_replace("A","",$request->request->get('idevent'));
|
||||
$fgastreinte = ($request->request->get('fgastreinte')=="true");
|
||||
|
||||
// Astreinte
|
||||
// Astreinte
|
||||
if($fgastreinte) {
|
||||
// Recherche de l'event
|
||||
$penalty = $em->getRepository("App:Penalty")->find($idevent);
|
||||
@@ -488,19 +488,20 @@ class EventController extends AbstractController
|
||||
}
|
||||
|
||||
$output=[];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
|
||||
public function formatEvent($event) {
|
||||
$editable=(!($event->getValidate())&&!($event->getValidateholiday()));
|
||||
|
||||
$event instanceof Penalty ? $editable=(!($event->getValidate())) : ($editable=(!($event->getValidate())&&!($event->getValidateholiday())));
|
||||
|
||||
|
||||
// Si l'utilisateur en cours est différent de celui de l'event = seul MASTER - ADMIN peuvent modifier
|
||||
if($event->getUser()!=$this->getUser()) {
|
||||
if(!$this->isGranted('ROLE_ADMIN')&&!$this->isGranted('ROLE_MASTER'))
|
||||
$editable=false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$tmp= [
|
||||
"id"=> ($event instanceof Penalty?"A":"").$event->getId(),
|
||||
"title" => ($event instanceof Penalty?"ASTREINTE = ":"").$event->getTask()->getDisplayname(),
|
||||
@@ -522,7 +523,7 @@ class EventController extends AbstractController
|
||||
"taskid" => $event->getTask()->getId(),
|
||||
"avatar" => "/".$this->getParameter("appAlias")."/uploads/avatar/".$event->getUser()->getAvatar(),
|
||||
"estimate" => !$event->getTask()->getNature()->getIsvacation() ? $event->getTask()->getDuration($event->getEnd())." / ".$event->getTask()->getQuantity(): "",
|
||||
"locked" => $event->getValidate()||$event->getValidateholiday(),
|
||||
"locked" => ($event instanceof Penalty?$event->getValidate():$event->getValidate()||$event->getValidateholiday()),
|
||||
"editable" => $editable,
|
||||
"astreinte" => ($event instanceof Penalty)
|
||||
]
|
||||
@@ -532,7 +533,7 @@ class EventController extends AbstractController
|
||||
|
||||
public function formatBreakday($event) {
|
||||
$editable=false;
|
||||
|
||||
|
||||
$tmp= [
|
||||
"id"=> "B".$event->getId(),
|
||||
"title" => "Jour Férié",
|
||||
@@ -577,5 +578,5 @@ class EventController extends AbstractController
|
||||
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -473,5 +473,58 @@ class ExportController extends AbstractController
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function export_month_charged_days(Request $request,$access=null): Response {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$nbmonth=$this->get("session")->get("nbmonth");
|
||||
|
||||
$tbevents=[];
|
||||
// On formate le tableau des event
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$start->setTime(0,0,0);
|
||||
$end = new \Datetime('first day of this month');
|
||||
$end->add(new \DateInterval('P1M'));
|
||||
$end->setTime(23,59,0);
|
||||
|
||||
$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();
|
||||
|
||||
foreach($events as $event) {
|
||||
if (!isset($tbevents[$event->getStart()->format("m")])) {
|
||||
$tbevents[$event->getStart()->format("m")]["f"]=0;
|
||||
$tbevents[$event->getStart()->format("m")]["nf"]=0;
|
||||
}
|
||||
if ($event->getTask()->getNature()->getName() == "Prestation") {
|
||||
if (!isset($tbevents[$event->getStart()->format("m")])){
|
||||
|
||||
$tbevents[$event->getStart()->format("m")]['f'] = $event->getDuration();
|
||||
}else{
|
||||
$tbevents[$event->getStart()->format("m")]['f'] += $event->getDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if ($event->getTask()->getNature()->getName() != "Prestation") {
|
||||
if (!isset($tbevents[$event->getStart()->format("m")])){
|
||||
$tbevents[$event->getStart()->format("m")]['nf'] = $event->getDuration();
|
||||
}else{
|
||||
$tbevents[$event->getStart()->format("m")]['nf'] += $event->getDuration();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$csv = $this->renderView('Export/export_month_charged_days.csv.twig', ["events" => $tbevents]);
|
||||
$response = new Response($csv);
|
||||
$response->headers->set('Content-Type', 'text/csv; charset=utf-8');
|
||||
$response->headers->set('Content-Disposition', 'attachment; filename="export_month_charged_days.csv"');
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -25,13 +25,21 @@ class HomeController extends AbstractController
|
||||
*/
|
||||
}
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->render('Home/customer.html.twig',[
|
||||
"useheader" => true,
|
||||
"usesidebar" => false,
|
||||
]);
|
||||
}
|
||||
|
||||
public function selectmonth(Request $request)
|
||||
{
|
||||
$nbmonth = $request->request->get('nbmonth');
|
||||
$this->get('session')->set('nbmonth',$nbmonth);
|
||||
$output=["return"=>"OK"];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
}
|
||||
|
||||
public function selectuser(Request $request)
|
||||
{
|
||||
@@ -39,7 +47,7 @@ class HomeController extends AbstractController
|
||||
$this->get('session')->set('iduser',$iduser);
|
||||
$output=["return"=>"OK"];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
}
|
||||
|
||||
public function selectproject(Request $request)
|
||||
{
|
||||
@@ -47,7 +55,7 @@ class HomeController extends AbstractController
|
||||
$this->get('session')->set('idproject',$idproject);
|
||||
$output=["return"=>"OK"];
|
||||
return new Response(json_encode($output));
|
||||
}
|
||||
}
|
||||
|
||||
public function selectservice(Request $request)
|
||||
{
|
||||
|
@@ -121,7 +121,7 @@ class ReportController extends AbstractController
|
||||
$st->add(new \DateInterval('P1D'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// On formate le tableau des astreintes
|
||||
$start=new \Datetime('first day of this month');
|
||||
@@ -206,7 +206,7 @@ class ReportController extends AbstractController
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
return $this->render('Report/synthese.html.twig',[
|
||||
"useheader" => true,
|
||||
"usesidebar" => ($this->getUser()),
|
||||
@@ -255,9 +255,11 @@ class ReportController extends AbstractController
|
||||
|
||||
// Ne pas prendre les projects sans event dans la durée
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->setTime(0,0,0);
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->sub(new \DateInterval('P1D'));
|
||||
$end->setTime(23,59,0);
|
||||
$events = $em
|
||||
->createQueryBuilder('event')
|
||||
->select('event')
|
||||
@@ -291,9 +293,11 @@ class ReportController extends AbstractController
|
||||
|
||||
// Formater les mois
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->setTime(0,0,0);
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->sub(new \DateInterval('P1D'));
|
||||
$end->setTime(23,59,0);
|
||||
while($start<$end) {
|
||||
$tbproject["months"][$start->format("Ym")]=[
|
||||
"monthid"=> $start->format("Ym"),
|
||||
@@ -323,7 +327,7 @@ class ReportController extends AbstractController
|
||||
->from('App:Event','event')
|
||||
->Where('task.project=:project')
|
||||
->andWhere('event.task=task')
|
||||
->andWhere('event.end >=:start')
|
||||
->andWhere('event.start >=:start')
|
||||
->andWhere('event.end <:end')
|
||||
->setParameter('project',$project)
|
||||
->setParameter('start',$start)
|
||||
@@ -343,10 +347,11 @@ class ReportController extends AbstractController
|
||||
|
||||
// Formater les jours
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->setTime(0,0,0);
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->sub(new \DateInterval('P1D'));
|
||||
|
||||
$end->setTime(23,59,0);
|
||||
while($start<$end) {
|
||||
$tbday=[
|
||||
"date"=>clone $start,
|
||||
@@ -367,7 +372,7 @@ class ReportController extends AbstractController
|
||||
|
||||
$tbproject["months"][$start->format("Ym")]["users"][$user->getId()]["days"][$start->format("Ymd")]=$tbday;
|
||||
}
|
||||
|
||||
|
||||
$start->add(new \DateInterval('P1D'));
|
||||
}
|
||||
$tbprojects[$project->getId()]=$tbproject;
|
||||
@@ -375,10 +380,12 @@ class ReportController extends AbstractController
|
||||
|
||||
// Formater les utilisateurs
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->setTime(0,0,0);
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->sub(new \DateInterval('P1D'));
|
||||
|
||||
$end->setTime(23,59,0);
|
||||
|
||||
foreach($users as $user) {
|
||||
$tbevents = $this->getEventuser($user,$start,$end,false);
|
||||
|
||||
@@ -543,7 +550,7 @@ class ReportController extends AbstractController
|
||||
"offers"=>[],
|
||||
"weeks"=>[],
|
||||
];
|
||||
|
||||
|
||||
// Somme event validé avant la date
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
@@ -632,14 +639,14 @@ class ReportController extends AbstractController
|
||||
}
|
||||
$tbproject["weeks"][$event->getStart()->format("Y")][$event->getStart()->format("W")]["cumul"] = $tbproject["weeks"][$event->getStart()->format("Y")][$event->getStart()->format("W")]["cumul"]+$event->getDuration();
|
||||
}
|
||||
|
||||
|
||||
// Somme astreintes validé par semaine
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$start->setTime(0,0,0);
|
||||
$endmonth = new \Datetime('first day of this month');
|
||||
$endmonth->add(new \DateInterval('P1M'));
|
||||
|
||||
|
||||
$penaltybyweek = $em
|
||||
|
||||
->createQueryBuilder('penalty')
|
||||
@@ -681,7 +688,7 @@ class ReportController extends AbstractController
|
||||
];
|
||||
$tbproject["weeks_by_name"][$penalty->getStart()->format("Y")][$penalty->getStart()->format("W")]["users"][$penalty->getUser()->getId()] = $tbuser;
|
||||
}
|
||||
|
||||
|
||||
$tbproject["weeks_by_name"][$penalty->getStart()->format("Y")][$penalty->getStart()->format("W")]["users"][$penalty->getUser()->getId()]["cumul"] = $tbproject["weeks_by_name"][$penalty->getStart()->format("Y")][$penalty->getStart()->format("W")]["users"][$penalty->getUser()->getId()]["cumul"]+$penalty->getDuration();
|
||||
}
|
||||
|
||||
@@ -845,7 +852,7 @@ class ReportController extends AbstractController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($request->query->get('fgprint')) {
|
||||
$render = $this->renderView('Report/report.html.twig',[
|
||||
"useheader" => true,
|
||||
|
@@ -97,7 +97,7 @@ class SecurityController extends AbstractController
|
||||
$user->setPassword("CASPWD-".$username);
|
||||
$user->setSalt("CASPWD-".$username);
|
||||
|
||||
$user->setRole("ROLE_USER");
|
||||
$user->setRoles(["ROLE_VISITOR"]);
|
||||
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
@@ -125,8 +125,13 @@ class SecurityController extends AbstractController
|
||||
// Redirection
|
||||
if($redirect)
|
||||
return $this->redirect($redirect);
|
||||
else
|
||||
return $this->redirect($this->generateUrl('app_home'));
|
||||
else {
|
||||
$roles=$user->getRoles();
|
||||
if(!in_array("ROLE_VISITOR",$roles))
|
||||
return $this->redirect($this->generateUrl('app_home'));
|
||||
else
|
||||
return $this->redirect($this->generateUrl('app_customer_home'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -31,13 +31,13 @@ class TaskController extends AbstractController
|
||||
"services" => $services,
|
||||
"useheader" => true,
|
||||
"usesidebar" => true,
|
||||
"fgprint" => true,
|
||||
"fgprint" => true,
|
||||
]);
|
||||
|
||||
return new PdfResponse(
|
||||
$this->knpSnappy->getOutputFromHtml($render,["orientation"=>"Landscape"]),
|
||||
'taches.pdf'
|
||||
);
|
||||
);
|
||||
}
|
||||
else {
|
||||
return $this->render($this->render.'list.html.twig',[
|
||||
@@ -55,35 +55,36 @@ class TaskController extends AbstractController
|
||||
$data = new Entity();
|
||||
$defaultnature = $em->getRepository("App:Nature")->findOneBy(['name' => 'Prestation']);
|
||||
$data->setNature($defaultnature);
|
||||
$data->setActive(true);
|
||||
// Création du formulaire
|
||||
$form = $this->createForm(Form::class,$data,array("mode"=>"submit"));
|
||||
|
||||
// Récupération des data du formulaire
|
||||
$form->handleRequest($request);
|
||||
|
||||
|
||||
// Sur erreur
|
||||
$this->getErrorForm(null,$form,$request,$data,"submit");
|
||||
|
||||
|
||||
// Sur validation
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
$data = $form->getData();
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
$data = $form->getData();
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
||||
// Retour à la liste
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
|
||||
|
||||
// Affichage du formulaire
|
||||
return $this->render($this->render.'edit.html.twig', [
|
||||
'useheader' => true,
|
||||
'usesidebar' => true,
|
||||
'usesidebar' => true,
|
||||
$this->data => $data,
|
||||
'mode' => 'submit',
|
||||
'form' => $form->createView()
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function update($id,Request $request)
|
||||
{
|
||||
// Initialisation de l'enregistrement
|
||||
@@ -98,43 +99,43 @@ class TaskController extends AbstractController
|
||||
|
||||
// Sur erreur
|
||||
$this->getErrorForm(null,$form,$request,$data,"update");
|
||||
|
||||
|
||||
// Sur validation
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
$data = $form->getData();
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
$data = $form->getData();
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
||||
// Retour à la liste
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
|
||||
|
||||
// Affichage du formulaire
|
||||
if($request->query->get('fgprint')) {
|
||||
$render = $this->renderView($this->render.'edit.html.twig', [
|
||||
'useheader' => true,
|
||||
'usesidebar' => true,
|
||||
'usesidebar' => true,
|
||||
$this->data => $data,
|
||||
'mode' => 'update',
|
||||
'form' => $form->createView(),
|
||||
"fgprint" => true,
|
||||
"fgprint" => true,
|
||||
]);
|
||||
|
||||
return new PdfResponse(
|
||||
$this->knpSnappy->getOutputFromHtml($render),
|
||||
'tache.pdf'
|
||||
);
|
||||
);
|
||||
}
|
||||
else {
|
||||
return $this->render($this->render.'edit.html.twig', [
|
||||
'useheader' => true,
|
||||
'usesidebar' => true,
|
||||
'usesidebar' => true,
|
||||
$this->data => $data,
|
||||
'mode' => 'update',
|
||||
'form' => $form->createView()
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function delete($id,Request $request)
|
||||
{
|
||||
@@ -160,13 +161,18 @@ class TaskController extends AbstractController
|
||||
// Retour à la liste
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function activeproject() {
|
||||
$this->get('session')->set('activeproject',!$this->get('session')->get('activeproject'));
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
|
||||
public function activetask() {
|
||||
$this->get('session')->set('activetask',!$this->get('session')->get('activetask'));
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
|
||||
public function activeoffer() {
|
||||
$this->get('session')->set('activeoffer',!$this->get('session')->get('activeoffer'));
|
||||
return $this->redirectToRoute($this->route);
|
||||
@@ -188,5 +194,5 @@ class TaskController extends AbstractController
|
||||
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -70,7 +70,11 @@ class Task
|
||||
* @ORM\OneToMany(targetEntity="Penalty", mappedBy="task", cascade={"persist"}, orphanRemoval=false)
|
||||
*/
|
||||
private $penaltys;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="active", type="boolean")
|
||||
*
|
||||
*/
|
||||
private $active;
|
||||
/**
|
||||
* Calculate Displayname
|
||||
*/
|
||||
@@ -227,6 +231,19 @@ class Task
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getActive(): ?bool
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
public function setActive(bool $active): self
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Collection|Penalty[]
|
||||
|
@@ -56,6 +56,13 @@ class TaskType extends AbstractType
|
||||
"choice_label" => "name",
|
||||
]
|
||||
);
|
||||
|
||||
$builder->add("active",
|
||||
ChoiceType::class,[
|
||||
"label" => "Actif",
|
||||
"choices" => ["Non"=>false, "Oui"=>true]
|
||||
]
|
||||
);
|
||||
|
||||
$builder->add('color',
|
||||
TextType::class, [
|
||||
|
@@ -33,7 +33,7 @@ class sessionListener {
|
||||
$haverole=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $haverole;
|
||||
}
|
||||
|
||||
@@ -67,11 +67,12 @@ class sessionListener {
|
||||
// Initialisation de la session
|
||||
if($regen) {
|
||||
$session->set('activeproject',true);
|
||||
$session->set('activetask',true);
|
||||
$session->set('activeoffer',true);
|
||||
$session->set('activeholiday',true);
|
||||
$session->set('activetimer',true);
|
||||
$session->set('nbmonth',3);
|
||||
|
||||
|
||||
if($curentuser!="anon.") {
|
||||
if(in_array("ROLE_USER",$roles))
|
||||
$session->set('iduser',$curentuser->getId());
|
||||
@@ -86,7 +87,7 @@ class sessionListener {
|
||||
$session->set('idproject',"all");
|
||||
$session->set('idservice',"all");
|
||||
}
|
||||
|
||||
|
||||
$tbusers=[];
|
||||
$users=$this->em->getRepository('App:User')->findAll();
|
||||
foreach($users as $user) {
|
||||
@@ -99,7 +100,7 @@ class sessionListener {
|
||||
}
|
||||
}
|
||||
$session->set('users',$tbusers);
|
||||
|
||||
|
||||
$tbprojects=[];
|
||||
$projects=$this->em->getRepository('App:Project')->findBy(["active"=>true]);
|
||||
foreach($projects as $project) {
|
||||
@@ -110,7 +111,7 @@ class sessionListener {
|
||||
array_push($tbprojects,$tmp);
|
||||
}
|
||||
$session->set('projects',$tbprojects);
|
||||
|
||||
|
||||
$tbservices=[];
|
||||
$services=$this->em->getRepository('App:Service')->findAll();
|
||||
foreach($services as $service) {
|
||||
@@ -120,8 +121,8 @@ class sessionListener {
|
||||
];
|
||||
array_push($tbservices,$tmp);
|
||||
}
|
||||
$session->set('services',$tbservices);
|
||||
|
||||
$session->set('services',$tbservices);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,10 +18,10 @@
|
||||
.fc-content {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
|
||||
.fc-title {
|
||||
font-weight: bolder;
|
||||
font-size: 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.eventAvatar {
|
||||
@@ -30,7 +30,7 @@
|
||||
float: left;
|
||||
}
|
||||
|
||||
.eventInfo{
|
||||
.eventInfo{
|
||||
margin: -5px 5px 0px 0px;
|
||||
clear: both;
|
||||
}
|
||||
@@ -39,7 +39,7 @@
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.eventEstimate {
|
||||
.eventEstimate {
|
||||
margin: -3px 10px;
|
||||
}
|
||||
.select2-results__group {
|
||||
@@ -76,7 +76,7 @@
|
||||
</label>
|
||||
<select class="select2entity" id="usersubmit" name="usersubmit">
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MASTER') or is_granted('ROLE_VALIDATOR')%}
|
||||
|
||||
|
||||
{% for user in app.session.get('users') %}
|
||||
{% set selected="" %}
|
||||
{%if user.id==app.session.get('iduser') %}
|
||||
@@ -99,11 +99,13 @@
|
||||
{% for project in projects|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||
<optgroup label="{{project.displayname}}">
|
||||
{% for task in project.tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||
{% if task.active %}
|
||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -112,27 +114,27 @@
|
||||
<input type="checkbox" class="custom-control-input" id="amsubmit">
|
||||
<label class="custom-control-label" for="amsubmit">Evènement sur la matinée</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="apsubmit">
|
||||
<label class="custom-control-label" for="apsubmit">Evènement sur l'après-midi</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="astreinte">
|
||||
<label class="custom-control-label" for="astreinte">Astreinte</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="externaltrip">
|
||||
<label class="custom-control-label" for="externaltrip">Déplacement externe</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">
|
||||
@@ -145,7 +147,7 @@
|
||||
|
||||
<input type="hidden" id="start" name="start" class="form-control" value="">
|
||||
<input type="hidden" id="end" name="end" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -160,7 +162,7 @@
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<button onClick="eventUpdate()" class="btn btn-success">Valider</button>
|
||||
<button onClick="" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
|
||||
@@ -172,7 +174,7 @@
|
||||
Intervenant<span class="mandatory">*</span>
|
||||
</label>
|
||||
<select class="select2entity" id="userupdate" name="userupdate">
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MASTER') or is_granted('ROLE_VALIDATOR')%}
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MASTER') or is_granted('ROLE_VALIDATOR')%}
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}">{{user.displayname}}</option>
|
||||
{% endfor %}
|
||||
@@ -201,7 +203,7 @@
|
||||
<input type="checkbox" class="custom-control-input" id="amupdate">
|
||||
<label class="custom-control-label" for="amupdate">Evènement sur la matinée</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
@@ -214,7 +216,7 @@
|
||||
<input type="checkbox" class="custom-control-input" id="externaltripupdate">
|
||||
<label class="custom-control-label" for="externaltripupdate">Déplacement externe</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">
|
||||
Description
|
||||
@@ -225,7 +227,7 @@
|
||||
|
||||
<input type="hidden" id="idevent" name="idevent" class="form-control" value="">
|
||||
<input type="hidden" id="fgastreinte" name="fgastreinte" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -241,25 +243,25 @@ $(document).ready(function() {
|
||||
$("#modalsubmit #user").select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
});
|
||||
|
||||
$("#modalsubmit #task").select2({
|
||||
placeholder: "Selectionnez un projet",
|
||||
allowClear: true,
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
});
|
||||
|
||||
$("#modalupdate #user").select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
});
|
||||
|
||||
$("#modalupdate #task").select2({
|
||||
placeholder: "Selectionnez un projet",
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Rendu d'un évenement
|
||||
@@ -274,7 +276,7 @@ function eventRender(info) {
|
||||
content.append("<span class='eventUser float-left small'>"+info.event.extendedProps.username+"</span>");
|
||||
var eventInfo=$(content).children('.eventUser');
|
||||
|
||||
// Ajout container
|
||||
// Ajout container
|
||||
content.append("<span style='margin-top:-12px' class='eventInfo float-right'></span>");
|
||||
var eventInfo=$(content).children('.eventInfo');
|
||||
|
||||
@@ -315,7 +317,7 @@ function eventSelect(selectionInfo) {
|
||||
}
|
||||
|
||||
// Valeur par défaut
|
||||
{% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') or is_granted('ROLE_MASTER')) and app.session.get('iduser')!="all" %}
|
||||
{% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') or is_granted('ROLE_MASTER')) and app.session.get('iduser')!="all" %}
|
||||
$('#usersubmit').val({{app.session.get('iduser')}}).trigger("change");
|
||||
{% else %}
|
||||
$('#usersubmit').val({{app.user.id}}).trigger("change");
|
||||
@@ -339,7 +341,7 @@ function eventSelect(selectionInfo) {
|
||||
|
||||
$('#modalsubmit #start').val(start.format("YYYY-MM-DD"));
|
||||
$('#modalsubmit #end').val(end.format("YYYY-MM-DD"));
|
||||
|
||||
|
||||
$('#modalsubmit #description').val("");
|
||||
$('#modalsubmit #externaltrip').prop("checked",false);
|
||||
|
||||
@@ -367,7 +369,7 @@ function eventClick(info) {
|
||||
$('#userupdate').val(userid).trigger("change");
|
||||
$('#taskupdate').val(taskid).trigger("change");
|
||||
$('#modalupdate #idevent').val(id);
|
||||
|
||||
|
||||
$('#modalupdate #fgastreinte').val(fgastreinte);
|
||||
$('#modalupdate #description').val(description);
|
||||
if (holiday) {
|
||||
@@ -407,7 +409,7 @@ function eventClick(info) {
|
||||
$('#modalupdate #apupdate').prop("checked",true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Formulaire de création d'un évènement
|
||||
$('#modalupdate').modal();
|
||||
}
|
||||
@@ -431,7 +433,7 @@ function eventSubmit() {
|
||||
}
|
||||
|
||||
if(!error) {
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: $("#usersubmit").val(),
|
||||
@@ -442,7 +444,7 @@ function eventSubmit() {
|
||||
ap: $("#modalsubmit #apsubmit").prop("checked"),
|
||||
astreinte: $("#modalsubmit #astreinte").prop("checked"),
|
||||
externaltrip: $("#modalsubmit #externaltrip").prop("checked"),
|
||||
description: $("#modalsubmit #description").val()
|
||||
description: $("#modalsubmit #description").val()
|
||||
},
|
||||
url: "{{ path('app_event_submit') }}",
|
||||
success: function (response) {
|
||||
@@ -451,7 +453,7 @@ function eventSubmit() {
|
||||
$("#modalsubmit .modal-body").append("<div class='alert alert-danger' style='margin: 5px 0px'>"+response.error+"</div>");
|
||||
}
|
||||
else {
|
||||
calendar.addEvent(response);
|
||||
calendar.addEvent(response,1);
|
||||
calendar.render;
|
||||
$('#modalsubmit').modal('hide');
|
||||
}
|
||||
@@ -464,7 +466,7 @@ function eventSubmit() {
|
||||
function eventUpdate() {
|
||||
$("#modalupdate .alert").remove();
|
||||
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idevent: $("#modalupdate #idevent").val(),
|
||||
@@ -474,7 +476,7 @@ function eventUpdate() {
|
||||
ap: $("#modalupdate #apupdate").prop("checked"),
|
||||
fgastreinte: $("#modalupdate #fgastreinte").val(),
|
||||
externaltrip: $("#modalupdate #externaltripupdate").prop("checked"),
|
||||
description: $("#modalupdate #description").val()
|
||||
description: $("#modalupdate #description").val()
|
||||
},
|
||||
url: "{{ path('app_event_update') }}",
|
||||
success: function (response) {
|
||||
@@ -484,8 +486,8 @@ function eventUpdate() {
|
||||
}
|
||||
else {
|
||||
var event = calendar.getEventById($("#modalupdate #idevent").val());
|
||||
event.remove();
|
||||
|
||||
event.remove();
|
||||
|
||||
calendar.addEvent(response);
|
||||
calendar.render;
|
||||
$('#modalupdate').modal('hide');
|
||||
@@ -498,7 +500,7 @@ function eventUpdate() {
|
||||
function eventDelete() {
|
||||
$("#modalupdate .alert").remove();
|
||||
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idevent: $("#modalupdate #idevent").val(),
|
||||
@@ -512,7 +514,7 @@ function eventDelete() {
|
||||
}
|
||||
else {
|
||||
var event = calendar.getEventById($("#modalupdate #idevent").val());
|
||||
event.remove();
|
||||
event.remove();
|
||||
$('#modalupdate').modal('hide');
|
||||
}
|
||||
}
|
||||
@@ -537,4 +539,4 @@ $("#astreinte").change(function() {
|
||||
}
|
||||
});
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -0,0 +1,6 @@
|
||||
{% block body %}
|
||||
Mois;Jours_facturés;Jour_non_facturés
|
||||
{% for month, event in events %}
|
||||
{{month}};{{event.f}};{{event.nf}}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
@@ -43,4 +43,14 @@ EXPORTS DE DONNEES
|
||||
</div>
|
||||
</div>
|
||||
<p></p>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<a class="btn btn-success" href={{ path('export_month_charged_days') }}>Export des jours facturés/non-facturés</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>Exporter la liste du nombre de jours facturés et non-facturés par mois</p>
|
||||
<p>Filtres utiles : Nombre de mois</p>
|
||||
</div>
|
||||
</div>
|
||||
<p></p>
|
||||
{% endblock %}
|
8
src/schedule-2.0/templates/Home/customer.html.twig
Normal file
8
src/schedule-2.0/templates/Home/customer.html.twig
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<center>Merci d'utiliser l'URL qui vous a été communiquée pour visualiser votre rapport.</center>
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -59,7 +59,7 @@
|
||||
}
|
||||
.astreinte {
|
||||
height: 12px;
|
||||
font-size: 10px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
@@ -68,7 +68,7 @@
|
||||
float:none !important;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
|
||||
table { width:100%; font-size:10px;}
|
||||
|
||||
.card-header .synthese {
|
||||
@@ -83,14 +83,13 @@
|
||||
.small { font-size:10px;}
|
||||
|
||||
h4 {
|
||||
padding-top: 20px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
{% if fgprint is defined and fgprint %}<h1>Planning</h1>{%endif%}
|
||||
{% if access=="customer" and not app.user %}
|
||||
@@ -104,7 +103,7 @@
|
||||
{% for i in 1..48 %}
|
||||
{% set selected="" %}
|
||||
{%if i==app.session.get('nbmonth') %}
|
||||
{% set selected="selected" %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{i}}" {{selected}}>{{i}}</option>
|
||||
{% endfor %}
|
||||
@@ -126,8 +125,6 @@
|
||||
<div class="card-body">
|
||||
<h3>RAPPORT</h3>
|
||||
<div class="small">
|
||||
|
||||
<div class="new-page"> </div>
|
||||
|
||||
{% for month in project.months %}
|
||||
<h3 class="month">{{ month.monthlabel }}</h3>
|
||||
@@ -179,21 +176,15 @@
|
||||
<td class="text-right">{{ month.totala|number_format(2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td style="min-width:200px">TOTAL</td>
|
||||
<td class="text-right" style="min-width:100px">{{ (month.total + month.totala)|number_format(2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
<h4>CUMUL HEBDOMADAIRE</h4>
|
||||
<table>
|
||||
{% for year, weeks in project.weeks %}
|
||||
@@ -204,22 +195,21 @@
|
||||
{% for week in weeks %}
|
||||
<th class="text-center">
|
||||
S{{ week.weeknumber}}
|
||||
</th>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</thead>
|
||||
<tr class="text-center">
|
||||
<td class="text-center">
|
||||
|
||||
|
||||
</td>
|
||||
{% for week in weeks %}
|
||||
<td class="text-center">
|
||||
{{ week.cumul}}
|
||||
</td>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="new-page"> </div>
|
||||
{% if not project.offers is empty %}
|
||||
<h4>COMMANDES</h4>
|
||||
{% set count=(project.offers|length)-8 %}
|
||||
@@ -236,15 +226,15 @@
|
||||
</thead>
|
||||
{% set tot=0 %}
|
||||
{% for offer in project.offers %}
|
||||
{% if loop.index<count %}
|
||||
{% if loop.index<count %}
|
||||
{% set totbefore10=totbefore10+offer.quantity %}
|
||||
{% if loop.index+1==count %}
|
||||
<tr>
|
||||
<td colspan="2">Précédente</td>
|
||||
<td class="text-right">{{ totbefore10|number_format(2, '.', ' ') }}</td>
|
||||
|
||||
|
||||
<td class="text-right">
|
||||
{% if decovalidate >= totbefore10 %}
|
||||
{% if decovalidate >= totbefore10 %}
|
||||
{{ totbefore10|number_format(2, '.', ' ') }}
|
||||
{% set todel=totbefore10 %}
|
||||
{% else %}
|
||||
@@ -272,9 +262,9 @@
|
||||
<td>{{ offer.name }}</td>
|
||||
<td>{{ offer.ref }}</td>
|
||||
<td class="text-right">{{ offer.quantity|number_format(2, '.', ' ') }}</td>
|
||||
|
||||
|
||||
<td class="text-right">
|
||||
{% if decovalidate >= offer.quantity %}
|
||||
{% if decovalidate >= offer.quantity %}
|
||||
{{ offer.quantity|number_format(2, '.', ' ') }}
|
||||
{% set todel=offer.quantity %}
|
||||
{% else %}
|
||||
@@ -299,9 +289,9 @@
|
||||
<td>{{ offer.name }}</td>
|
||||
<td>{{ offer.ref }}</td>
|
||||
<td class="text-right">{{ offer.quantity|number_format(2, '.', ' ') }}</td>
|
||||
|
||||
|
||||
<td class="text-right">
|
||||
{% if decovalidate >= 0 %}
|
||||
{% if decovalidate >= 0 %}
|
||||
{{ decovalidate|number_format(2, '.', ' ') }}
|
||||
{% set todel=decovalidate %}
|
||||
{% else %}
|
||||
@@ -316,7 +306,7 @@
|
||||
{% set decoproposed=decoproposed-totbefore10 %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<tfoot>
|
||||
@@ -326,8 +316,6 @@
|
||||
<td class="text-right">{{ (project.proposed - project.validate)|number_format(2, '.', ' ') }}</td>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div class="new-page"> </div>
|
||||
{% endif %}
|
||||
<h4>CONSOMMATION PASSEE</h4>
|
||||
{% if project.hors!=0 %}
|
||||
@@ -358,7 +346,6 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
{% if not project.beforeastreinte is empty %}
|
||||
<h4>ASTREINTES PASSEES</h4>
|
||||
@@ -389,6 +376,8 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="new-page"> </div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<br>
|
||||
|
@@ -54,6 +54,7 @@
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.project) }}
|
||||
{{ form_row(form.nature) }}
|
||||
{{ form_row(form.active) }}
|
||||
{{ form_row(form.quantity) }}
|
||||
{{ form_row(form.color) }}
|
||||
</div>
|
||||
|
@@ -13,7 +13,7 @@
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
|
||||
{% endblock %}
|
||||
@@ -30,6 +30,11 @@
|
||||
<label class="custom-control-label" for="switchactive">Projet Actif</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch float-right" style="margin-right:20px">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactivetask" {% if app.session.get('activetask') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactivetask">Tâche Active</label>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
{%for service in services %}
|
||||
@@ -44,7 +49,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% set haveproject=true %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if haveproject and havetask %}
|
||||
@@ -63,6 +68,7 @@
|
||||
<th width="100px">Nature</th>
|
||||
<th width="100px">Projet</th>
|
||||
<th>Tâche</th>
|
||||
<th>Actif</th>
|
||||
<th width="100px" class="text-center no-string">Estimation</th>
|
||||
<th width="100px" class="text-center no-string">Validé</th>
|
||||
<th width="100px" class="text-center no-string">Planifié</th>
|
||||
@@ -74,6 +80,7 @@
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
{% for task in project.tasks %}
|
||||
{% if app.session.get('activetask')==task.active %}
|
||||
{% set totvalidate=task.validate %}
|
||||
{% set totplanified=task.validate %}
|
||||
{% for event in task.events %}
|
||||
@@ -99,12 +106,14 @@
|
||||
<td>{{task.nature.name}}</td>
|
||||
<td>{{task.project.name}}</td>
|
||||
<td>{{task.name}}</td>
|
||||
<td>{{task.active ? "actif":"non-actif"}}</td>
|
||||
<td class="text-right">{{task.quantity|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{(totvalidate*-1)|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{((totplanified-totvalidate)*-1)|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{(task.quantity-totplanified)|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-center" style="background-color:{{task.color}}; color:#ffffff">{{task.color}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -129,17 +138,20 @@
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
$('#switchactive').change(function() {
|
||||
window.location="{{ path('app_task_activeproject' )}}";
|
||||
});
|
||||
$('#switchactivetask').change(function() {
|
||||
window.location="{{ path('app_task_activetask' )}}";
|
||||
});
|
||||
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
||||
}
|
||||
{% endblock %}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
{% block head_style %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% endblock head_style %}
|
||||
@@ -90,7 +90,7 @@
|
||||
color: #CFD8DC;
|
||||
font-size: 16px;
|
||||
padding: 0px 10px 0px 10px;
|
||||
display: block;
|
||||
display: block;
|
||||
text-transform: uppercase;
|
||||
margin-left: 0px !important;
|
||||
font-weight: bold;
|
||||
@@ -130,26 +130,26 @@
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.contentsidebar {
|
||||
.contentsidebar {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
#sidebar {
|
||||
position: static;
|
||||
margin:0px -15px;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a.btn {
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 992px) {
|
||||
#sidebar {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{% if useheader is defined and useheader %}
|
||||
#main {
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
|
||||
th.dt-center, td.dt-center { text-align: center; }
|
||||
|
||||
|
||||
|
||||
.new-page {display:none;}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
@@ -171,7 +171,7 @@
|
||||
border :1px solid transparent;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
|
||||
#sidebar,.navbar,.sf-toolbar {
|
||||
display: none;
|
||||
}
|
||||
@@ -189,8 +189,8 @@
|
||||
.homecard {
|
||||
display:inline-block;
|
||||
float:none;
|
||||
}
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
{% block localstyle %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -216,7 +216,7 @@
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
{% if app.user %}
|
||||
{% if app.user and ("ROLE_USER" in app.user.roles or "ROLE_MASTER" in app.user.roles or "ROLE_VALIDATOR" in app.user.roles or "ROLE_ADMIN" in app.user.roles)%}
|
||||
<li>
|
||||
<a href="{{path("app_user_profil")}}">
|
||||
<img src="\{{appAlias}}\uploads\avatar\{{app.user.avatar}}" class="avatar">
|
||||
@@ -246,7 +246,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
{% set contentsidebar="" %}
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
{% set contentsidebar="contentsidebar" %}
|
||||
|
||||
|
||||
<div id="sidebar" class="collapse">
|
||||
<ul style="padding-bottom:70px" class="nav">
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') or is_granted('ROLE_MASTER') or is_granted('ROLE_USER') %}
|
||||
@@ -271,7 +271,7 @@
|
||||
{% for i in 1..48 %}
|
||||
{% set selected="" %}
|
||||
{%if i==app.session.get('nbmonth') %}
|
||||
{% set selected="selected" %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{i}}" {{selected}}>{{i}}</option>
|
||||
{% endfor %}
|
||||
@@ -321,7 +321,7 @@
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sideproject" name="sideproject">
|
||||
<option value="all" selected>Tous les projets</option>
|
||||
{% for project in app.session.get('projects') %}
|
||||
{% for project in app.session.get('projects')|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||
{% set selected="" %}
|
||||
{%if project.id==app.session.get('idproject') %}
|
||||
{% set selected="selected" %}
|
||||
@@ -330,24 +330,24 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="last"></li>
|
||||
|
||||
|
||||
<li class="title">Planning</li>
|
||||
<li>
|
||||
<a href="{{path("app_synthese")}}">
|
||||
<i class="fa fa-id-card"></i>Synthese
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_planning")}}">
|
||||
<i class="fa fa-tachometer-alt"></i>Planning
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_report")}}">
|
||||
<i class="fa fa-pen-square"></i>Rapport
|
||||
@@ -377,7 +377,7 @@
|
||||
<i class="fas fa-chart-line"></i>Statistiques
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_export_view")}}">
|
||||
<i class="fa fa-file-download"></i>Exports
|
||||
@@ -405,7 +405,7 @@
|
||||
<a href="{{path("app_validationtimer")}}">
|
||||
<i class="fa fa-user-clock"></i>Validation Horaires
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -422,13 +422,13 @@
|
||||
<a href="{{path("app_project")}}">
|
||||
<i class="fa fa-suitcase"></i>Projets
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_offer")}}">
|
||||
<i class="fa fa-euro-sign"></i>Commandes
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_task")}}">
|
||||
@@ -476,13 +476,13 @@
|
||||
{%endif%}
|
||||
|
||||
|
||||
<div id="mycontent" class="content {{contentsidebar}}">
|
||||
<div id="mycontent" class="content {{contentsidebar}}">
|
||||
{% block body %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
|
||||
@@ -505,7 +505,7 @@
|
||||
$('#sidemonth').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
console.log(data.id);
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
nbmonth: data.id,
|
||||
@@ -515,11 +515,11 @@
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideuser').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: data.id,
|
||||
@@ -529,11 +529,11 @@
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideproject').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idproject: data.id,
|
||||
@@ -543,11 +543,11 @@
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideservice').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idservice: data.id,
|
||||
@@ -557,7 +557,7 @@
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
Reference in New Issue
Block a user