public ActionResult MyMentor() { var userInfo = UserHelper.GetCurrentUserInfo(); if (userInfo.IsInRole(UserRoleCode.Mentee)) { var mentee = _menteeService.Search(m => m.User.Id == userInfo.Id).FirstOrDefault(); if (mentee != null && mentee.Mentor != null) { return(View(ToMentorModel(mentee.Mentor))); } return(View("PendingMentor")); } return(View("Unauthorized")); }
public ActionResult PendingApproval() { var userInfo = UserHelper.GetCurrentUserInfo(); if (userInfo.IsLoggedAs(UserRoleCode.Career)) { var pendingApproval = _menteeService.Search(m => m.Status == MenteeStatus.PendingApproval); return(View(new AllMenteesModel { PendingApproval = ToMenteeModelCollection(pendingApproval), })); } return(View("Unauthorized")); }