|
|
@ -131,26 +131,7 @@ function view_user_shifts() {
|
|
|
|
update_ShiftsFilter($_SESSION['ShiftsFilter'], in_array('user_shifts_admin', $privileges), $days);
|
|
|
|
update_ShiftsFilter($_SESSION['ShiftsFilter'], in_array('user_shifts_admin', $privileges), $days);
|
|
|
|
$shiftsFilter = $_SESSION['ShiftsFilter'];
|
|
|
|
$shiftsFilter = $_SESSION['ShiftsFilter'];
|
|
|
|
|
|
|
|
|
|
|
|
$shifts = Shifts_by_ShiftsFilter($shiftsFilter);
|
|
|
|
$shiftCalendarRenderer = shiftCalendarRendererByShiftFilter($shiftsFilter);
|
|
|
|
$needed_angeltypes_source = NeededAngeltypes_by_ShiftsFilter($shiftsFilter);
|
|
|
|
|
|
|
|
$shift_entries_source = ShiftEntries_by_ShiftsFilter($shiftsFilter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$needed_angeltypes = [];
|
|
|
|
|
|
|
|
$shift_entries = [];
|
|
|
|
|
|
|
|
foreach ($shifts as $shift) {
|
|
|
|
|
|
|
|
$needed_angeltypes[$shift['SID']] = [];
|
|
|
|
|
|
|
|
$shift_entries[$shift['SID']] = [];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($needed_angeltypes_source as $needed_angeltype) {
|
|
|
|
|
|
|
|
$needed_angeltypes[$needed_angeltype['SID']][] = $needed_angeltype;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($shift_entries_source as $shift_entry) {
|
|
|
|
|
|
|
|
$shift_entries[$shift_entry['SID']][] = $shift_entry;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
unset($needed_angeltypes_source);
|
|
|
|
|
|
|
|
unset($shift_entries_source);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$shiftCalendarRenderer = new ShiftCalendarRenderer($shifts, $needed_angeltypes, $shift_entries, $shiftsFilter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($user['api_key'] == "") {
|
|
|
|
if ($user['api_key'] == "") {
|
|
|
|
User_reset_api_key($user, false);
|
|
|
|
User_reset_api_key($user, false);
|
|
|
|