From 6d2b36a74661bf03addbd44a81dc94313f80b159 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 4 Oct 2021 01:31:59 +0200 Subject: [PATCH] Fixed shifts filter to show partially occupied shifts as free and not occupied As suggested by @pjdeltour in #829 (Shifts filter - not showing all filtered shifts) --- includes/controller/users_controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/controller/users_controller.php b/includes/controller/users_controller.php index 3216162b..65beb9f5 100644 --- a/includes/controller/users_controller.php +++ b/includes/controller/users_controller.php @@ -408,14 +408,14 @@ function shiftCalendarRendererByShiftFilter(ShiftsFilter $shiftsFilter) if ( in_array(ShiftsFilter::FILLED_FREE, $shiftsFilter->getFilled()) - && $taken < $needed_angels_count + && $needed_angels_count > 0 ) { $filtered_shifts[] = $shift; } if ( in_array(ShiftsFilter::FILLED_FILLED, $shiftsFilter->getFilled()) - && $taken >= $needed_angels_count + && $needed_angels_count == 0 ) { $filtered_shifts[] = $shift; }