{% extends '@Approval/layout.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% from '@Approval/macros.html.twig' import status_color_class %} {% block report_title %}{{ report_title|trans }}{% endblock %} {% block report %} {% if approvePreviousWeeksMessage and approvePreviousWeeksMessage < (current | date_format('Y-m-d')) %} {{ widgets.callout('danger', 'warning.add_to_approve_previous_weeks'|trans) }} {% endif %} {% if selectedUserSundayIssue %} {{ widgets.callout('danger', 'warning.selected_user_sunday_issue'|trans) }} {% endif %} {% if currentUserSundayIssue %} {{ widgets.callout('danger', 'warning.currentUserSundayIssue'|trans) }} {% endif %}
{% for day in days.dateTimes %} | {{ day|date_weekday }} | {% set columns = columns + 1 %} {% set totals = totals|merge({(day|report_date): 0}) %} {% endfor %}|
---|---|---|
{{ title }} | {{ project.duration|duration }} | {% for day in project.days.days %}{% if day.duration > 0 %} {% set totals = totals|merge({(day.date|report_date): (totals[day.date|report_date] + day.duration)}) %} {{ day.duration|duration }} {% endif %} | {% endfor %}
{{ key }} | {{ row.duration|duration }} | {% for day in row.days.days %}{% if day.duration > 0 %} {{ day.duration|duration }} {% endif %} | {% endfor %}
{{ 'stats.duration_total'|trans }} {% if expectedDuration is not empty %}[{{ 'stats.duration_expected'|trans }}] {% endif %} | {{ totals['totals']|duration }}{% if expectedDuration is not empty %} [{{ expectedDuration|duration }}]{% endif %} | {% for day in days.dateTimes %}{{ totals[day|report_date]|duration }} {% if errors[(day | date_format('Y-m-d'))] is defined and (errors[(day | date_format('Y-m-d'))] | length) > 0 %} {% endif %} | {% endfor %}
{{ 'label.yearly_overtime'|trans }} | {{ yearDiff|duration }} | {% for day in days.dateTimes %}{% endfor %} |