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