diff --git a/src/Controller/ReportingController.php b/src/Controller/ReportingController.php index f75206c8..1cafaa75 100644 --- a/src/Controller/ReportingController.php +++ b/src/Controller/ReportingController.php @@ -65,17 +65,7 @@ final class ReportingController extends AbstractController return false; } - $currentUser = $this->getUser(); - - if ($currentUser->canSeeAllData()) { - return true; - } - - if ($currentUser->hasTeamAssignment()) { - return true; - } - - return false; + return true; } /** diff --git a/templates/reporting/layout.html.twig b/templates/reporting/layout.html.twig index 11a65b4e..b376ba74 100644 --- a/templates/reporting/layout.html.twig +++ b/templates/reporting/layout.html.twig @@ -7,7 +7,7 @@ {% block main %}
-
+
{% block report %}{% endblock %}
diff --git a/templates/reporting/month_by_user.html.twig b/templates/reporting/month_by_user.html.twig index 04da63f9..09f5b369 100644 --- a/templates/reporting/month_by_user.html.twig +++ b/templates/reporting/month_by_user.html.twig @@ -21,7 +21,7 @@ {% endblock %} {% block box_title %} {% if form.user is defined %} - {{ form_widget(form.user) }} + {{ form_row(form.user, {'label': false}) }} {% else %} {{ widgets.username(user) }} {% endif %} @@ -34,8 +34,8 @@ {% else %} - - + + {% for day in days %} {% for project in rows %} - + - + {% for day in project.days %} - {% for activity in project.activities %} - + - + {% for day in activity.days %} - + {% for day in days %} {% set total = total + day.totalDuration %} {% endfor %} - + {% for day in days %} -
   {{ day.day|day_name(true) }}
@@ -44,13 +44,13 @@ {% endfor %}
{{ widgets.label_project(project.project) }} {{ project.duration|duration }}{{ project.duration|duration }} + {% if day.duration > 0 %} {{ day.duration|duration }} {% endif %} @@ -58,13 +58,13 @@ {% endfor %}
{{ widgets.label_activity(activity.activity) }} {{ activity.duration|duration }}{{ activity.duration|duration }} + {% if day.duration > 0 %} {{ day.duration|duration }} {% endif %} @@ -74,14 +74,14 @@ {% endfor %} {% endfor %} {% set total = 0 %} -
{{ total|duration }}{{ total|duration }} + {% if day.totalDuration > 0 %} {{ day.totalDuration|duration }} {% endif %} diff --git a/templates/reporting/monthly_user_list.html.twig b/templates/reporting/monthly_user_list.html.twig index b82e641d..5d745375 100644 --- a/templates/reporting/monthly_user_list.html.twig +++ b/templates/reporting/monthly_user_list.html.twig @@ -19,8 +19,8 @@ {% block box_body %} - - + + {% for day in days %} {% for userDay in rows %} {% set usersMonthDuration = 0 %} - + @@ -39,15 +39,13 @@ {% set usersMonthDuration = usersMonthDuration + day.totalDuration %} {% endif %} {% endfor %} - {% for day in userDay.days %} -
   {{ day|day_name(true) }}
@@ -30,7 +30,7 @@
{{ widgets.username(userDay.user) }} - {% if usersMonthDuration == 0 %} - - - {% else %} - {{ usersMonthDuration|duration }} + + {% if usersMonthDuration > 0 %} + {{ usersMonthDuration|duration }} {% endif %} + {% if day.totalDuration > 0 %} {{ day.totalDuration|duration }} {% endif %} diff --git a/templates/reporting/week_by_user.html.twig b/templates/reporting/week_by_user.html.twig index 60599536..12a85934 100644 --- a/templates/reporting/week_by_user.html.twig +++ b/templates/reporting/week_by_user.html.twig @@ -21,7 +21,7 @@ {% endblock %} {% block box_title %} {% if form.user is defined %} - {{ form_widget(form.user) }} + {{ form_row(form.user, {'label': false}) }} {% else %} {{ widgets.username(user) }} {% endif %} @@ -34,8 +34,8 @@ {% else %} - - + + {% for day in days %} {% for project in rows %} - + - + {% for day in project.days %} - {% for activity in project.activities %} - + - + {% for day in activity.days %} - + {% for day in days %} {% set total = total + day.totalDuration %} {% endfor %} - + {% for day in days %} -
   {{ day.day|day_name(true) }}
@@ -44,13 +44,13 @@ {% endfor %}
{{ widgets.label_project(project.project) }} {{ project.duration|duration }}{{ project.duration|duration }} + {% if day.duration > 0 %} {{ day.duration|duration }} {% endif %} @@ -58,13 +58,13 @@ {% endfor %}
{{ widgets.label_activity(activity.activity) }} {{ activity.duration|duration }}{{ activity.duration|duration }} + {% if day.duration > 0 %} {{ day.duration|duration }} {% endif %} @@ -74,14 +74,14 @@ {% endfor %} {% endfor %} {% set total = 0 %} -
{{ total|duration }}{{ total|duration }} + {% if day.totalDuration > 0 %} {{ day.totalDuration|duration }} {% endif %}