|
|
@ -87,14 +87,15 @@ function NeededAngelTypes_by_shift($shiftId) {
|
|
|
|
$shift_entries = ShiftEntries_by_shift($shiftId);
|
|
|
|
$shift_entries = ShiftEntries_by_shift($shiftId);
|
|
|
|
$needed_angeltypes = [];
|
|
|
|
$needed_angeltypes = [];
|
|
|
|
foreach ($needed_angeltypes_source as $angeltype) {
|
|
|
|
foreach ($needed_angeltypes_source as $angeltype) {
|
|
|
|
|
|
|
|
$angeltype['shift_entries'] = [];
|
|
|
|
$angeltype['taken'] = 0;
|
|
|
|
$angeltype['taken'] = 0;
|
|
|
|
foreach ($shift_entries as $shift_entry) {
|
|
|
|
foreach ($shift_entries as $shift_entry) {
|
|
|
|
if($shift_entry['TID']==$angeltype['id'] && $shift_entry['freeloaded'] == 0) {
|
|
|
|
if ($shift_entry['TID'] == $angeltype['angel_type_id'] && $shift_entry['freeloaded'] == 0) {
|
|
|
|
$angeltype['taken'] ++;
|
|
|
|
$angeltype['taken'] ++;
|
|
|
|
|
|
|
|
$angeltype['shift_entries'][] = $shift_entry;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$angeltype['shift_entries'] = $shift_entries;
|
|
|
|
|
|
|
|
$needed_angeltypes[] = $angeltype;
|
|
|
|
$needed_angeltypes[] = $angeltype;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|