public IActionResult ApproveOrDenyVacation(ApproveOrDenyVacationViewModel model)
        {
            ViewData["Header"] = "Vacation to Approve or Deny";

            if (ModelState.IsValid)
            {
                var vacationToUpdate = _context.Vacations.Find(model.Id);

                vacationToUpdate.Approval = model.Approval;

                _context.SaveChanges();
                return(RedirectToAction("ListVacationsWaitingForApproval"));
            }

            return(View(model));
        }
        public IActionResult ApproveOrDenyVacation(int id)
        {
            ViewData["Header"] = "Vacation to Approve or Deny";
            var supervisor  = _userManager.FindByNameAsync(User.Identity.Name).Result;
            var vacation    = _context.Vacations.Find(id);
            var requestUser = _userManager.FindByIdAsync(vacation.UserId).Result;

            var vacationForView = new ApproveOrDenyVacationViewModel
            {
                RequestBy  = requestUser.Email,
                DateCreate = vacation.DateCreated,
                StartDate  = vacation.StartDate,
                Reason     = vacation.Reason,
                Approval   = vacation.Approval,
                Supervisor = supervisor.Email,
                EndDate    = vacation.EndDate,
                Id         = vacation.Id
            };


            return(View(vacationForView));
        }