/// <summary> /// Метод отображает необходимые вакансии для различных ролей /// </summary> /// <param name="filter"></param> /// <param name="options"></param> /// <returns></returns> public ActionResult ShowVacancies(VacancyFilter filter, FetchOptions options) { var model = new VacancyListViewModel { Role = CurrentUser.Role }; switch (CurrentUser.Role) { case Models.Role.Employer: { model.Vacancies = employerRepository.ShowMyVacancies(CurrentUser.Id, filter, options); return(View(model)); } case Models.Role.Admin: { model.Vacancies = employerRepository.GetAllWithSort(options); return(View(model)); } case Role.Jobseeker: { model.Vacancies = employerRepository.GetAllWithSort(options); return(View(model)); } } return(View()); }