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)
This commit is contained in:
Igor Scheller 2021-10-04 01:31:59 +02:00 committed by msquare
parent ca8f851ab1
commit 6d2b36a746
1 changed files with 2 additions and 2 deletions

View File

@ -408,14 +408,14 @@ function shiftCalendarRendererByShiftFilter(ShiftsFilter $shiftsFilter)
if ( if (
in_array(ShiftsFilter::FILLED_FREE, $shiftsFilter->getFilled()) in_array(ShiftsFilter::FILLED_FREE, $shiftsFilter->getFilled())
&& $taken < $needed_angels_count && $needed_angels_count > 0
) { ) {
$filtered_shifts[] = $shift; $filtered_shifts[] = $shift;
} }
if ( if (
in_array(ShiftsFilter::FILLED_FILLED, $shiftsFilter->getFilled()) in_array(ShiftsFilter::FILLED_FILLED, $shiftsFilter->getFilled())
&& $taken >= $needed_angels_count && $needed_angels_count == 0
) { ) {
$filtered_shifts[] = $shift; $filtered_shifts[] = $shift;
} }