public async Task <ScoringOffer> GetOfferAsync(long projectId, AreaType areaType, long expertId) { var scoring = await _scoringRepository.GetByProjectIdAsync(projectId); return(scoring.GetOfferForExpertinArea(expertId, areaType)); }
public async Task <IReadOnlyCollection <ScoringCriterionPrompt> > GetCriterionPromptsAsync(long projectId, AreaType areaType) { var scoringApplication = await _scoringApplicationRepository.GetByProjectIdAsync(projectId); var criteriaPromps = await _scoringCriterionRepository.GetScoringCriterionPromptsAsync(scoringApplication.Id, areaType); switch (areaType) { case AreaType.Hr: await AddHrCriterionPromptExceptions(scoringApplication.Id, criteriaPromps); break; case AreaType.Marketer: var socialNetworks = (await _scoringApplicationRepository.GetByIdAsync(scoringApplication.Id)).SocialNetworks; foreach (var id in _criterionsWithSocialNetworksPrompts) { criteriaPromps.Add(new ScoringCriterionPrompt { CriterionId = id, SocialNetworks = socialNetworks, PromptType = ScoringCriterionPromptType.SocialNetwork }); } break; } return(criteriaPromps.ToArray()); }