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:
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…
Reference in New Issue