// GET: Leave
        public async Task <ActionResult> Index()
        {
            var userId = User.Identity.GetUserId();
            var user   = await UserManager.FindByIdAsync(userId);

            if (user == null)
            {
                return(HttpNotFound());
            }
            //var leaves = await LeaveManager.GetLeavesAsync(user);
            //var leaves = user.Leaves.ToList();
            var leaves = await LeaveManager.GetUnResumeLeavesOfUserAsync(user).ToListAsync();

            var list = new List <LeaveListViewModel>();

            foreach (var leave in leaves)
            {
                //list.Add(new LeaveListViewModel() { Leave = leave, Status = await LeaveManager.GetLeaveStatus(leave.Id) });
                list.Add(new LeaveListViewModel()
                {
                    Leave = leave
                });
            }
            return(View(list));
        }