Weekly reporting view (#1892)

This commit is contained in:
Kevin Papst
2020-08-16 12:20:33 +02:00
committed by GitHub
parent 2449a1e8bf
commit 2d4cfbe821
39 changed files with 1130 additions and 248 deletions

View File

@@ -15,10 +15,11 @@
{% block box_title %}
{{ form_widget(form.date) }}
{% endblock %}
{% block box_body_class %}monthly-user-list-reporting-box no-padding table-responsive{% endblock %}
{% block box_body_class %}monthly-user-list-reporting-box table-responsive no-padding{% endblock %}
{% block box_body %}
<table class="table table-bordered table-hover dataTable">
<tr>
<th></th>
<th></th>
{% for day in days %}
<th class="text-center text-nowrap{% if day is weekend %} weekend{% endif %}">
@@ -26,7 +27,6 @@
{{ day|date_format('d.m') }}
</th>
{% endfor %}
<th></th>
</tr>
{% for userDay in rows %}
{% set usersMonthDuration = 0 %}
@@ -34,15 +34,25 @@
<td class="text-nowrap">
<strong>{{ widgets.username(userDay.user) }}</strong>
</td>
{% for day in userDay.days %}
{% if day.totalDuration > 0 %}
{% set usersMonthDuration = usersMonthDuration + day.totalDuration %}
{% endif %}
{% endfor %}
<th class="text-nowrap text-center">
{% if usersMonthDuration == 0 %}
-
{% else %}
{{ usersMonthDuration|duration }}
{% endif %}
</th>
{% for day in userDay.days %}
<td class="text-nowrap{% if day.day is weekend %} weekend{% endif %}">
{% if day.totalDuration > 0 %}
{{ day.totalDuration|duration }}
{% set usersMonthDuration = usersMonthDuration + day.totalDuration %}
{% endif %}
</td>
{% endfor %}
<th class="text-nowrap">{{ usersMonthDuration|duration }}</th>
</tr>
{% endfor %}
</table>