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
c661444b
Commit
c661444b
authored
Jan 13, 2019
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Job List: Extend expiration
parent
e98b0149
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
33 deletions
+36
-33
CreatePlanFP.java
cmsWebApp/src/performa/form/CreatePlanFP.java
+0
-1
ExtendJobFP.java
cmsWebApp/src/performa/form/ExtendJobFP.java
+30
-30
CustomServlets_adminPortal.xml
...oot/extensions/adminportal/CustomServlets_adminPortal.xml
+1
-0
job_list.jsp
cmsWebApp/webroot/extensions/adminportal/inc/job_list.jsp
+5
-2
No files found.
cmsWebApp/src/performa/form/CreatePlanFP.java
View file @
c661444b
...
@@ -2,7 +2,6 @@ package performa.form;
...
@@ -2,7 +2,6 @@ package performa.form;
import
com.stripe.Stripe
;
import
com.stripe.Stripe
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogMgr
;
import
oneit.logging.LogMgr
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.StorageException
;
...
...
cmsWebApp/src/performa/form/ExtendJobFP.java
View file @
c661444b
package
performa
.
form
;
package
performa
.
form
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogMgr
;
import
oneit.logging.LogMgr
;
import
oneit.logging.LoggingArea
;
import
oneit.logging.LoggingArea
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.parser.BusinessObjectParser
;
import
oneit.security.SecUser
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.servlets.forms.SuccessfulResult
;
import
oneit.servlets.forms.SuccessfulResult
;
import
oneit.servlets.process.ORMProcessState
;
import
oneit.servlets.process.ORMProcessState
;
import
oneit.servlets.process.SaveFP
;
import
oneit.servlets.process.SaveFP
;
import
oneit.utils.BusinessException
;
import
oneit.utils.BusinessException
;
import
oneit.utils.MultiException
;
import
oneit.utils.DateDiff
;
import
performa.orm.CompanyUser
;
import
oneit.utils.math.NullArith
;
import
performa.orm.JobApplication
;
import
performa.orm.HiringTeam
;
import
performa.orm.Note
;
import
performa.orm.Job
;
import
performa.utils.StripeUtils
;
public
class
ExtendJobFP
extends
SaveFP
public
class
ExtendJobFP
extends
SaveFP
{
{
private
static
final
LoggingArea
LOG
=
LoggingArea
.
createLoggingArea
(
"ExtendJobFP"
);
private
static
final
LoggingArea
LOG
=
LoggingArea
.
createLoggingArea
(
"ExtendJobFP"
);
@Override
@Override
public
void
validate
(
ORMProcessState
process
,
SubmissionDetails
submission
,
MultiException
exceptions
,
Map
params
)
throws
StorageException
public
SuccessfulResult
processForm
(
ORMProcessState
process
,
SubmissionDetails
submission
,
Map
params
)
throws
BusinessException
,
StorageException
{
{
HttpServletRequest
request
=
submission
.
getRequest
();
HttpServletRequest
request
=
submission
.
getRequest
();
JobApplication
jobApplication
=
(
JobApplication
)
request
.
getAttribute
(
"JobApplication"
);
Job
job
=
(
Job
)
request
.
getAttribute
(
"Job"
);
HiringTeam
hiringTeam
=
job
.
getHiringTeam
();
HiringTeam
billingTeam
=
hiringTeam
.
getManageOwnBilling
()
?
hiringTeam
:
hiringTeam
.
getBilledByTeam
();
super
.
validate
(
process
,
submission
,
exceptions
,
params
);
LogMgr
.
log
(
LOG
,
LogLevel
.
PROCESSING1
,
"Start of Extend job : "
,
job
);
}
job
.
setApplyBy
(
DateDiff
.
add
(
job
.
getApplyBy
(),
Calendar
.
DATE
,
30
));
job
.
setLastEdited
(
new
Date
());
@Override
if
(
billingTeam
.
canCreateJob
())
public
SuccessfulResult
processForm
(
ORMProcessState
process
,
SubmissionDetails
submission
,
Map
params
)
throws
BusinessException
,
StorageException
{
{
billingTeam
.
setUsedCredits
(
NullArith
.
add
(
billingTeam
.
getUsedCredits
(),
1
).
intValue
());
ObjectTransaction
objTran
=
process
.
getTransaction
();
HttpServletRequest
request
=
submission
.
getRequest
();
if
(
billingTeam
.
getUsedCredits
()
>
billingTeam
.
getAvailableCredits
())
JobApplication
jobApplication
=
(
JobApplication
)
request
.
getAttribute
(
"JobApplication"
);
{
StripeUtils
.
recordUsage
(
billingTeam
);
}
}
else
if
(
billingTeam
.
getIsPPJ
())
{
StripeUtils
.
makePayment
(
hiringTeam
,
job
);
}
// LogMgr.log(LOG, LogLevel.PROCESSING1, "Adding note to job application : ", jobApplication);
LogMgr
.
log
(
LOG
,
LogLevel
.
PROCESSING1
,
"Job Extended. Apply by date : "
,
job
.
getApplyBy
());
//
// Note note = Note.createNote(objTran);
// SecUser secUser = SecUser.getTXUser(process.getTransaction());
// CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
//
// note.setComment(jobApplication.getNote());
// note.setCreatedUser(companyUser);
// note.setJobApplication(jobApplication);
//
// LogMgr.log(LOG, LogLevel.PROCESSING1, "New note added : ", note);
return
super
.
processForm
(
process
,
submission
,
params
);
return
super
.
processForm
(
process
,
submission
,
params
);
}
}
...
...
cmsWebApp/webroot/extensions/adminportal/CustomServlets_adminPortal.xml
View file @
c661444b
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
<FORM
name=
"*.loadCultureFromTemplate"
factory=
"Participant"
class=
"performa.form.LoadCultureFromTemplateFP"
/>
<FORM
name=
"*.loadCultureFromTemplate"
factory=
"Participant"
class=
"performa.form.LoadCultureFromTemplateFP"
/>
<FORM
name=
"*.changeApplicationStatus"
factory=
"Participant"
class=
"performa.form.ChangeApplicationStatusFP"
/>
<FORM
name=
"*.changeApplicationStatus"
factory=
"Participant"
class=
"performa.form.ChangeApplicationStatusFP"
/>
<FORM
name=
"*.addNote"
factory=
"Participant"
class=
"performa.form.AddNoteFP"
/>
<FORM
name=
"*.addNote"
factory=
"Participant"
class=
"performa.form.AddNoteFP"
/>
<FORM
name=
"*.extendJob"
factory=
"Participant"
class=
"performa.form.ExtendJobFP"
/>
<FORM
name=
"*.bulkupdate"
factory=
"Participant"
class=
"performa.form.BulkUpdateFP"
/>
<FORM
name=
"*.bulkupdate"
factory=
"Participant"
class=
"performa.form.BulkUpdateFP"
/>
<FORM
name=
"*.navigateBetweenStatus"
factory=
"Participant"
class=
"performa.form.NavigateBetweenStatusFP"
/>
<FORM
name=
"*.navigateBetweenStatus"
factory=
"Participant"
class=
"performa.form.NavigateBetweenStatusFP"
/>
<FORM
name=
"*.sendCompanyUserInvites"
factory=
"Participant"
class=
"performa.form.SendCompanyUserInvitesFP"
>
<FORM
name=
"*.sendCompanyUserInvites"
factory=
"Participant"
class=
"performa.form.SendCompanyUserInvitesFP"
>
...
...
cmsWebApp/webroot/extensions/adminportal/inc/job_list.jsp
View file @
c661444b
...
@@ -88,6 +88,8 @@
...
@@ -88,6 +88,8 @@
</style>
</style>
<div class="main-job-list">
<div class="main-job-list">
<oneit:button skin="link" value=" " name="extendJob" cssClass="hide"
requestAttribs="<%= CollectionUtils.EMPTY_MAP %>" />
<%
<%
ObjectTransaction objTran = process.getTransaction ();
ObjectTransaction objTran = process.getTransaction ();
CompanyUser companyUser = SecUser.getTXUser(objTran).getExtension(CompanyUser.REFERENCE_CompanyUser);
CompanyUser companyUser = SecUser.getTXUser(objTran).getExtension(CompanyUser.REFERENCE_CompanyUser);
...
@@ -177,7 +179,8 @@
...
@@ -177,7 +179,8 @@
Are you sure you want to extend this job?
Are you sure you want to extend this job?
</h3>
</h3>
<div class="extend-job-info">
<div class="extend-job-info">
Extending this Job will add an additional 30 days for applicants to apply. By confirming the new close date for this job will be 13 September 2018.
Extending this Job will add an additional 30 days for applicants to apply. By confirming the new close date for this job will be
<oneit:toString value="<%= DateDiff.add(job.getApplyBy(), Calendar.DATE, 30) %>" mode="LongDate" />.
Would you like to continue?
Would you like to continue?
</div>
</div>
</div>
</div>
...
@@ -185,7 +188,7 @@
...
@@ -185,7 +188,7 @@
<a class="change-plan-no-button popup-no-button">No</a>
<a class="change-plan-no-button popup-no-button">No</a>
<oneit:button skin="link" value="Yes" name="extendJob" cssClass="change-plan-yes-button"
<oneit:button skin="link" value="Yes" name="extendJob" cssClass="change-plan-yes-button"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", homePage)
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", homePage)
.mapEntry("
procParams", CollectionUtils.mapEntry("Job", job).mapEntry("ApplicationStatus", ApplicationStatus.SHORTLISTED).toMap()
)
.mapEntry("
Job", job
)
.toMap() %>" />
.toMap() %>" />
</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