public IActionResult Index(DepartmentModel department)
        {
            UserWorkHoursViewModel userWorkHoursViewModel = new UserWorkHoursViewModel()
            {
                Workers   = departmentService.GetEmployees(department.Name).ToList(),
                WorkHours = departmentService.GetEmployeesWorkHours(department.DepartmentId).ToList()
            };

            return(View(userWorkHoursViewModel));
        }
        public IActionResult GetDepartment(List <UserWorkHoursViewModel> model, string name)
        {
            var department  = departmentService.GetEmployees(name);
            var department1 = userManager.Users.Where(x => x.Department.Name == name);

            if (department == null)
            {
                ViewBag.ErrorMessage = $"Department with {name} cannot be found";
                return(View("NotFound"));
            }

            var userWorkHoursModel = new UserWorkHoursViewModel()
            {
                Name    = name,
                Workers = department,
            };

            return(View(userWorkHoursModel));
        }