From c63a671dc460dd34027f8dcdd5c1e15cb49bcf97 Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 18 Aug 2023 16:42:16 +0200 Subject: [PATCH] goodie manager needs to see shifts and worklogs from users --- includes/view/User_view.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 8f1e8c43..83421e9a 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -394,12 +394,10 @@ function User_view_myshifts( } } - if ($its_me || $admin_user_worklog_privilege) { - foreach ($user_worklogs as $worklog) { - $key = $worklog->worked_at->timestamp . '-worklog-' . $worklog->id; - $myshifts_table[$key] = User_view_worklog($worklog, $admin_user_worklog_privilege); - $timeSum += $worklog->hours * 3600; - } + foreach ($user_worklogs as $worklog) { + $key = $worklog->worked_at->timestamp . '-worklog-' . $worklog->id; + $myshifts_table[$key] = User_view_worklog($worklog, $admin_user_worklog_privilege); + $timeSum += $worklog->hours * 3600; } if (count($myshifts_table) > 0) { @@ -505,7 +503,7 @@ function User_view( $user_source->personalData->first_name ) . ' ' . htmlspecialchars($user_source->personalData->last_name); $myshifts_table = ''; - if ($its_me || $admin_user_privilege) { + if ($its_me || $admin_user_privilege || $tshirt_admin) { $my_shifts = User_view_myshifts( $shifts, $user_source,