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
0466906a
Commit
0466906a
authored
Feb 26, 2018
by
chenith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
J006 updated.
parent
62614537
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
16 deletions
+72
-16
SaveJobFP.java
cmsWebApp/src/performa/form/SaveJobFP.java
+9
-5
BaseCompany.java
cmsWebApp/src/performa/orm/BaseCompany.java
+0
-0
Company.java
cmsWebApp/src/performa/orm/Company.java
+22
-2
Company.xml
cmsWebApp/src/performa/orm/Company.xml
+1
-0
Utils.java
cmsWebApp/src/performa/utils/Utils.java
+9
-0
common.css
cmsWebApp/webroot/css/common.css
+5
-0
job_payment.jsp
cmsWebApp/webroot/extensions/adminportal/job_payment.jsp
+26
-9
No files found.
cmsWebApp/src/performa/form/SaveJobFP.java
View file @
0466906a
...
@@ -26,9 +26,12 @@ public class SaveJobFP extends SaveFP
...
@@ -26,9 +26,12 @@ public class SaveJobFP extends SaveFP
@Override
@Override
public
SuccessfulResult
processForm
(
ORMProcessState
process
,
SubmissionDetails
submission
,
Map
params
)
throws
BusinessException
,
StorageException
public
SuccessfulResult
processForm
(
ORMProcessState
process
,
SubmissionDetails
submission
,
Map
params
)
throws
BusinessException
,
StorageException
{
{
HttpServletRequest
request
=
submission
.
getRequest
();
HttpServletRequest
request
=
submission
.
getRequest
();
Job
job
=
process
.
getAttribute
(
"Job"
)
!=
null
?
(
Job
)
process
.
getAttribute
(
"Job"
)
:
(
Job
)
request
.
getAttribute
(
"Job"
);
Job
job
=
process
.
getAttribute
(
"Job"
)
!=
null
?
(
Job
)
process
.
getAttribute
(
"Job"
)
:
(
Job
)
request
.
getAttribute
(
"Job"
);
JobStatus
status
=
(
JobStatus
)
request
.
getAttribute
(
"JobStatus"
);
JobStatus
status
=
(
JobStatus
)
request
.
getAttribute
(
"JobStatus"
);
SecUser
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
CompanyUser
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
Company
company
=
companyUser
.
getCompany
();
LogMgr
.
log
(
Job
.
LOG
,
LogLevel
.
PROCESSING1
,
"In SaveJobFP saving job : "
,
job
);
LogMgr
.
log
(
Job
.
LOG
,
LogLevel
.
PROCESSING1
,
"In SaveJobFP saving job : "
,
job
);
...
@@ -49,6 +52,7 @@ public class SaveJobFP extends SaveFP
...
@@ -49,6 +52,7 @@ public class SaveJobFP extends SaveFP
if
(
status
==
JobStatus
.
OPEN
)
if
(
status
==
JobStatus
.
OPEN
)
{
{
job
.
setJobStatus
(
status
);
job
.
setJobStatus
(
status
);
company
.
setPaymentPlan
(
company
.
getSelectedPaymentPlan
());
LogMgr
.
log
(
Job
.
LOG
,
LogLevel
.
PROCESSING1
,
"Job status changed as Open. "
,
job
);
LogMgr
.
log
(
Job
.
LOG
,
LogLevel
.
PROCESSING1
,
"Job status changed as Open. "
,
job
);
}
}
...
@@ -67,8 +71,8 @@ public class SaveJobFP extends SaveFP
...
@@ -67,8 +71,8 @@ public class SaveJobFP extends SaveFP
// restarting process as custom attributes needs to be updated to intercom
// restarting process as custom attributes needs to be updated to intercom
completeProcessRestartAndRestoreAttribs
(
process
,
request
);
completeProcessRestartAndRestoreAttribs
(
process
,
request
);
SecUser
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
CompanyUser
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
// Update company in intercom
// Update company in intercom
if
(
companyUser
.
getCompany
()
!=
null
)
if
(
companyUser
.
getCompany
()
!=
null
)
...
...
cmsWebApp/src/performa/orm/BaseCompany.java
View file @
0466906a
This diff is collapsed.
Click to expand it.
cmsWebApp/src/performa/orm/Company.java
View file @
0466906a
...
@@ -3,6 +3,8 @@ package performa.orm;
...
@@ -3,6 +3,8 @@ package performa.orm;
import
oneit.logging.LoggingArea
;
import
oneit.logging.LoggingArea
;
import
oneit.objstore.ObjectStatus
;
import
oneit.objstore.ObjectStatus
;
import
oneit.objstore.ValidationContext
;
import
oneit.objstore.ValidationContext
;
import
oneit.objstore.rdbms.filters.EqualsFilter
;
import
oneit.objstore.rdbms.filters.IsNotNullFilter
;
import
oneit.security.SecUser
;
import
oneit.security.SecUser
;
import
oneit.utils.CollectionUtils
;
import
oneit.utils.CollectionUtils
;
import
oneit.utils.StringUtils
;
import
oneit.utils.StringUtils
;
...
@@ -75,11 +77,29 @@ public class Company extends BaseCompany
...
@@ -75,11 +77,29 @@ public class Company extends BaseCompany
}
}
public
PaymentPlan
getSelectedPaymentPlan
()
{
if
(
getPaymentJobCount
()!=
null
)
{
PaymentPlan
[]
plans
=
PaymentPlan
.
SearchByAll
()
.
andActiveJobCount
(
new
EqualsFilter
<>(
getPaymentJobCount
()))
.
search
(
getTransaction
());
if
(
plans
.
length
>
0
)
{
return
plans
[
0
];
}
}
return
null
;
}
public
Double
getPaymentPlanAmount
()
public
Double
getPaymentPlanAmount
()
{
{
if
(
getPaymentPlan
()!=
null
)
if
(
get
Selected
PaymentPlan
()!=
null
)
{
{
return
getPaymentPlan
().
getAmount
();
return
get
Selected
PaymentPlan
().
getAmount
();
}
}
return
null
;
return
null
;
...
...
cmsWebApp/src/performa/orm/Company.xml
View file @
0466906a
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<TRANSIENT
name=
"RoleType"
type=
"RoleType"
defaultValue=
"RoleType.STANDARD"
attribHelper=
"EnumeratedAttributeHelper"
/>
<TRANSIENT
name=
"RoleType"
type=
"RoleType"
defaultValue=
"RoleType.STANDARD"
attribHelper=
"EnumeratedAttributeHelper"
/>
<TRANSIENT
name=
"IsLogoDeleted"
type=
"Boolean"
defaultValue=
"Boolean.FALSE"
/>
<TRANSIENT
name=
"IsLogoDeleted"
type=
"Boolean"
defaultValue=
"Boolean.FALSE"
/>
<TRANSIENT
name=
"CompletedProfile"
type=
"Boolean"
defaultValue=
"Boolean.FALSE"
/>
<TRANSIENT
name=
"CompletedProfile"
type=
"Boolean"
defaultValue=
"Boolean.FALSE"
/>
<TRANSIENT
name=
"PaymentJobCount"
type=
"Integer"
/>
<TABLE
name=
"tl_company"
tablePrefix=
"object"
>
<TABLE
name=
"tl_company"
tablePrefix=
"object"
>
...
...
cmsWebApp/src/performa/utils/Utils.java
View file @
0466906a
...
@@ -519,4 +519,12 @@ public class Utils
...
@@ -519,4 +519,12 @@ public class Utils
return
SecUserToNameTransform
.
INSTANCE
.
transform
(
companyUser
.
getUser
());
return
SecUserToNameTransform
.
INSTANCE
.
transform
(
companyUser
.
getUser
());
}
}
}
}
public
static
PaymentPlan
[]
getPaymentPlansForJobs
(
ObjectTransaction
objTran
)
{
return
PaymentPlan
.
SearchByAll
()
.
andActiveJobCount
(
new
IsNotNullFilter
<>())
.
search
(
objTran
);
}
}
}
\ No newline at end of file
cmsWebApp/webroot/css/common.css
View file @
0466906a
...
@@ -6043,4 +6043,8 @@ input{
...
@@ -6043,4 +6043,8 @@ input{
font-family
:
"Usual-Light"
;
font-family
:
"Usual-Light"
;
font-size
:
12px
;
font-size
:
12px
;
font-style
:
italic
;
font-style
:
italic
;
}
.payment-paln-count
{
width
:
75px
;
}
}
\ No newline at end of file
cmsWebApp/webroot/extensions/adminportal/job_payment.jsp
View file @
0466906a
...
@@ -6,10 +6,26 @@
...
@@ -6,10 +6,26 @@
<oneit:dynIncluded>
<oneit:dynIncluded>
<%
<%
Job job = (Job) process.getAttribute("Job");
Job job = (Job) process.getAttribute("Job");
SecUser loggedInUser = SecUser.getTXUser(transaction);
SecUser loggedInUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
Company company = companyUser.getCompany();
Company company = companyUser.getCompany();
PaymentPlan[] plans = Utils.getPaymentPlansForJobs(transaction);
Integer maxCount = 0;
Integer minCount = 0;
Integer curCount = company.getPaymentPlan()!=null ? company.getPaymentPlan().getActiveJobCount() : 0;
if(company.getPaymentPlan()!=null && company.getPaymentJobCount()==null)
{
company.setPaymentJobCount(company.getPaymentPlan().getActiveJobCount());
}
if(plans.length>0)
{
Collection<Integer> jCounts = PaymentPlan.pipesPaymentPlan(plans).toActiveJobCount().vals();
maxCount = Collections.max(jCounts);
minCount = Collections.min(jCounts);
}
Debug.assertion(company != null , "Invalid company in admin portal my company");
Debug.assertion(company != null , "Invalid company in admin portal my company");
...
@@ -40,17 +56,18 @@
...
@@ -40,17 +56,18 @@
<p>Hire for any role, save up to $995.00 / mo</p>
<p>Hire for any role, save up to $995.00 / mo</p>
</div>
</div>
<div class="a-label-row payment-type-row">
<div class="a-label-row payment-type-row">
<div class="col-md-
1 col-sm-1 col-xs-1
text-right">
<div class="col-md-
2 col-sm-2 col-xs-2
text-right">
</div>
</div>
<div class="col-md-2 col-sm-2 col-xs-2 text-right">
<div class="col-md-2 col-sm-2 col-xs-2 text-right">
<div class="active-jobs-per-mont">
<div class="active-jobs-per-mont">
Active Jobs Per Month
Active Jobs Per Month
</div>
</div>
</div>
</div>
<div class="col-md-3 col-sm-3 col-xs-3">
<div class="col-md-2 col-sm-2 col-xs-2">
<tagfile:ormsingleasso_select obj="<%= company %>" assocName="PaymentPlan" options="<%= PaymentPlan.searchAll(transaction) %>"/>
<oneit:ormInput type="number" obj="<%= company %>" attributeName="PaymentJobCount"
min="<%= minCount %>" max="<%= maxCount %>" step="1" cssClass="form-control payment-paln-count"/>
</div>
</div>
<div class="col-md-
5 col-sm-5 col-xs-5
text-right">
<div class="col-md-
4 col-sm-4 col-xs-4
text-right">
<oneit:recalcClass htmlTag="span" classScript="company.getPaymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>">
<oneit:recalcClass htmlTag="span" classScript="company.getPaymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>">
<div >
<div >
<span class="payment-amt text-right">
<span class="payment-amt text-right">
...
@@ -64,7 +81,7 @@
...
@@ -64,7 +81,7 @@
</div>
</div>
</oneit:recalcClass>
</oneit:recalcClass>
</div>
</div>
<div class="col-md-
1 col-sm-1 col-xs-1
text-right">
<div class="col-md-
2 col-sm-2 col-xs-2
text-right">
</div>
</div>
</div>
</div>
<div class="a-label-row text-center">
<div class="a-label-row text-center">
...
...
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