{% extends 'reporting/report_user_list_layout.html.twig' %}

{% block report_content %}
    {% embed 'reporting/user_list_period_data.html.twig' with {stats: stats, dataType: dataType, period_attribute: period_attribute, subReportDate: subReportDate, decimal: decimal} only %}
        {% block period_name %}
            <th class="text-center text-nowrap">
                <a href="{{ path('report_monthly_users', {'date': column|report_date, 'sumType': dataType}) }}">
                    {{ column|month_name }}<br>
                    {{ column|date_format('Y') }}
                </a>
            </th>
        {% endblock %}
        {% block total_rate_user %}
            <a href="{{ path('report_user_year', {'sumType': dataType, 'date': create_date(subReportDate.format('Y') ~'-01-01')|report_date, 'user': userPeriod.user.id}) }}">
                {{ usersTotalRate|money }}
            </a>
        {% endblock %}
        {% block total_internal_rate_user %}
            <a href="{{ path('report_user_year', {'sumType': dataType, 'date': create_date(subReportDate.format('Y') ~'-01-01')|report_date, 'user': userPeriod.user.id}) }}">
                {{ usersTotalInternalRate|money }}
            </a>
        {% endblock %}
        {% block total_duration_user %}
            <a href="{{ path('report_user_year', {'sumType': dataType, 'date': create_date(subReportDate.format('Y') ~'-01-01')|report_date, 'user': userPeriod.user.id}) }}">
                {{ usersTotalDuration|duration(decimal) }}
            </a>
        {% endblock %}
        {% block rate %}
            <a href="{{ path('report_user_month', {'sumType': dataType, 'date': create_date(period.date.format('Y') ~'-'~period.date.format('m')~'-01')|report_date, 'user': userPeriod.user.id}) }}" data-toggle="tooltip" title="{{ 'billable'|trans }}: {{ period.billableDuration|duration(decimal) }}">
                {{ period.totalRate|money }}
            </a>
        {% endblock %}
        {% block internal_rate %}
            <a href="{{ path('report_user_month', {'sumType': dataType, 'date': create_date(period.date.format('Y') ~'-'~period.date.format('m')~'-01')|report_date, 'user': userPeriod.user.id}) }}" data-toggle="tooltip" title="{{ 'billable'|trans }}: {{ period.billableDuration|duration(decimal) }}">
                {{ period.totalInternalRate|money }}
            </a>
        {% endblock %}
        {% block duration %}
            <a href="{{ path('report_user_month', {'sumType': dataType, 'date': create_date(period.date.format('Y') ~'-'~period.date.format('m')~'-01')|report_date, 'user': userPeriod.user.id}) }}" data-toggle="tooltip" title="{{ 'billable'|trans }}: {{ period.billableDuration|duration(decimal) }}">
                {{ period.totalDuration|duration(decimal) }}
            </a>
        {% endblock %}
    {% endembed %}
{% endblock %}
