Commit 683e0484 by Nilu

modifications to HT003

parent 9c7e7f3d
...@@ -41,7 +41,7 @@ public class BulkUpdateFP extends SaveFP ...@@ -41,7 +41,7 @@ public class BulkUpdateFP extends SaveFP
{ {
Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new EqualsFilter<>(ApplicationStatus.SHORTLISTED)); Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new EqualsFilter<>(ApplicationStatus.SHORTLISTED));
Collection alreadyShortlisted = CollectionFilter.filter(applications, filter); Collection alreadyShortlisted = CollectionFilter.filter(applications, filter);
int totalShortlisted = applications.size() - alreadyShortlisted.size() + job.getNoOfCandidatesShortlisted(); int totalShortlisted = applications.size() - alreadyShortlisted.size() + job.getNoOfCandidatesFor(ApplicationStatus.SHORTLISTED);
BusinessObjectParser.assertFieldCondition(totalShortlisted <= job.getMaxShortlistApplicants() , job , Job.MULTIPLEREFERENCE_JobApplications, "exceedMaxShortlisted"); BusinessObjectParser.assertFieldCondition(totalShortlisted <= job.getMaxShortlistApplicants() , job , Job.MULTIPLEREFERENCE_JobApplications, "exceedMaxShortlisted");
} }
......
...@@ -230,19 +230,9 @@ public class Job extends BaseJob ...@@ -230,19 +230,9 @@ public class Job extends BaseJob
public int getNoOfCandidatesApplied() public int getNoOfCandidatesApplied()
{ {
return getNoOfCandidatesFor(ApplicationStatus.SUBMITTED, ApplicationStatus.SHORTLISTED, ApplicationStatus.UNSUITABLE); Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new NotInFilter<>(ApplicationStatus.DRAFT));
}
return pipelineJob().toJobApplications(filter).toCandidate().vals().size();
public int getNoOfCandidatesShortlisted()
{
return getNoOfCandidatesFor(ApplicationStatus.SHORTLISTED);
}
public int getNoOfCandidatesUnsuitable()
{
return getNoOfCandidatesFor(ApplicationStatus.UNSUITABLE);
} }
...@@ -256,7 +246,9 @@ public class Job extends BaseJob ...@@ -256,7 +246,9 @@ public class Job extends BaseJob
public Collection<JobApplication> getSubmittedApplications() public Collection<JobApplication> getSubmittedApplications()
{ {
return getApplicationsFor(ApplicationStatus.SUBMITTED, ApplicationStatus.SHORTLISTED, ApplicationStatus.UNSUITABLE); Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new NotInFilter<>(ApplicationStatus.DRAFT));
return CollectionFilter.filter(getJobApplicationsSet(), filter);
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="int-timeline"> <div class="int-timeline">
<li class="<%= noOfIncomplete > 0 ? "has-applicant" : "no-applicant" %> <%= tabNumber == 1 ? "active" : "inactive" %>"> <li class="<%= noOfIncomplete > 0 ? "has-applicant" : "no-applicant" %> <%= tabNumber == 1 ? "active" : "inactive" %>">
<oneit:button id="unsuitableBtn" value=" " name="gotoPage" skin="link" disabled="<%= noOfUnsuitable > 0 ? "false" : "false" %>" <oneit:button id="unsuitableBtn" value=" " name="gotoPage" skin="link" disabled="<%= noOfUnsuitable > 0 ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", 1).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", 1).toMap())
.toMap() %>"> .toMap() %>">
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
<% <%
for (WorkFlow workflow : job.getSortedMiddleWorkFlows()) for (WorkFlow workflow : job.getSortedMiddleWorkFlows())
{ {
int noOfCandidates = job.getNoOfCandidatesFor(workflow.getApplicationStatus()); int noOfCandidates = workflow.getSortOrder() == 2 ? job.getNoOfCandidatesApplied() : job.getNoOfCandidatesFor(workflow.getApplicationStatus());
%> %>
<li class="<%= noOfCandidates > 0 ? "has-applicant" : "" %> <%= (tabNumber == workflow.getSortOrder()) ? "active" : "inactive" %>"> <li class="<%= noOfCandidates > 0 ? "has-applicant" : "" %> <%= (tabNumber == workflow.getSortOrder()) ? "active" : "inactive" %>">
<oneit:button value=" " name="gotoPage" skin="link" <oneit:button value=" " name="gotoPage" skin="link" disabled="<%= noOfCandidates > 0 ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", workflow.getSortOrder()).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", workflow.getSortOrder()).toMap())
.toMap() %>"> .toMap() %>">
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</ul> </ul>
</div> </div>
<div class="unsutable <%= noOfUnsuitable > 0 ? "has-applicant" : "no-applicant" %> <%= tabNumber == 9 ? "active" : "inactive" %>"> <div class="unsutable <%= noOfUnsuitable > 0 ? "has-applicant" : "no-applicant" %> <%= tabNumber == 9 ? "active" : "inactive" %>">
<oneit:button id="unsuitableBtn" value=" " name="gotoPage" skin="link" disabled="<%= noOfUnsuitable > 0 ? "false" : "false" %>" <oneit:button id="unsuitableBtn" value=" " name="gotoPage" skin="link" disabled="<%= noOfUnsuitable > 0 ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", 9).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", 9).toMap())
.toMap() %>"> .toMap() %>">
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<% <%
for(Job job: jobs) for(Job job: jobs)
{ {
int shortlisted = job.getNoOfCandidatesShortlisted(); int shortlisted = job.getNoOfCandidatesFor(ApplicationStatus.SHORTLISTED);
int maxShortlist = job.getMaxShortlistApplicants(); int maxShortlist = job.getMaxShortlistApplicants();
String goToPage = shortlisted > 0 ? shortlistPage : nextPage; String goToPage = shortlisted > 0 ? shortlistPage : nextPage;
%> %>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<% <%
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
int shortlisted = job.getNoOfCandidatesShortlisted(); int shortlisted = job.getNoOfCandidatesFor(ApplicationStatus.SHORTLISTED);
String editJobPage = WebUtils.getSamePageInRenderMode(request, WebUtils.EDIT_JOB); String editJobPage = WebUtils.getSamePageInRenderMode(request, WebUtils.EDIT_JOB);
String sharePage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATED_JOB); String sharePage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATED_JOB);
String jobPage = WebUtils.getSamePageInRenderMode(request, (shortlisted > 0 ? WebUtils.APPLICANTS_SHORTLIST : WebUtils.VIEW_APPLICANTS)); String jobPage = WebUtils.getSamePageInRenderMode(request, (shortlisted > 0 ? WebUtils.APPLICANTS_SHORTLIST : WebUtils.VIEW_APPLICANTS));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment