Commit 1cf9d52e by Chamath

ApplicatioStatus and Workflow usage replacements.

parent a9d0d9db
package performa.form;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.*;
import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.objstore.utils.ObjstoreUtils;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.servlets.forms.*;
import oneit.servlets.process.*;
import oneit.utils.*;
import oneit.utils.Debug;
import oneit.utils.filter.CollectionFilter;
import oneit.utils.filter.Filter;
import performa.orm.Job;
import performa.orm.JobApplication;
import performa.orm.types.ApplicationStatus;
import oneit.utils.filter.*;
import performa.orm.*;
import performa.orm.types.StageType;
public class BulkUpdateFP extends SaveFP
......@@ -36,21 +28,21 @@ public class BulkUpdateFP extends SaveFP
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1,"In BulkUpdateFP selected application count : ", applications != null ? applications.size() : 0 , " of job ", job);
if(job.getAppStatusWorkFlow() != null && job.getAppStatusWorkFlow().getApplicationStatus() == ApplicationStatus.SHORTLISTED
if(job.getAppWorkFlowStage()!= null && job.getAppWorkFlowStage().getStageType()== StageType.INTERVIEW
&& job.getNoOfCandidatesApplied() > job.getMaxShortlistApplicants() && applications != null)
{
Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new EqualsFilter<>(ApplicationStatus.SHORTLISTED));
Filter<JobApplication> filter = JobApplication.SearchByStageType().byStageTypesIn(CollectionUtils.createSet(StageType.INTERVIEW));
Collection alreadyShortlisted = CollectionFilter.filter(applications, filter);
int totalShortlisted = applications.size() - alreadyShortlisted.size() + job.getNoOfCandidatesFor(ApplicationStatus.SHORTLISTED);
int totalShortlisted = applications.size() - alreadyShortlisted.size() + job.getNoOfCandidatesFor(StageType.INTERVIEW);
BusinessObjectParser.assertFieldCondition(totalShortlisted <= job.getMaxShortlistApplicants() , job , Job.MULTIPLEREFERENCE_JobApplications, "exceedMaxShortlisted");
}
if(job.getAppStatusWorkFlow() != null)
if(job.getAppWorkFlowStage() != null)
{
for(JobApplication application : applications)
{
application.setApplicationStatus(job.getAppStatusWorkFlow().getApplicationStatus());
application.setWorkFlowStage(job.getAppWorkFlowStage());
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1,"In BulkUpdateFP Job Application Status successfully changed : ", application );
}
......@@ -58,4 +50,4 @@ public class BulkUpdateFP extends SaveFP
return super.processForm(process, submission, params);
}
}
}
\ No newline at end of file
......@@ -72,6 +72,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public static final String SEARCH_All = "All";
public static final String SEARCH_CandidateJob = "CandidateJob";
public static final String SEARCH_Details = "Details";
public static final String SEARCH_StageType = "StageType";
// Static constants corresponding to attribute helpers
......@@ -4406,6 +4407,131 @@ public abstract class BaseJobApplication extends BaseBusinessClass
.byName (Name).search (transaction);
}
public static SearchStageType SearchByStageType () { return new SearchStageType (); }
public static class SearchStageType extends SearchObject<JobApplication>
{
public SearchStageType byStageTypesNotIn (Set<StageType> StageTypesNotIn)
{
by ("StageTypesNotIn", StageTypesNotIn);
return this;
}
public SearchStageType byStageTypesIn (Set<StageType> StageTypesIn)
{
by ("StageTypesIn", StageTypesIn);
return this;
}
public SearchStageType andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_job_application.object_id", FIELD_ObjectID);
return this;
}
public SearchStageType andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_job_application.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchStageType andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_job_application.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchStageType andCV (QueryFilter<BinaryContent> filter)
{
filter.addFilter (context, "tl_job_application.cv", "CV");
return this;
}
public SearchStageType andCoverLetter (QueryFilter<BinaryContent> filter)
{
filter.addFilter (context, "tl_job_application.cover_letter", "CoverLetter");
return this;
}
public SearchStageType andApplicationStatus (QueryFilter<ApplicationStatus> filter)
{
filter.addFilter (context, "tl_job_application.application_status", "ApplicationStatus");
return this;
}
public SearchStageType andSubmittedDate (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_job_application.submitted_date", "SubmittedDate");
return this;
}
public SearchStageType andGoogleAddressText (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_job_application.google_address_text", "GoogleAddressText");
return this;
}
public SearchStageType andPreferRemote (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_job_application.prefer_remote", "PreferRemote");
return this;
}
public SearchStageType andHappyToRelocate (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_job_application.happy_to_relocate", "HappyToRelocate");
return this;
}
public SearchStageType andIsEmailIngest (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_job_application.is_email_ingest", "IsEmailIngest");
return this;
}
public SearchStageType andCandidate (QueryFilter<Candidate> filter)
{
filter.addFilter (context, "tl_job_application.candidate_id", "Candidate");
return this;
}
public SearchStageType andJob (QueryFilter<Job> filter)
{
filter.addFilter (context, "tl_job_application.job_id", "Job");
return this;
}
public SearchStageType andWorkFlowStage (QueryFilter<WorkFlowStage> filter)
{
filter.addFilter (context, "tl_job_application.work_flow_stage_id", "WorkFlowStage");
return this;
}
public JobApplication[] search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_JobApplication, SEARCH_StageType, criteria);
Set<JobApplication> typedResults = new LinkedHashSet <JobApplication> ();
for (BaseBusinessClass bbcResult : results)
{
JobApplication aResult = (JobApplication)bbcResult;
typedResults.add (aResult);
}
return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new JobApplication[0]);
}
}
public static JobApplication[] searchStageType (ObjectTransaction transaction, Set<StageType> StageTypesNotIn, Set<StageType> StageTypesIn) throws StorageException
{
return SearchByStageType ()
.byStageTypesNotIn (StageTypesNotIn).byStageTypesIn (StageTypesIn).search (transaction);
}
public Object getAttribute (String attribName)
......
......@@ -245,15 +245,15 @@ public class Job extends BaseJob
public int getNoOfCandidatesApplied()
{
Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new NotInFilter<>(ApplicationStatus.DRAFT, ApplicationStatus.POST_INGEST));
Filter<JobApplication> filter = JobApplication.SearchByStageType().byStageTypesNotIn(CollectionUtils.createSet(StageType.INCOMPLETE, StageType.POST_INGEST));
return pipelineJob().toJobApplications(filter).toCandidate().vals().size();
}
public int getNoOfCandidatesFor(ApplicationStatus... status)
public int getNoOfCandidatesFor(StageType... status)
{
Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new InFilter<>(status));
Filter<JobApplication> filter = JobApplication.SearchByStageType().byStageTypesIn(CollectionUtils.createSet(status));
return pipelineJob().toJobApplications(filter).toCandidate().vals().size();
}
......@@ -261,7 +261,7 @@ public class Job extends BaseJob
public Collection<JobApplication> getSubmittedApplications()
{
Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new NotInFilter<>(ApplicationStatus.DRAFT));
Filter<JobApplication> filter = JobApplication.SearchByStageType().byStageTypesNotIn(CollectionUtils.createSet(StageType.INCOMPLETE, StageType.POST_INGEST));
return CollectionFilter.filter(getJobApplicationsSet(), filter);
}
......@@ -678,12 +678,12 @@ public class Job extends BaseJob
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
}
public List<WorkFlow> getSortedMiddleWorkFlows()
public List<WorkFlowStage> getSortedMiddleStages()
{
Filter<WorkFlow> filter = WorkFlow.SearchByAll().andSortOrder(new LessThanFilter<>(9)).andSortOrder(new GreaterThanFilter<>(1));
Filter<WorkFlowStage> filter = WorkFlowStage.SearchByAll().andSortOrder(new LessThanFilter<>(9)).andSortOrder(new GreaterThanFilter<>(1));
return ObjstoreUtils.sort(pipelineJob().toWorkFlows(filter).uniqueVals(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
return ObjstoreUtils.sort(pipelineJob().toWorkFlowTemplate().toWorkFlowStages(filter).uniqueVals(),
new ObjectTransform[]{WorkFlowStage.pipesWorkFlowStage().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
}
......@@ -701,16 +701,16 @@ public class Job extends BaseJob
return pipelineJob().toWorkFlows(filter).val();
}
public Set<WorkFlow> getIncompleteApplicantWFs()
public Set<WorkFlowStage> getIncompleteApplicantStages()
{
Filter<WorkFlow> filter = WorkFlow.SearchByAll().andApplicationStatus(new InFilter<>(ApplicationStatus.DRAFT, ApplicationStatus.UNSUITABLE));
return pipelineJob().toWorkFlows(filter).uniqueVals();
Filter<WorkFlowStage> filter = WorkFlowStage.SearchByAll().andStageType(new InFilter<>(StageType.INCOMPLETE, StageType.POST_INGEST, StageType.UNSUITABLE));
return pipelineJob().toWorkFlowTemplate().toWorkFlowStages(filter).uniqueVals();
}
public Set<WorkFlow> getApplicantWFs()
public Set<WorkFlowStage> getApplicantStages()
{
Filter<WorkFlow> filter = WorkFlow.SearchByAll().andApplicationStatus(new NotEqualsFilter<>(ApplicationStatus.DRAFT));
return pipelineJob().toWorkFlows(filter).uniqueVals();
Filter<WorkFlowStage> filter = WorkFlowStage.SearchByAll().andStageType(new NotInFilter<>(StageType.INCOMPLETE, StageType.POST_INGEST));
return pipelineJob().toWorkFlowTemplate().toWorkFlowStages(filter).uniqueVals();
}
public List<JobApplication> filterEssentialRequirements(boolean meetsRequirements, List<JobApplication> applicantList)
......
......@@ -30,6 +30,7 @@
<TRANSIENTSINGLE name="CultureTemplate" type="CultureCriteriaTemplate" />
<TRANSIENTSINGLE name="JobTemplate" type="Job" />
<TRANSIENTSINGLE name="AppStatusWorkFlow" type="WorkFlow" />
<TRANSIENTSINGLE name="AppWorkFlowStage" type="WorkFlowStage" />
<TABLE name="tl_job" tablePrefix="object" polymorphic="FALSE">
......
......@@ -61,6 +61,13 @@
oneit_sec_user.email ILIKE ${Name})">
</PARAM>
</SEARCH>
<SEARCH type="StageType" paramFilter="tl_job_application.object_id is not null">
<TABLE name="tl_work_flow_stage" join="tl_work_flow_stage.object_id = tl_job_application.work_flow_stage_id"/>
<PARAM name="StageTypesNotIn" type="Set&lt;StageType&gt;" paramFilter="tl_work_flow_stage.stage_type not in ${StageTypesNotIn} " />
<PARAM name="StageTypesIn" type="Set&lt;StageType&gt;" paramFilter="tl_work_flow_stage.stage_type in ${StageTypesNotIn} " />
</SEARCH>
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
......@@ -313,6 +313,10 @@ public class JobApplicationPersistenceMgr extends ObjectPersistenceMgr
{
throw new RuntimeException ("NOT implemented: executeSearchQueryDetails");
}
public ResultSet executeSearchQueryStageType (SQLManager sqlMgr, Set<StageType> StageTypesNotIn, Set<StageType> StageTypesIn) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryStageType");
}
......@@ -574,6 +578,58 @@ public class JobApplicationPersistenceMgr extends ObjectPersistenceMgr
return results;
}
else if (searchType.equals (JobApplication.SEARCH_StageType))
{
// Local scope for transformed variables
{
}
String orderBy = " ";
String tables = ", tl_work_flow_stage ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_job_application.object_id is not null
String preFilter = "(tl_job_application.object_id is not null)"
+ " AND (tl_work_flow_stage.object_id = tl_job_application.work_flow_stage_id) ";
if (criteria.containsKey("StageTypesNotIn"))
{
preFilter += " AND (tl_work_flow_stage.stage_type not in ${StageTypesNotIn} ) ";
preFilter += "";
}
if (criteria.containsKey("StageTypesIn"))
{
preFilter += " AND (tl_work_flow_stage.stage_type in ${StageTypesNotIn} ) ";
preFilter += "";
}
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_job_application " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
......
......@@ -200,7 +200,7 @@
</div>
<div class="col-md-8 workflow-tabs">
<%
for (WorkFlow workflow : job.getSortedWorkFlows())
for (WorkFlowStage workflow : job.getSortedWorkFlows())
{
%>
<span class="skill-label">
......
......@@ -476,9 +476,9 @@
</div>
<div id="middle-workflows">
<%
List<WorkFlow> sortedWorkflows = template.getSortedMiddleWorkFlows();
List<WorkFlowStage> sortedWorkflows = template.getSortedMiddleWorkFlows();
int index = 0;
for (WorkFlow workflow : sortedWorkflows)
for (WorkFlowStage workflow : sortedWorkflows)
{
index++;
%>
......
<%@page import="performa.orm.types.StageType"%>
<%@page import="performa.orm.WorkFlowStage"%>
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
......@@ -6,14 +8,14 @@
<%
Job job = (Job) process.getAttribute("Job");
ApplicationStatus appStatus = (ApplicationStatus) getData(request, "WorkFlowStatus");
WorkFlow workFlow = (WorkFlow) getData(request, "WorkFlow");
StageType appStatus = (StageType) getData(request, "WorkFlowStatus");
WorkFlowStage workFlow = (WorkFlowStage) getData(request, "WorkFlow");
AppView appView = (AppView) getData(request, "AppView");
String applicantsPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICANTS);
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
int noOfIncomplete = job.getNoOfCandidatesFor(ApplicationStatus.DRAFT, ApplicationStatus.POST_INGEST);
int noOfUnsuitable = job.getNoOfCandidatesFor(ApplicationStatus.UNSUITABLE);
int noOfIncomplete = job.getNoOfCandidatesFor(StageType.INCOMPLETE, StageType.POST_INGEST);
int noOfUnsuitable = job.getNoOfCandidatesFor(StageType.UNSUITABLE);
%>
<oneit:dynIncluded>
......@@ -28,10 +30,10 @@
AppView="<%= appView %>"/>
<div class="int-timeline">
<ul>
<li class="<%= "incomplete " + (noOfIncomplete > 0 ? "has-applicant" : "no-applicant") %> <%= appStatus == ApplicationStatus.DRAFT ? "active" : "inactive" %>">
<li class="<%= "incomplete " + (noOfIncomplete > 0 ? "has-applicant" : "no-applicant") %> <%= appStatus == StageType.INCOMPLETE || appStatus == StageType.POST_INGEST ? "active" : "inactive" %>">
<oneit:button id="unsuitableBtn" value=" " name="gotoPage" skin="link" disabled="<%= noOfIncomplete > 0 ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("WorkFlowStatus", ApplicationStatus.DRAFT).toMap())
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("WorkFlowStatus", StageType.INCOMPLETE).toMap())
.toMap() %>">
<span>
<oneit:toString value="<%= noOfIncomplete %>" mode="Integer" />
......@@ -42,14 +44,14 @@
</oneit:button>
</li>
<%
for (WorkFlow workflow : job.getSortedMiddleWorkFlows())
for (WorkFlowStage workflow : job.getSortedMiddleStages())
{
int noOfCandidates = workflow.getSortOrder() == 2 ? job.getNoOfCandidatesApplied() : job.getNoOfCandidatesFor(workflow.getApplicationStatus());
int noOfCandidates = workflow.getSortOrder() == 2 ? job.getNoOfCandidatesApplied() : job.getNoOfCandidatesFor(workflow.getStageType());
%>
<li class="<%= noOfCandidates > 0 ? "has-applicant" : "" %> <%= (appStatus == workflow.getApplicationStatus()) ? "active" : "inactive" %>">
<li class="<%= noOfCandidates > 0 ? "has-applicant" : "" %> <%= (appStatus == workflow.getStageType()) ? "active" : "inactive" %>">
<oneit:button value=" " name="gotoPage" skin="link" disabled="<%= noOfCandidates > 0 ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("WorkFlowStatus", workflow.getApplicationStatus()).toMap())
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("WorkFlowStatus", workflow.getStageType()).toMap())
.toMap() %>">
<span>
<oneit:toString value="<%= noOfCandidates %>" mode="Integer" />
......@@ -64,10 +66,10 @@
%>
</ul>
</div>
<div class="unsutable <%= noOfUnsuitable > 0 ? "has-applicant" : "no-applicant" %> <%= appStatus == ApplicationStatus.UNSUITABLE ? "active" : "inactive" %>">
<div class="unsutable <%= noOfUnsuitable > 0 ? "has-applicant" : "no-applicant" %> <%= appStatus == StageType.UNSUITABLE ? "active" : "inactive" %>">
<oneit:button id="unsuitableBtn" value=" " name="gotoPage" skin="link" disabled="<%= noOfUnsuitable > 0 ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("WorkFlowStatus", ApplicationStatus.UNSUITABLE).toMap())
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("WorkFlowStatus", StageType.UNSUITABLE).toMap())
.toMap() %>">
<span>
<oneit:toString value="<%= noOfUnsuitable %>" mode="Integer" />
......
......@@ -15,8 +15,8 @@
AppView appView = (AppView) getData(request,"AppView");
SearchApplicant searchApplicant = (SearchApplicant) getData(request, "SearchApplicant");
String applicantsPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICANTS) + "&JobID=" + job.getID() + "&WorkFlowStatus=" + workflowStatus.getName();
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
List<WorkFlowStage> sortedWorkFlows = ObjstoreUtils.sort(job.getApplicantStages(),
new ObjectTransform[]{WorkFlowStage.pipesWorkFlowStage().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
HiringTeam hiringTeam = job.getHiringTeam();
String keyName = WebUtils.getEnumSetKey(request, searchApplicant, SearchApplicant.FIELD_Filter, AppFilter.FACTORY_AppFilter);
......@@ -70,8 +70,8 @@
<div class="shorting-dropdown appli-left">
<span class="appli-order-label">Bulk Update</span>
<div class="wider-select bullk-app-process">
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AppStatusWorkFlow" cssClass="form-control app-process" id="AppProcessOption"
options="<%= sortedWorkFlows.toArray(new WorkFlow[0]) %>"/>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AppWorkFlowStage" cssClass="form-control app-process" id="AppProcessOption"
options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/>
</div>
<oneit:button name="bulkupdate" value=" " cssClass="bulk-update" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
......
......@@ -11,8 +11,8 @@
String currentPage = (String) getData(request, "currentPage");
ApplicationStatus appStatus = (ApplicationStatus) getData(request, "WorkFlowStatus");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getIncompleteApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
List<WorkFlowStage> sortedWorkFlows = ObjstoreUtils.sort(job.getIncompleteApplicantStages(),
new ObjectTransform[]{WorkFlowStage.pipesWorkFlowStage().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
HiringTeam hiringTeam = job.getHiringTeam();
boolean hasDiversity = job.hasDiversityQuestions();
......@@ -226,7 +226,7 @@
%>
<div class="appli-list-drop">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process"
options="<%= sortedWorkFlows.toArray(new WorkFlow[0]) %>"/>
options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/>
</div>
<%
}
......
<%@page import="performa.orm.types.StageType"%>
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
......@@ -139,7 +140,7 @@
for(Job job: jobs)
{
int shortlisted = job.getNoOfCandidatesFor(ApplicationStatus.SHORTLISTED);
int shortlisted = job.getNoOfCandidatesFor(StageType.INTERVIEW);
int maxShortlist = job.getMaxShortlistApplicants();
String editJobPage = nextPage;
......@@ -281,7 +282,7 @@
<div class="ja-count">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("ApplicationStatus", ApplicationStatus.SHORTLISTED).toMap())
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("ApplicationStatus", StageType.INTERVIEW).toMap())
.toMap() %>" disabled="<%= job.getJobStatus() == JobStatus.DRAFT ? "true" : "false" %>">
<oneit:toString value="<%= shortlisted %>" mode="Integer" nullValue="0"/>
</oneit:button>
......
......@@ -12,8 +12,8 @@
String currentPage = (String) getData(request, "currentPage");
ApplicationStatus appStatus = (ApplicationStatus) getData(request, "WorkFlowStatus");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
List<WorkFlowStage> sortedWorkFlows = ObjstoreUtils.sort(job.getApplicantStages(),
new ObjectTransform[]{WorkFlowStage.pipesWorkFlowStage().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
%>
......@@ -144,7 +144,7 @@
<div class="appli-status appli-l eq-second-height">
<div class="appli-list-drop">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process"
options="<%= sortedWorkFlows.toArray(new WorkFlow[0]) %>"/>
options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/>
</div>
</div>
<oneit:button name="changeApplicationStatus" value=" " cssClass="<%= "save-application" + jobApplication.getID().toString() + " hidden"%>"
......
<%@page import="performa.orm.types.StageType"%>
<%@page import="performa.orm.*"%>
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
......@@ -18,8 +20,9 @@
boolean missingReq = jobApplication.hasFailedEssentialRequirements();
boolean hasAllReq = jobApplication.hasAllEssentialRequirements();
WorkFlow workflow = job.getWorkFlowByStatus(jobApplication.getApplicationStatus());
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT ? job.getIncompleteApplicantWFs() : job.getApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
List<WorkFlowStage> sortedWorkFlows = ObjstoreUtils.sort(jobApplication.getWorkFlowStage().getStageType() == StageType.INCOMPLETE ||
jobApplication.getWorkFlowStage().getStageType() == StageType.POST_INGEST ? job.getIncompleteApplicantStages() : job.getApplicantStages(),
new ObjectTransform[]{WorkFlowStage.pipesWorkFlowStage().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
Integer overallRank = jobApplication.getOverallRank();
boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
......@@ -149,7 +152,7 @@
<span class="appli-status-short">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process"
options="<%= sortedWorkFlows.toArray(new WorkFlow[0]) %>"/>
options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/>
<oneit:button name="changeApplicationStatus" value=" " cssClass="save-application hidden"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry ("restartProcess", Boolean.TRUE)
......
......@@ -484,9 +484,9 @@
</div>
<div id="middle-workflows">
<%
List<WorkFlow> sortedWorkflows = job.getSortedMiddleWorkFlows();
List<WorkFlowStage> sortedWorkflows = job.getSortedMiddleStages();
int index = 0;
for (WorkFlow workflow : sortedWorkflows)
for (WorkFlowStage workflow : sortedWorkflows)
{
index++;
%>
......@@ -497,7 +497,7 @@
<span><%= workflow.getSortOrder() %></span>
<oneit:ormInput obj="<%= workflow %>" type="text" attributeName="Name" cssClass="form-control" />
<%
if(workflow.getApplicationStatus() != ApplicationStatus.SUBMITTED && workflow.getApplicationStatus() != ApplicationStatus.SHORTLISTED)
if(workflow.getStageType() != StageType.INTERVIEW && workflow.getStageType() != StageType.INTERVIEW)
{
String deleteVarKey = FormTag.getVariableKey (request);
......
<%@page import="oneit.utils.CollectionUtils"%>
<%@page import="oneit.objstore.rdbms.filters.*"%>
<%@page import="java.util.*"%>
<%@page import="oneit.servlets.orm.*"%>
<%@page import="performa.search.*"%>
<%@page import="performa.orm.types.*"%>
<%@page import="performa.utils.*"%>
<%@page import="oneit.security.SecUser"%>
<%@page import="oneit.utils.Debug"%>
<%@page import="performa.orm.*"%>
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
......
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