Improve inline stats (#3865)

* deactivate timesheet stats if no filter was chosen (otherwise a full table scan would be triggered for each listing display)
* hide duration stat if duration = 0 (timesheet, invoice, export)
This commit is contained in:
Kevin Papst
2023-02-22 11:46:58 +01:00
committed by GitHub
parent 1bc1fadc56
commit cca3fa6b8a
4 changed files with 18 additions and 6 deletions

View File

@@ -41,7 +41,9 @@
{% block status %}
{% from "macros/status.html.twig" import status_duration, status_money %}
{{ status_duration(totalDuration|duration) }}
{% if totalDuration > 0 %}
{{ status_duration(totalDuration|duration) }}
{% endif %}
{% for totalCurrency, totalRate in totalRates %}
{{ status_money(totalRate|money(totalCurrency)) }}
{% endfor %}