Ejemplo n.º 1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var accessToken = await HttpContext.GetTokenAsync("access_token");

            var languageSetting = await _apiHelper.GetUserLanguage(accessToken);

            var langQueryList = await _apiHelper.MakeLanguageQuery(accessToken, languageSetting.Value, new long[] { 10115, 10116, 10117 });

            return(View(langQueryList));
        }
Ejemplo n.º 2
0
        public async Task <bool> PageConstructor(string saveState, string accessToken)
        {
            SaveState = saveState;

            languageCodeSetting = await _apiHelper.GetUserLanguage(accessToken);

            langQueryList = await _apiHelper.MakeLanguageQuery(accessToken, languageCodeSetting.Value, new long[] { 10121 });

            return(true);
        }
Ejemplo n.º 3
0
        public async Task <bool> PageConstructor(string saveState, string accessToken)
        {
            SaveState = saveState;

            languageCodeSetting = await _apiHelper.GetUserLanguage(accessToken);

            langQueryList = await _apiHelper.MakeLanguageQuery(accessToken, languageCodeSetting.Value, new long[] { 10121, 10108, 10400, 10401, 10202, 10203, 10200, 10402, 10201, 10405, 10403, 10404, 10500, 10501 });

            await CreateTeamSelectList(accessToken);

            await GetTeamStructure(accessToken);

            return(true);
        }
Ejemplo n.º 4
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var accessToken = await HttpContext.GetTokenAsync("access_token");

            var languageSetting = await _apiHelper.GetUserLanguage(accessToken);

            var langQueryList = await _apiHelper.MakeLanguageQuery(accessToken, languageSetting.Value, new long[] { 10100 });

            var name    = ((ClaimsIdentity)User.Identity).FindFirst(JwtClaimTypes.Name);
            var picture = ((ClaimsIdentity)User.Identity).FindFirst(JwtClaimTypes.Picture);
            var id      = ((ClaimsIdentity)User.Identity).FindFirst(JwtClaimTypes.Subject);

            if (name != null)
            {
                ViewData["FullName"] = name.Value;
            }
            else
            {
                ViewData["FullName"] = string.Empty;
            }

            if (picture != null)
            {
                ViewData["Picture"] = picture.Value;
            }
            else
            {
                ViewData["Picture"] = Base64Images.PanacheSoftwareDot;
            }

            if (id != null)
            {
                ViewData["Id"] = id.Value;
            }
            else
            {
                ViewData["Id"] = string.Empty;
            }

            return(View(langQueryList));
        }