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,13 +394,11 @@ 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;
}
}
if (count($myshifts_table) > 0) {
ksort($myshifts_table);
@ -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,