コード例 #1
0
        public JsonResult Rota()
        {
            // TODO: 1 week of scheduling ahead is hardcoded here. This should be moved to external config file.
            // TODO: May be worth moving into a service?
            var rota = _supportRepository.GetRota();

            rota.PlanShifts(
                DateTime.Now,
                DateTime.Now.AddDays(7),
                _supportRepository.GetPeople().ToList());
            _supportRepository.UpdateRota(rota);
            return(new JsonResult(rota));
        }