change isWeekend() handling to use work-hour configuration (#4261)

This commit is contained in:
Bruno Paré-Simard
2023-08-31 07:38:58 -04:00
committed by GitHub
parent 18d953e79b
commit 452de88e18
5 changed files with 41 additions and 42 deletions

View File

@@ -3,7 +3,7 @@
{% block report_content %}
{% embed 'reporting/user_list_period_data.html.twig' with {stats: stats, dataType: dataType, period_attribute: period_attribute, subReportRoute: subReportRoute, subReportDate: subReportDate, decimal: decimal} only %}
{% block period_name %}
<th class="text-center text-nowrap{% if column is weekend %} weekend{% endif %}{% if column is today %} today{% endif %}">
<th class="text-center text-nowrap{% if column is today %} today{% endif %}">
{{ column|date_weekday }}
</th>
{% endblock %}
@@ -25,6 +25,6 @@
{% block duration %}
{{ period.totalDuration|duration(decimal) }}
{% endblock %}
{% block period_cell_class %}{% if period.date is weekend %} weekend{% endif %}{% if period.date is today %} today{% endif %}{% endblock %}
{% block period_cell_class %}{% if period.date is weekend(userPeriod.user) %} weekend{% endif %}{% if period.date is today %} today{% endif %}{% endblock %}
{% endembed %}
{% endblock %}