Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
fa829685
Commit
fa829685
authored
Jul 10, 2017
by
Harsh Shah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review changes, issue fixes
parent
d1dd3428
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
113 deletions
+102
-113
Job.java
cmsWebApp/src/performa/orm/Job.java
+24
-25
JobApplication.java
cmsWebApp/src/performa/orm/JobApplication.java
+43
-49
edit_job.jsp
cmsWebApp/webroot/extensions/adminportal/edit_job.jsp
+1
-1
page_admin_home.jsp
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
+3
-4
application_main_tabs.jsp
.../extensions/applicantportal/inc/application_main_tabs.jsp
+5
-28
job_match_assessment.jsp
...broot/extensions/applicantportal/job_match_assessment.jsp
+26
-6
No files found.
cmsWebApp/src/performa/orm/Job.java
View file @
fa829685
...
...
@@ -2,7 +2,7 @@ package performa.orm;
import
java.util.*
;
import
oneit.logging.LoggingArea
;
import
oneit.objstore.
ValidationContext
;
import
oneit.objstore.
*
;
import
oneit.objstore.rdbms.filters.*
;
import
oneit.objstore.utils.ObjstoreUtils
;
import
oneit.security.*
;
...
...
@@ -46,6 +46,18 @@ public class Job extends BaseJob
}
@Override
public
void
validate
(
ValidationContext
context
)
{
super
.
validate
(
context
);
if
(
getIncludeAssessmentCriteria
())
{
context
.
check
(
getAssessmentCriteriasCount
()
>
0
,
this
,
MULTIPLEREFERENCE_AssessmentCriterias
,
"atleastOneRequirement"
);
}
}
public
Boolean
jobDetailsCompleted
()
{
return
getJobTitle
()
!=
null
&&
getJobDescription
()
!=
null
;
...
...
@@ -114,53 +126,40 @@ public class Job extends BaseJob
}
public
L
ist
<
Level
>
getAllLevels
()
public
L
evel
[]
getAllLevels
()
{
List
<
Level
>
levels
=
new
ArrayList
<>();
Utils
.
getLevelsForComprehensive
(
getTransaction
()).
stream
().
forEach
((
tuple
)
->
{
levels
.
add
((
Level
)
tuple
.
get0
());
});
return
levels
;
return
levels
.
toArray
(
new
Level
[
0
]);
}
@Override
public
void
validate
(
ValidationContext
context
)
{
super
.
validate
(
context
);
if
(
getIncludeAssessmentCriteria
())
public
int
getNoOfCandidatesApplied
()
{
context
.
check
(
getAssessmentCriteriasCount
()
>
0
,
this
,
MULTIPLEREFERENCE_AssessmentCriterias
,
"atleastOneRequirement"
);
}
return
getNoOfCandidatesFor
(
ApplicationStatus
.
SUBMITTED
);
}
public
int
getNoOfCandidatesApplied
()
public
int
getNoOfCandidatesShortlisted
()
{
Filter
<
JobApplication
>
filter
=
JobApplication
.
SearchByAll
().
andApplicationStatus
(
new
EqualsFilter
<>(
ApplicationStatus
.
SUBMITTED
));
return
this
.
pipelineJob
().
toJobApplications
(
filter
).
toCandidate
().
vals
().
size
();
return
getNoOfCandidatesFor
(
ApplicationStatus
.
SHORTLISTED
);
}
public
int
getNoOfCandidatesShortlisted
()
public
int
getNoOfCandidatesFor
(
ApplicationStatus
status
)
{
Filter
<
JobApplication
>
filter
=
JobApplication
.
SearchByAll
().
andApplicationStatus
(
new
EqualsFilter
<>(
ApplicationStatus
.
SHORTLISTED
));
Filter
<
JobApplication
>
filter
=
JobApplication
.
SearchByAll
().
andApplicationStatus
(
new
EqualsFilter
<>(
status
));
return
this
.
pipelineJob
().
toJobApplications
(
filter
).
toCandidate
().
vals
().
size
();
return
pipelineJob
().
toJobApplications
(
filter
).
toCandidate
().
vals
().
size
();
}
public
String
getDaysTillClose
()
{
StringBuilder
sb
=
new
StringBuilder
();
if
(
this
.
getApplyBy
()!=
null
)
if
(
getApplyBy
()!=
null
)
{
int
dateDiff
=
DateDiff
.
getDateDiff
(
Calendar
.
DATE
,
DateDiff
.
getToday
(),
this
.
getApplyBy
());
int
dateDiff
=
DateDiff
.
getDateDiff
(
Calendar
.
DATE
,
DateDiff
.
getToday
(),
getApplyBy
());
sb
.
append
(
dateDiff
);
...
...
cmsWebApp/src/performa/orm/JobApplication.java
View file @
fa829685
package
performa
.
orm
;
import
java.util.
Collection
;
import
java.util.
*
;
import
oneit.logging.LoggingArea
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.rdbms.filters.EqualsFilter
;
import
oneit.objstore.rdbms.filters.IsNotNullFilter
;
import
oneit.utils.CollectionUtils
;
import
oneit.utils.filter.CollectionFilter
;
import
oneit.utils.filter.Filter
;
import
oneit.utils.parsers.FieldException
;
...
...
@@ -54,48 +53,55 @@ public class JobApplication extends BaseJobApplication
}
public
B
oolean
initCCAnswers
()
public
b
oolean
initCCAnswers
()
{
Boolean
redirect
=
Boolean
.
FALSE
;
boolean
redirect
=
false
;
if
(
this
.
getCultureCriteriaAnswersCount
()==
0
)
if
(
getCultureCriteriaAnswersCount
()
==
0
)
//initCCAnswers not called yet
{
for
(
CultureCriteria
cultureCriteria
:
getJob
().
getCultureCriteriasSet
())
{
redirect
=
Boolean
.
TRUE
;
redirect
=
true
;
CultureCriteriaAnswer
answer
=
CultureCriteriaAnswer
.
createCultureCriteriaAnswer
(
getTransaction
());
addToCultureCriteriaAnswers
(
answer
);
cultureCriteria
.
addToAnswers
(
answer
);
}
}
return
redirect
;
}
public
Answer
getPAAnswerOrCreate
(
Question
question
,
int
index
)
throws
FieldException
public
boolean
initAssessmentAnswers
(
List
<
Question
>
allQuestions
)
throws
StorageException
,
FieldException
{
Filter
filter
=
Answer
.
SearchByAll
().
andQuestion
(
new
EqualsFilter
<>(
question
));
Answer
answer
=
CollectionFilter
.
getFirstMatch
(
getProfileAssessmentAnswersSet
(),
filter
);
boolean
redirect
=
false
;
if
(
answer
==
null
)
if
(
getProfileAssessmentAnswersCount
()
==
0
)
{
answer
=
Answer
.
createAnswer
(
getTransaction
());
for
(
Question
question
:
allQuestions
)
{
redirect
=
true
;
Answer
answer
=
Answer
.
createAnswer
(
getTransaction
());
answer
.
setJobApplication
(
this
);
addToProfileAssessmentAnswers
(
answer
);
answer
.
setQuestion
(
question
);
if
(
question
.
getRightQuestion
()!=
null
)
if
(
question
.
getRightQuestion
()
!=
null
)
{
Answer
rightAnswer
=
Answer
.
createAnswer
(
getTransaction
());
rightAnswer
.
setJobApplication
(
this
);
addToProfileAssessmentAnswers
(
rightAnswer
);
rightAnswer
.
setQuestion
(
question
);
}
}
}
return
redirect
;
}
public
Answer
getAnswerForQuestion
(
Question
question
)
throws
FieldException
{
Filter
filter
=
Answer
.
SearchByAll
().
andQuestion
(
new
EqualsFilter
<>(
question
));
return
answer
;
return
CollectionFilter
.
getFirstMatch
(
getProfileAssessmentAnswersSet
(),
filter
)
;
}
...
...
@@ -107,66 +113,54 @@ public class JobApplication extends BaseJobApplication
}
public
B
oolean
selectionCompleted
()
public
b
oolean
selectionCompleted
()
{
int
all
=
this
.
getAssessmentCriteriaAnswersCount
();
int
all
AnswersCount
=
getAssessmentCriteriaAnswersCount
();
if
(
all
>
0
)
if
(
all
AnswersCount
>
0
)
{
Filter
filter
=
AssessmentCriteriaAnswer
.
SearchByAll
().
andAnswer
(
new
IsNotNullFilter
<>());
Collection
selected
=
this
.
pipelineJobApplication
().
toAssessmentCriteriaAnswers
(
filter
).
toAnswer
(
).
vals
();
Collection
selected
Answers
=
pipelineJobApplication
().
toAssessmentCriteriaAnswers
(
filter
).
vals
();
if
(
selected
!=
null
&&
CollectionUtils
.
equals
(
selected
.
size
(),
all
))
{
return
Boolean
.
TRUE
;
}
return
(
selectedAnswers
.
size
()
==
allAnswersCount
);
}
return
Boolean
.
FALSE
;
return
false
;
}
public
B
oolean
cultureCompleted
()
public
b
oolean
cultureCompleted
()
{
int
all
=
this
.
getCultureCriteriaAnswersCount
();
int
all
AnswersCount
=
getCultureCriteriaAnswersCount
();
if
(
all
>
0
)
if
(
all
AnswersCount
>
0
)
{
Filter
filter
=
CultureCriteriaAnswer
.
SearchByAll
().
andSelectedQuestion
(
new
IsNotNullFilter
<>());
Collection
selected
=
this
.
pipelineJobApplication
().
toCultureCriteriaAnswers
(
filter
).
toSelectedQuestion
(
).
vals
();
Collection
selected
Answers
=
pipelineJobApplication
().
toCultureCriteriaAnswers
(
filter
).
vals
();
if
(
selected
!=
null
&&
CollectionUtils
.
equals
(
selected
.
size
(),
all
))
{
return
Boolean
.
TRUE
;
return
(
selectedAnswers
.
size
()
==
allAnswersCount
);
}
return
false
;
}
return
Boolean
.
FALSE
;
}
public
Boolean
assessmentCompleted
()
public
boolean
assessmentCompleted
()
{
int
all
=
this
.
getJob
().
getAllProfileAssessmentQuestions
().
size
();
int
all
AnswersCount
=
getJob
().
getAllProfileAssessmentQuestions
().
size
();
if
(
all
>
0
)
if
(
all
AnswersCount
>
0
)
{
Filter
filter
=
Answer
.
SearchByAll
().
andAnswerNo
(
new
IsNotNullFilter
<>());
Collection
selected
=
this
.
pipelineJobApplication
().
toProfileAssessmentAnswers
(
filter
).
toAnswerNo
(
).
vals
();
Collection
selected
Answers
=
pipelineJobApplication
().
toProfileAssessmentAnswers
(
filter
).
vals
();
if
(
selected
!=
null
&&
CollectionUtils
.
equals
(
selected
.
size
(),
all
))
{
return
Boolean
.
TRUE
;
return
(
selectedAnswers
.
size
()
==
allAnswersCount
);
}
}
return
Boolean
.
FALSE
;
return
false
;
}
public
B
oolean
isIncludeAssessmentCriteria
()
public
b
oolean
isIncludeAssessmentCriteria
()
{
return
this
.
getJob
().
getIncludeAssessmentCriteria
(
);
return
getJob
()
!=
null
&&
isTrue
(
getJob
().
getIncludeAssessmentCriteria
()
);
}
// TODO: Fix these hard coded values
...
...
cmsWebApp/webroot/extensions/adminportal/edit_job.jsp
View file @
fa829685
...
...
@@ -37,7 +37,7 @@
<div class="col-sm-6 col-xs-12 form-group">
<label>Role Type</label>
<!--TODO: Levels are not named properly. apply styling form-control class-->
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="Level" options
Script="job.getAllLevels()" job="<%= job
%>"/>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="Level" options
="<%= job.getAllLevels()
%>"/>
</div>
</div>
<div class="optional-title">OPTIONAL</div>
...
...
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
View file @
fa829685
...
...
@@ -7,9 +7,8 @@
<oneit:dynIncluded>
<%
//TODO: filter with Client;
ObjectTransaction objTran = process.getTransaction ();
Job[] jobs = Job.SearchByAll().andJobStatus(new EqualsFilter<>(JobStatus.OPEN)).search(transaction);
Article jobsArticle = WebUtils.getArticleByShortCut(
objTra
n, WebUtils.JOBS);
Article jobsArticle = WebUtils.getArticleByShortCut(
transactio
n, WebUtils.JOBS);
String nextPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.VIEW_APPLICANTS).toMap());
String homePage = WebUtils.getSamePageInRenderMode(request, "Page");
...
...
@@ -18,8 +17,8 @@
<div class="dashboard-content-area first-part">
<div class="welcome-box">
<div class="dashboard-welcome">
<div class="welcome-text"> Welcome <br/> back
Maria
! </div>
<a class="d-create-job-btn" href="<%= WebUtils.getArticleLink(request,
objTra
n, WebUtils.CREATE_JOB, "Page") %>">Create New Job</a>
<div class="welcome-text"> Welcome <br/> back
<%= oneit.security.jsp.SecUserToNameTransform.INSTANCE.transform(SecUser.getTXUser(transaction)) %>
! </div>
<a class="d-create-job-btn" href="<%= WebUtils.getArticleLink(request,
transactio
n, WebUtils.CREATE_JOB, "Page") %>">Create New Job</a>
</div>
<div class="col-sm-3 col-xs-12 d-three-box green-light">
<div class="d-fl-left eq-height">
...
...
cmsWebApp/webroot/extensions/applicantportal/inc/application_main_tabs.jsp
View file @
fa829685
...
...
@@ -10,6 +10,7 @@
String firstPage = WebUtils.getSamePageInRenderMode(request, "SelectionCriteria");
String secondPage = WebUtils.getSamePageInRenderMode(request, "WorkplaceCulture");
String thirdPage = WebUtils.getSamePageInRenderMode(request, "JobMatchAssessment");
boolean includeAssessment = jobApplication.isIncludeAssessmentCriteria();
%>
<oneit:dynIncluded>
...
...
@@ -17,7 +18,7 @@
<div class="main-tab-form">
<ul class="nav nav-pills nav-justified">
<%
if(jobApplication.isIncludeAssessmentCriteria()
)
if(includeAssessment
)
{
%>
<li class="<%= pageNumber == "1" ? "active" : jobApplication.selectionCompleted() ? "complate" : ""%>">
...
...
@@ -29,36 +30,15 @@
<div class="mobile-hide">Selection Criteria</div>
</oneit:button>
</li>
<li class="<%= pageNumber == "2" ? "active" : jobApplication.cultureCompleted() ? "complate" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", secondPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>">
<span><%= jobApplication.cultureCompleted() ? "<img src=\"images/right-mark.png\" />" : "2"%></span>
<div class="mobile-hide">Workplace Culture</div>
</oneit:button>
</li>
<li class="<%= pageNumber == "3" ? "active" : jobApplication.assessmentCompleted() ? "complate" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", thirdPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>">
<span><%= jobApplication.assessmentCompleted() ? "<img src=\"images/right-mark.png\" />" : "3"%></span>
<div class="mobile-hide">Job Match Assessment</div>
</oneit:button>
</li>
<li><a href="#"><span>4</span><div class="mobile-hide">Submit Application</div></a></li>
<%
}
else
{
%>
<li class="<%= pageNumber == "2" ? "active" : jobApplication.cultureCompleted() ? "complate" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", secondPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>">
<span><%= jobApplication.cultureCompleted() ? "<img src=\"images/right-mark.png\" />" : "1"
%></span>
<span><%= jobApplication.cultureCompleted() ? "<img src=\"images/right-mark.png\" />" : (includeAssessment ? "2" : "1")
%></span>
<div class="mobile-hide">Workplace Culture</div>
</oneit:button>
</li>
...
...
@@ -67,14 +47,11 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", thirdPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>">
<span><%= jobApplication.assessmentCompleted() ? "<img src=\"images/right-mark.png\" />" : "2"
%></span>
<span><%= jobApplication.assessmentCompleted() ? "<img src=\"images/right-mark.png\" />" : (includeAssessment ? "3" : "2")
%></span>
<div class="mobile-hide">Job Match Assessment</div>
</oneit:button>
</li>
<li><a href="#"><span>3</span><div class="mobile-hide">Submit Application</div></a></li>
<%
}
%>
<li><a href="#"><span><%= includeAssessment ? "4" : "3" %></span><div class="mobile-hide">Submit Application</div></a></li>
</ul>
</div>
</oneit:dynIncluded>
cmsWebApp/webroot/extensions/applicantportal/job_match_assessment.jsp
View file @
fa829685
...
...
@@ -5,7 +5,6 @@
<oneit:dynIncluded>
<%
ObjectTransaction objTran = process.getTransaction ();
String currentPage = WebUtils.getSamePageInRenderMode(request, "JobMatchAssessment");
String nextPage = WebUtils.getSamePageInRenderMode(request, "SubmitApplication");
JobApplication jobApplication = (JobApplication) process.getAttribute("JobApplication");
...
...
@@ -14,16 +13,30 @@
String sectionNo = jobApplication.isIncludeAssessmentCriteria() ? "3" : "2";
List<Question> allQuestions = (List<Question>) process.getAttribute("AllQuestions");
if(allQuestions
==
null)
if(allQuestions
==
null)
{
allQuestions = job.getAllLeftQuestions();
process.setAttribute("AllQuestions", allQuestions);
}
boolean toRedirect = jobApplication.initAssessmentAnswers(allQuestions);
if(toRedirect)
{
%><%@include file="/saferedirect.jsp" %><%
}
%>
<script>
$(document.body).addClass('bg-color');
$(document).ready(function(){
$(".answer_radio").change(function(){
$(".ratting-number li.active").removeClass("active" );
$(".ratting-number input[type='radio']:checked").closest('li').addClass("active" );
});
});
</script>
<div class="main-application-outline">
...
...
@@ -65,9 +78,9 @@
FormBuilder formBuilder = applicationForm.getFormBuilder();
int totNoOfQuestions = allQuestions.size();
if(questionNumber<
totNoOfQuestions)
if(questionNumber <
totNoOfQuestions)
{
Answer answer = jobApplication.getPAAnswerOrCreate(allQuestions.get(questionNumber), questionNumber
);
Answer answer = jobApplication.getAnswerForQuestion(allQuestions.get(questionNumber)
);
String optionKey = WebUtils.getInputKey(request, answer, Answer.FIELD_AnswerNo);
String formValue = formBuilder.fieldValue (optionKey, answer.getAnswerNo() == null ? "" : String.valueOf(answer.getAnswerNo()));
String numberText = (questionNumber + 1) + "/" + totNoOfQuestions;
...
...
@@ -90,7 +103,7 @@
%>
<li class="<%= activeStr %>">
<a href="javascript:void(0);">
<input
type="radio" name="<%= optionKey %>" id="<%= index %>"
value="<%= index %>" <%= selectedStr %>>
<input
type="radio" name="<%= optionKey %>" id="<%= index %>" class="answer_radio"
value="<%= index %>" <%= selectedStr %>>
<label for="<%= index %>"><%= index %></label>
</a>
</li>
...
...
@@ -103,7 +116,7 @@
<%
}
%>
<div
>
<div>
<span style="float: left">
<%
if(questionNumber>0)
...
...
@@ -132,12 +145,19 @@
</span>
</div>
<div class="auto-save">
<%
if((questionNumber+1) == totNoOfQuestions)
{
%>
<oneit:button value="Complete" name="completeApplication" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.mapEntry("restartProcess", Boolean.TRUE)
.toMap() %>"/>
<%
}
%>
<%-- <div>Autosaved 1 min ago.</div> --%>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment