Allow 0 minutes before/after schedule, fix room sorting

main
Igor Scheller 4 years ago
parent 53d5f8518b
commit d7152ebc09

@ -36,7 +36,7 @@ function Room_validate_name(string $name, int $room_id)
*/
function Rooms()
{
return Room::all()->sortBy('name');
return Room::orderBy('name')->get();
}
/**

@ -130,8 +130,8 @@ class ImportSchedule extends BaseController
'name' => 'required',
'url' => 'required',
'shift_type' => 'required|int',
'minutes_before' => 'required|int',
'minutes_after' => 'required|int',
'minutes_before' => 'int',
'minutes_after' => 'int',
]);
if (!isset($this->getShiftTypes()[$data['shift_type']])) {

Loading…
Cancel
Save