Beispiel #1
0
        public IActionResult Details(Guid teamId, int?pointsEarned, Guid notificationclicked)
        {
            notificationAppService.MarkAsRead(notificationclicked);

            OperationResultVo <TeamViewModel> serviceResult = teamAppService.GetById(CurrentUserId, teamId);

            if (!serviceResult.Success)
            {
                TempData["Message"] = SharedLocalizer["Team not found!"].Value;
                return(RedirectToAction("Index"));
            }

            TeamViewModel model = serviceResult.Value;

            SetGamificationMessage(pointsEarned);

            return(View(model));
        }
Beispiel #2
0
 public async Task <TeamViewModel> Get(int id)
 {
     return(await _teamAppService.GetById(id));
 }
Beispiel #3
0
        private void SetGameTeam(GameViewModel vm)
        {
            if (vm.Team == null && vm.TeamId.HasValue)
            {
                OperationResultVo <Application.ViewModels.Team.TeamViewModel> teamResult = teamAppService.GetById(CurrentUserId, vm.TeamId.Value);

                if (teamResult.Success)
                {
                    vm.Team = teamResult.Value;
                    vm.Team.Permissions.CanEdit = vm.Team.Permissions.CanDelete = false;
                }
            }
        }