switch task inactives ref #61
This commit is contained in:
@@ -262,6 +262,10 @@ app_task_activeproject:
|
||||
path: /master/task/activeproject
|
||||
defaults: { _controller: App\Controller\TaskController:activeproject }
|
||||
|
||||
app_task_activetask:
|
||||
path: /master/task/activetask
|
||||
defaults: { _controller: App\Controller\TaskController:activetask }
|
||||
|
||||
#== Event ====================================================================================================
|
||||
app_event:
|
||||
path: /user/event
|
||||
|
@@ -168,6 +168,11 @@ class TaskController extends AbstractController
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
|
||||
public function activetask() {
|
||||
$this->get('session')->set('activetask',!$this->get('session')->get('activetask'));
|
||||
return $this->redirectToRoute($this->route);
|
||||
}
|
||||
|
||||
public function activeoffer() {
|
||||
$this->get('session')->set('activeoffer',!$this->get('session')->get('activeoffer'));
|
||||
return $this->redirectToRoute($this->route);
|
||||
|
@@ -67,6 +67,7 @@ class sessionListener {
|
||||
// Initialisation de la session
|
||||
if($regen) {
|
||||
$session->set('activeproject',true);
|
||||
$session->set('activetask',true);
|
||||
$session->set('activeoffer',true);
|
||||
$session->set('activeholiday',true);
|
||||
$session->set('activetimer',true);
|
||||
|
@@ -30,6 +30,11 @@
|
||||
<label class="custom-control-label" for="switchactive">Projet Actif</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch float-right" style="margin-right:20px">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactivetask" {% if app.session.get('activetask') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactivetask">Tâche Active</label>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
{%for service in services %}
|
||||
@@ -75,6 +80,7 @@
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
{% for task in project.tasks %}
|
||||
{% if app.session.get('activetask')==task.active %}
|
||||
{% set totvalidate=task.validate %}
|
||||
{% set totplanified=task.validate %}
|
||||
{% for event in task.events %}
|
||||
@@ -107,6 +113,7 @@
|
||||
<td class="text-right">{{(task.quantity-totplanified)|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-center" style="background-color:{{task.color}}; color:#ffffff">{{task.color}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -138,6 +145,9 @@
|
||||
$('#switchactive').change(function() {
|
||||
window.location="{{ path('app_task_activeproject' )}}";
|
||||
});
|
||||
$('#switchactivetask').change(function() {
|
||||
window.location="{{ path('app_task_activetask' )}}";
|
||||
});
|
||||
|
||||
|
||||
function myprint() {
|
||||
|
Reference in New Issue
Block a user