switch task inactives ref #61

This commit is contained in:
2021-03-04 10:17:13 +01:00
parent 5343d61401
commit 94fa9d1f0b
4 changed files with 53 additions and 33 deletions

View File

@@ -13,7 +13,7 @@
thead {
display: table-header-group;
}
tr { page-break-inside: avoid; }
tr { page-break-inside: avoid; }
{%endif%}
{% endblock %}
@@ -30,6 +30,11 @@
<label class="custom-control-label" for="switchactive">Projet Actif</label>
</div>
<div class="custom-control custom-switch float-right" style="margin-right:20px">
<input type="checkbox" class="custom-control-input" id="switchactivetask" {% if app.session.get('activetask') %} checked {% endif %}>
<label class="custom-control-label" for="switchactivetask">Tâche Active</label>
</div>
<p></p>
{%for service in services %}
@@ -44,7 +49,7 @@
{% endif %}
{% set haveproject=true %}
{% endif %}
{% endif %}
{% endfor %}
{% if haveproject and havetask %}
@@ -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 %}
@@ -131,17 +138,20 @@
order: [[ 1, "asc" ]]
});
{%else%}
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
{% endif %}
});
$('#switchactive').change(function() {
window.location="{{ path('app_task_activeproject' )}}";
});
$('#switchactivetask').change(function() {
window.location="{{ path('app_task_activetask' )}}";
});
function myprint() {
href=document.location.href;
document.location.href=href+"?fgprint=true";
}
{% endblock %}
}
{% endblock %}