public async Task <SearchResult <TenantLanguageViewModel> > GetLanguageSupport(string tenantId)
        {
            var items = await _tenantLanguageRepository.GetLanguageSupport(tenantId);

            return(new SearchResult <TenantLanguageViewModel>
            {
                Items = items
            });
        }
示例#2
0
        public async Task <AppSettingViewModel> GetAppSettings(string userId, string tenantId, string languageId)
        {
            var appSetting    = new AppSettingViewModel();
            var isSupperAdmin = await _userRoleRepository.CheckIsSupperAdmin(userId);

            appSetting.UserSettings = await _userSettingRepository.GetsByUserId(x => new UserSetting
            {
                Key   = x.Key,
                Value = x.Value
            }, userId);

            appSetting.Permissions = await _rolePageRepository.GetsByUserId(userId);

            appSetting.Languages = await _tenantLanguageRepository.GetLanguageSupport(tenantId);

            appSetting.Pages = await _pageRepository.GetPagesByUserId(tenantId, userId, languageId);

            return(appSetting);
        }