When only free shifts should be shown: filter for selected angel types

closes #556 (shifts shown, where not selected angeltype is free)
This commit is contained in:
Igor Scheller 2018-12-30 04:39:47 +01:00 committed by msquare
parent 1fefe93bc8
commit d208cab1ac
1 changed files with 7 additions and 0 deletions

View File

@ -492,6 +492,13 @@ function shiftCalendarRendererByShiftFilter(ShiftsFilter $shiftsFilter)
foreach ($needed_angeltypes[$shift['SID']] as $needed_angeltype) { foreach ($needed_angeltypes[$shift['SID']] as $needed_angeltype) {
$taken = 0; $taken = 0;
if (
!in_array(ShiftsFilter::FILLED_FILLED, $shiftsFilter->getFilled())
&& !in_array($needed_angeltype['angel_type_id'], $shiftsFilter->getTypes())
) {
continue;
}
foreach ($shift_entries[$shift['SID']] as $shift_entry) { foreach ($shift_entries[$shift['SID']] as $shift_entry) {
if ( if (
$needed_angeltype['angel_type_id'] == $shift_entry['TID'] $needed_angeltype['angel_type_id'] == $shift_entry['TID']