Release 2.23.0 (#5075)

This commit is contained in:
Kevin Papst
2024-10-03 10:34:20 +02:00
committed by GitHub
parent 40154be8f9
commit fb9a0dc499
142 changed files with 855 additions and 910 deletions

View File

@@ -1,41 +1,30 @@
{% extends 'reporting/layout.html.twig' %}
{% import "macros/datatables.html.twig" as tables %}
{% set showMoneyBudget = is_granted('budget_money', 'project') %}
{% set showTimeBudget = is_granted('budget_time', 'project') %}
{% set viewRevenue = is_granted('view_rate_other_timesheet') %}
{% set columns = {
'name': {'class': 'alwaysVisible'},
'name': {'class': 'alwaysVisible'},
} %}
{% if showTimeBudget %}
{% if is_granted('budget_time', 'project') %}
{% set columns = columns|merge({
'timeBudget': {'class': 'd-none d-md-table-cell', 'title': 'timeBudget'|trans},
'timeBudget': {'class': 'd-none d-md-table-cell', 'title': 'timeBudget'|trans},
}) %}
{% endif %}
{% if showMoneyBudget %}
{% if is_granted('budget_money', 'project') %}
{% set columns = columns|merge({
'budget': {'class': 'd-none d-md-table-cell', 'title': 'budget'|trans},
'budget': {'class': 'd-none d-md-table-cell', 'title': 'budget'|trans},
}) %}
{% endif %}
{% set columns = columns|merge({
'duration': {'class': 'text-end hw-min w-min', 'title': 'stats.durationMonth'|trans, 'columnClass': 'w-min'},
'duration': {'class': 'text-center hw-min', 'title': 'duration'|trans, 'columnClass': 'w-min'},
}) %}
{% if showMoneyBudget %}
{% if is_granted('view_rate_other_timesheet') %}
{% set columns = columns|merge({
'rate': {'class': 'text-end hw-min w-min', 'title': 'stats.amountMonth'|trans, 'columnClass': 'w-min'},
'revenue': {'class': 'text-center hw-min', 'columnClass': 'w-min'},
'costs': {'class': 'text-center hw-min', 'columnClass': 'w-min'},
'profit': {'class': 'text-center hw-min', 'columnClass': 'w-min'},
}) %}
{% endif %}
{% set columns = columns|merge({
'duration': {'class': 'text-center hw-min', 'title': 'stats.durationMonth'|trans, 'columnClass': 'w-min'},
}) %}
{% if viewRevenue %}
{% set columns = columns|merge({
'rate': {'class': 'text-center hw-min', 'title': 'stats.amountMonth'|trans, 'columnClass': 'w-min'},
}) %}
{% endif %}
{% set columns = columns|merge({
'billable': {'class': 'd-none d-sm-table-cell text-center hw-min w-min', 'columnClass': 'w-min'},
'actions': {'class': 'actions alwaysVisible'},
}) %}
{% set tableName = 'project_daterange_reporting' %}
@@ -95,10 +84,12 @@
{{ widgets.label_project(project) }}
{% elseif name == 'duration' %}
{{ entry.statistic.duration|duration }}
{% elseif name == 'rate' %}
{{ entry.statistic.rate|money(currency) }}
{% elseif name == 'billable' %}
{{ widgets.percent(entry.statistic.rate, entry.statistic.rateBillable) }}
{% elseif name == 'revenue' %}
{{ entry.statistic.rateBillable|money(currency) }}
{% elseif name == 'costs' %}
{{ entry.statistic.internalRate|money(currency) }}
{% elseif name == 'profit' %}
{{ (entry.statistic.rateBillable - entry.statistic.internalRate)|money(currency) }}
{% elseif name == 'timeBudget' %}
{% if is_granted('time', project) %}
{{ progress.progressbar_timebudget(entry) }}

View File

@@ -98,7 +98,7 @@
<ul class="nav nav-pills" data-bs-toggle="tabs">
<li class="nav-item"><a class="nav-link active" data-chart="{{ chartPrefix }}Duration" href="#time-chart-{{ id }}" data-bs-toggle="tab">{{ 'stats.workingTime'|trans }}</a></li>
{% if view_revenue %}
<li class="nav-item"><a class="nav-link" data-chart="{{ chartPrefix }}Rate" href="#revenue-chart-{{ id }}" data-bs-toggle="tab">{{ 'stats.revenue'|trans }}</a></li>
<li class="nav-item"><a class="nav-link" data-chart="{{ chartPrefix }}Rate" href="#revenue-chart-{{ id }}" data-bs-toggle="tab">{{ 'revenue'|trans }}</a></li>
{% endif %}
{% if see_users %}
<li class="nav-item"><a class="nav-link" data-chart="{{ chartPrefix }}User" href="#user-chart-{{ id}}" data-bs-toggle="tab">{{ 'user'|trans }}</a></li>
@@ -307,7 +307,7 @@
<li class="nav-item"><a class="nav-link" data-chart="{{ chartPrefix }}Duration" href="#time-chart" data-bs-toggle="tab">{{ 'stats.workingTime'|trans }}</a></li>
{% endif %}
{% if showTotalRevenueChart %}
<li class="nav-item"><a class="nav-link" data-chart="{{ chartPrefix }}Rate" href="#revenue-chart" data-bs-toggle="tab">{{ 'stats.revenue'|trans }}</a></li>
<li class="nav-item"><a class="nav-link" data-chart="{{ chartPrefix }}Rate" href="#revenue-chart" data-bs-toggle="tab">{{ 'revenue'|trans }}</a></li>
{% endif %}
{% if see_users and project_details.userStats|length > 0 %}
<li class="nav-item"><a class="nav-link" data-chart="{{ chartPrefix }}User" href="#user-chart" data-bs-toggle="tab">{{ 'user'|trans }}</a></li>

View File

@@ -17,9 +17,9 @@
'amountTotal': {'title': 'stats.amountTotal'|trans},
'billableMoney': {'title': 'billable'|trans},
'internalRate': {'title': 'internalRate'|trans},
'revenue': {'title': ('stats.revenue'|trans ~ ' (' ~ 'billable'|trans ~ ' - ' ~ 'internalRate'|trans ~ ')')},
'revenue': {'title': ('revenue'|trans ~ ' (' ~ 'billable'|trans ~ ' - ' ~ 'internalRate'|trans ~ ')')},
'hourlyBillable': {'title': ('hourlyRate'|trans ~ ' (' ~ 'billable'|trans ~ ' / ' ~ 'stats.durationTotal'|trans ~ ')')},
'hourlyTotal': {'title': ('hourlyRate'|trans ~ ' (' ~ 'stats.revenue'|trans ~ ' / ' ~ 'stats.durationTotal'|trans ~ ')')},
'hourlyTotal': {'title': ('hourlyRate'|trans ~ ' (' ~ 'revenue'|trans ~ ' / ' ~ 'stats.durationTotal'|trans ~ ')')},
'invoiced': {'title': 'not_invoiced'|trans},
}) %}
{% endif %}

View File

@@ -1,4 +1,5 @@
{%- set with_avatar = avatar is defined ? avatar : true -%}
{%- set show_empty_rows = true -%}
{%- set absoluteDuration = 0 -%}
{%- set absoluteInternalRate = 0 -%}
{%- set absoluteRate = 0 -%}
@@ -38,7 +39,7 @@
{% set usersTotalDuration = 0 %}
{% set usersTotalInternalRate = 0 %}
{% set usersTotalRate = 0 %}
{% for period in attribute(userPeriod, period_attribute) %}
{% for period in userPeriod.data %}
{% set usersTotalDuration = usersTotalDuration + period.totalDuration %}
{% set absoluteDuration = absoluteDuration + period.totalDuration %}
{% set usersTotalInternalRate = usersTotalInternalRate + period.totalInternalRate %}
@@ -50,7 +51,7 @@
{% set totalsInternalRate = totalsInternalRate|merge({(reportDateKey): (totalsInternalRate[reportDateKey] + period.totalInternalRate)}) %}
{% set totalsRate = totalsRate|merge({(reportDateKey): (totalsRate[reportDateKey] + period.totalRate)}) %}
{% endfor %}
{% if userPeriod.user.enabled or usersTotalDuration != 0 %}
{% if (show_empty_rows and userPeriod.user.enabled) or usersTotalDuration != 0 %}
<tr class="user">
{% if with_avatar %}
<td class="w-avatar">
@@ -73,7 +74,7 @@
{% block total_duration_user %}{% endblock %}
{% endif %}
</td>
{% for period in attribute(userPeriod, period_attribute) %}
{% for period in userPeriod.data %}
<td class="text-nowrap text-center day-total{% block period_cell_class %}{% endblock %}"{% block period_cell_attribute %}{% endblock %}>
{% if period.totalDuration != 0 or period.totalRate != 0 or period.totalInternalRate != 0 %}
{% if dataType == 'rate' %}