From d0388e83446b5c9f465efbc31ebc11d4ec4b4498 Mon Sep 17 00:00:00 2001 From: Xu Date: Sun, 14 Apr 2024 20:56:41 +0200 Subject: [PATCH] fix colors of shifts for admins --- includes/view/ShiftCalendarShiftRenderer.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index ed9a6cb4..e183b2aa 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -170,6 +170,15 @@ class ShiftCalendarShiftRenderer $angeltype, $shift_entries ); + $shift_can_signup = Shift_signup_allowed_angel( + $user, + $shift, + $angeltype, + null, + null, + $angeltype, + $shift_entries + ); $freeEntriesCount = $shift_signup_state->getFreeEntries(); $inner_text = _e('%d helper needed', '%d helpers needed', $freeEntriesCount, [$freeEntriesCount]); @@ -216,7 +225,7 @@ class ShiftCalendarShiftRenderer $shifts_row .= join(', ', $entry_list); $shifts_row .= ''; return [ - $shift_signup_state, + $shift_can_signup, $shifts_row, ]; }