// [HttpPost]
        public ActionResult SaveUpdate(GroupUpdateFormModel newupdate)
        {
            if (ModelState.IsValid)
            {
                GroupUpdate update = Mapper.Map<GroupUpdateFormModel, GroupUpdate>(newupdate);
                var userId = User.Identity.GetUserId();
                groupUpdateService.CreateUpdate(update, userId);
                var Updates = Mapper.Map<IEnumerable<GroupUpdate>, IEnumerable<GroupUpdateViewModel>>(groupUpdateService.GetUpdatesByGoal(newupdate.GroupGoalId));
                foreach (var item in Updates)
                {
                    item.IsSupported = groupUpdateSupportService.IsUpdateSupported(item.GroupUpdateId, User.Identity.GetUserId(), groupUserService);
                    item.UserId = groupUpdateUserService.GetGroupUpdateUser(item.GroupUpdateId).Id;
                }
                GroupUpdateListViewModel updates = new GroupUpdateListViewModel()
                {
                    GroupUpdates = Updates,
                    Metric = groupGoalService.GetGroupGoal(newupdate.GroupGoalId).Metric,
                    Target = groupGoalService.GetGroupGoal(newupdate.GroupGoalId).Target
                };
                return PartialView("_UpdateView", updates);

            }
            return null;
        }
        public PartialViewResult DisplayUpdates(int id)
        {
            var Updates = Mapper.Map<IEnumerable<GroupUpdate>, IEnumerable<GroupUpdateViewModel>>(groupUpdateService.GetUpdatesByGoal(id));

            foreach (var item in Updates)
            {

                item.IsSupported = groupUpdateSupportService.IsUpdateSupported(item.GroupUpdateId, User.Identity.GetUserId(), groupUserService);
                item.UserId = groupUpdateUserService.GetGroupUpdateUser(item.GroupUpdateId).Id;
            }
            GroupUpdateListViewModel updates = new GroupUpdateListViewModel()
            {
                GroupUpdates = Updates,
                Metric = groupGoalService.GetGroupGoal(id).Metric,
                Target = groupGoalService.GetGroupGoal(id).Target
            };
            return PartialView("_UpdateView", updates);
        }