private FolderListModel FolderResults(Guid folderId, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { var employer = CurrentEmployer; var folder = _candidateFoldersQuery.GetFolder(employer, folderId); if (folder == null) { return(null); } // Do a search to get the candidates in this folder. var model = Search(employer, folderId, sortCriteria, presentation); model.Folder = folder; model.FolderData = new FolderDataModel { Count = model.Results.TotalCandidates, CanDelete = _candidateFoldersCommand.CanDeleteFolder(employer, folder), CanRename = _candidateFoldersCommand.CanRenameFolder(employer, folder), }; model.SortOrders = SortOrders; model.Communities = _communitiesQuery.GetCommunities().ToDictionary(c => c.Id, c => c); model.Verticals = _verticalsQuery.GetVerticals().ToDictionary(v => v.Id, v => v); model.CurrentSearch = EmployerContext.CurrentSearch; return(model); }
public ActionResult Manage(Guid jobAdId, ApplicantStatus?status, MemberSearchSortCriteria sortOrder, CandidatesPresentationModel presentation) { var model = JobAdResults(jobAdId, status, sortOrder, presentation); if (model == null) { return(NotFound("job ad", "id", jobAdId)); } return(View(ManageCandidatesViewName, model)); }
public ActionResult Folder(Guid folderId, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { var model = FolderResults(folderId, sortCriteria, presentation); if (model == null) { return(NotFound("folder", "id", folderId)); } EmployerContext.CurrentCandidates = new FolderNavigation(folderId, presentation); return(View(model)); }
public ActionResult PartialFlagList(MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { var model = FlagListResults(sortCriteria, presentation); if (model == null) { return(NotFound("flaglist")); } EmployerContext.CurrentCandidates = new FlagListNavigation(presentation); return(PartialView("CandidateList", model)); }
private ActionResult PartialBlockList(BlockListType blockListType, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { var model = BlockListResults(blockListType, sortCriteria, presentation); if (model == null) { return(NotFound("blocklist", "type", blockListType)); } EmployerContext.CurrentCandidates = new BlockListNavigation(blockListType, presentation); return(PartialView("CandidateList", model)); }
public ActionResult Partial(ApplicantStatus status, MemberSearchSortCriteria sortOrder, CandidatesPresentationModel presentation) { var navigation = (ManageCandidatesNavigation)EmployerContext.CurrentCandidates; var model = JobAdResults(navigation.JobAdId, status, sortOrder, presentation); if (model == null) { return(NotFound("job ad", "id", navigation.JobAdId)); } return(PartialView("CandidateList", model)); }
private FlagListListModel FlagListResults(MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { var employer = CurrentEmployer; var flagList = _candidateFlagListsQuery.GetFlagList(employer); if (flagList == null) { return(null); } // Do a search to get the candidates in this flagList. var model = Search(employer, sortCriteria, presentation); model.FlagList = flagList; model.SortOrders = SortOrders; model.Communities = _communitiesQuery.GetCommunities().ToDictionary(c => c.Id, c => c); model.Verticals = _verticalsQuery.GetVerticals().ToDictionary(v => v.Id, v => v); model.CurrentSearch = EmployerContext.CurrentSearch; return(model); }
private BlockListListModel BlockListResults(BlockListType blockListType, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { var employer = CurrentEmployer; var blockList = blockListType == BlockListType.Temporary ? _candidateBlockListsQuery.GetTemporaryBlockList(employer) : _candidateBlockListsQuery.GetPermanentBlockList(employer); if (blockList == null) { return(null); } // Do a search to get the candidates in this blockList. var model = Search(employer, blockList.Id, sortCriteria, presentation); model.BlockList = blockList; model.SortOrders = SortOrders; model.Communities = _communitiesQuery.GetCommunities().ToDictionary(c => c.Id, c => c); model.Verticals = _verticalsQuery.GetVerticals().ToDictionary(v => v.Id, v => v); model.CurrentSearch = EmployerContext.CurrentSearch; return(model); }
private FlagListListModel Search(IEmployer employer, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { return(Search <FlagListListModel>(employer, presentation, (e, r) => _executeMemberSearchCommand.SearchFlagged(e, sortCriteria, r))); }
MemberSearchExecution IExecuteMemberSearchCommand.SearchManaged(IEmployer employer, Guid jobAdId, ApplicantStatus status, MemberSearchSortCriteria sortCriteria, Range range) { var criteria = new MemberSearchCriteria { SortCriteria = sortCriteria ?? new MemberSearchSortCriteria { SortOrder = ManagedCandidatesDefaultSortOrder }, HasResume = null, IsActivated = null, IsContactable = null, CandidateStatusFlags = CandidateStatusFlags.All, }; return(Search(employer, criteria, range, (s, e, o, q) => s.SearchManaged(e, o, jobAdId, status, q))); }
MemberSearchExecution IExecuteMemberSearchCommand.SearchBlockList(IEmployer employer, Guid blockListId, MemberSearchSortCriteria sortCriteria, Range range) { var criteria = new MemberSearchCriteria { SortCriteria = sortCriteria ?? new MemberSearchSortCriteria { SortOrder = BlockListDefaultSortOrder }, HasResume = null, CandidateStatusFlags = CandidateStatusFlags.All, }; return(Search(employer, criteria, range, (s, e, o, q) => s.SearchBlockList(e, o, blockListId, q))); }
MemberSearchExecution IExecuteMemberSearchCommand.SearchFlagged(IEmployer employer, MemberSearchSortCriteria sortCriteria, Range range) { var criteria = new MemberSearchCriteria { SortCriteria = sortCriteria ?? new MemberSearchSortCriteria { SortOrder = FlagListDefaultSortOrder }, }; return(Search(employer, criteria, range, (s, e, o, q) => s.SearchFlagged(e, o, q))); }
private ManageCandidatesListModel Search(IEmployer employer, Guid jobAdId, ApplicantStatus status, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { return(Search <ManageCandidatesListModel>(employer, presentation, (e, r) => _executeMemberSearchCommand.SearchManaged(e, jobAdId, status, sortCriteria, r))); }
private FolderListModel Search(IEmployer employer, Guid folderId, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { return(Search <FolderListModel>(employer, presentation, (e, r) => _executeMemberSearchCommand.SearchFolder(e, folderId, sortCriteria, r))); }
public ActionResult PermanentPartialBlockList(MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { return(PartialBlockList(BlockListType.Permanent, sortCriteria, presentation)); }
public ActionResult TemporaryPartialBlockList(MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { return(PartialBlockList(BlockListType.Temporary, sortCriteria, presentation)); }
private BlockListListModel Search(IEmployer employer, Guid blockListId, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { return(Search <BlockListListModel>(employer, presentation, (e, r) => _executeMemberSearchCommand.SearchBlockList(e, blockListId, sortCriteria, r))); }
private ManageCandidatesListModel JobAdResults(Guid jobAdId, ApplicantStatus?status, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation) { var employer = CurrentEmployer; var jobAd = _jobAdsQuery.GetJobAd <JobAd>(jobAdId); if (jobAd == null) { return(null); } var searchStatus = status ?? DefaultStatus; var model = Search(employer, jobAdId, searchStatus, sortCriteria, presentation); if (model.Results.TotalCandidates == 0 && status == null) { searchStatus = FallbackStatus; model = Search(employer, jobAdId, searchStatus, sortCriteria, presentation); } // Indicate those who are rejected. model.ApplicantStatus = searchStatus; model.Results.RejectedCandidateIds = searchStatus == ApplicantStatus.Rejected ? model.Results.CandidateIds : new List <Guid>(); var applicantList = _jobAdApplicantsQuery.GetApplicantList(employer, jobAd); var counts = _jobAdApplicantsQuery.GetApplicantCounts(employer, applicantList); model.JobAd = new JobAdDataModel { Id = jobAdId, Title = jobAd.Title, Status = jobAd.Status, ApplicantCounts = new ApplicantCountsModel { New = counts[ApplicantStatus.New], Rejected = counts[ApplicantStatus.Rejected], ShortListed = counts[ApplicantStatus.Shortlisted], }, Applications = _jobAdApplicantsQuery.GetApplicationsByPositionId(jobAd.Id).ToDictionary(a => a.ApplicantId, a => a), }; model.SortOrders = new[] { MemberSortOrder.DateUpdated, MemberSortOrder.Flagged, MemberSortOrder.FirstName }.OrderBy(o => o.ToString()).ToArray(); model.Communities = _communitiesQuery.GetCommunities().ToDictionary(c => c.Id, c => c); model.Verticals = _verticalsQuery.GetVerticals().ToDictionary(v => v.Id, v => v); EmployerContext.CurrentSearch = null; EmployerContext.CurrentCandidates = new ManageCandidatesNavigation(jobAdId, model.JobAd.Status, searchStatus, presentation); return(model); }
MemberSearchExecution IExecuteMemberSearchCommand.SearchFolder(IEmployer employer, Guid folderId, MemberSearchSortCriteria sortCriteria, Range range) { var criteria = new MemberSearchCriteria { SortCriteria = sortCriteria ?? new MemberSearchSortCriteria { SortOrder = FolderDefaultSortOrder }, CandidateStatusFlags = null, }; return(Search(employer, criteria, range, (s, e, o, q) => s.SearchFolder(e, o, folderId, q))); }
public static MemberSortOrderField MemberSortOrderField(this HtmlHelper htmlHelper, MemberSearchSortCriteria criteria) { return(new MemberSortOrderField(htmlHelper, criteria)); }