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)
main
Igor Scheller 3 years ago committed by msquare
parent ca8f851ab1
commit 6d2b36a746

@ -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;
} }

Loading…
Cancel
Save