goodie manager needs to see shifts and worklogs from users

This commit is contained in:
msquare 2023-08-18 16:42:16 +02:00
parent 009b0f3f27
commit c63a671dc4
1 changed files with 5 additions and 7 deletions

View File

@ -394,12 +394,10 @@ function User_view_myshifts(
} }
} }
if ($its_me || $admin_user_worklog_privilege) { foreach ($user_worklogs as $worklog) {
foreach ($user_worklogs as $worklog) { $key = $worklog->worked_at->timestamp . '-worklog-' . $worklog->id;
$key = $worklog->worked_at->timestamp . '-worklog-' . $worklog->id; $myshifts_table[$key] = User_view_worklog($worklog, $admin_user_worklog_privilege);
$myshifts_table[$key] = User_view_worklog($worklog, $admin_user_worklog_privilege); $timeSum += $worklog->hours * 3600;
$timeSum += $worklog->hours * 3600;
}
} }
if (count($myshifts_table) > 0) { if (count($myshifts_table) > 0) {
@ -505,7 +503,7 @@ function User_view(
$user_source->personalData->first_name $user_source->personalData->first_name
) . ' ' . htmlspecialchars($user_source->personalData->last_name); ) . ' ' . htmlspecialchars($user_source->personalData->last_name);
$myshifts_table = ''; $myshifts_table = '';
if ($its_me || $admin_user_privilege) { if ($its_me || $admin_user_privilege || $tshirt_admin) {
$my_shifts = User_view_myshifts( $my_shifts = User_view_myshifts(
$shifts, $shifts,
$user_source, $user_source,