diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-12-30 04:39:47 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-12-30 12:11:51 +0100 |
commit | d208cab1ac17a958fcd070c67e07b56e6caadff9 (patch) | |
tree | 7b211f863464c8620f88b6c8e1f78a8fcb840614 /includes | |
parent | 1fefe93bc86bed67a0be49e1bd7e87de1bc1304a (diff) |
When only free shifts should be shown: filter for selected angel types
closes #556 (shifts shown, where not selected angeltype is free)
Diffstat (limited to 'includes')
-rw-r--r-- | includes/controller/users_controller.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/controller/users_controller.php b/includes/controller/users_controller.php index 393acca8..dea27645 100644 --- a/includes/controller/users_controller.php +++ b/includes/controller/users_controller.php @@ -492,6 +492,13 @@ function shiftCalendarRendererByShiftFilter(ShiftsFilter $shiftsFilter) foreach ($needed_angeltypes[$shift['SID']] as $needed_angeltype) { $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) { if ( $needed_angeltype['angel_type_id'] == $shift_entry['TID'] |