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
5e134039
Commit
5e134039
authored
Apr 18, 2019
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S30819045 # Client - Incoming Issues (raised by Client) #Errors occurred
parent
5f4ccb8b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
11 deletions
+27
-11
ApplyCouponFP.java
cmsWebApp/src/performa/form/ApplyCouponFP.java
+6
-0
SaveCompanyFP.java
cmsWebApp/src/performa/form/SaveCompanyFP.java
+1
-1
SavePaymentPlanFP.java
cmsWebApp/src/performa/form/SavePaymentPlanFP.java
+9
-0
HiringTeam.java
cmsWebApp/src/performa/orm/HiringTeam.java
+3
-3
billing.jsp
cmsWebApp/webroot/extensions/adminportal/billing.jsp
+1
-1
my_company_tabs.jsp
...pp/webroot/extensions/adminportal/inc/my_company_tabs.jsp
+1
-1
job_review_submit.jsp
...bApp/webroot/extensions/adminportal/job_review_submit.jsp
+1
-1
manage_plan.jsp
cmsWebApp/webroot/extensions/adminportal/manage_plan.jsp
+3
-2
page_admin_home.jsp
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
+2
-2
No files found.
cmsWebApp/src/performa/form/ApplyCouponFP.java
View file @
5e134039
...
@@ -32,6 +32,7 @@ public class ApplyCouponFP extends SaveFP
...
@@ -32,6 +32,7 @@ public class ApplyCouponFP extends SaveFP
HttpServletRequest
request
=
submission
.
getRequest
();
HttpServletRequest
request
=
submission
.
getRequest
();
ObjectTransaction
objTran
=
process
.
getTransaction
();
ObjectTransaction
objTran
=
process
.
getTransaction
();
HiringTeam
hiringTeam
=
(
HiringTeam
)
process
.
getAttribute
(
"HiringTeam"
);
HiringTeam
hiringTeam
=
(
HiringTeam
)
process
.
getAttribute
(
"HiringTeam"
);
Boolean
firstTime
=
request
.
getAttribute
(
"firstTime"
)
!=
null
?
(
Boolean
)
request
.
getAttribute
(
"firstTime"
)
:
Boolean
.
FALSE
;
LogMgr
.
log
(
HiringTeam
.
LOG
,
LogLevel
.
PROCESSING1
,
"Inside ApplyCouponFP for "
,
hiringTeam
);
LogMgr
.
log
(
HiringTeam
.
LOG
,
LogLevel
.
PROCESSING1
,
"Inside ApplyCouponFP for "
,
hiringTeam
);
...
@@ -41,6 +42,11 @@ public class ApplyCouponFP extends SaveFP
...
@@ -41,6 +42,11 @@ public class ApplyCouponFP extends SaveFP
return
RedisplayResult
.
getInstance
();
return
RedisplayResult
.
getInstance
();
}
}
if
(
firstTime
&&
hiringTeam
.
isTrue
(
hiringTeam
.
getIsPPJ
()))
{
hiringTeam
.
setIsPPJ
(
null
);
}
Coupon
coupon
=
StripeUtils
.
retrieveCoupon
(
hiringTeam
.
getCouponCode
());
Coupon
coupon
=
StripeUtils
.
retrieveCoupon
(
hiringTeam
.
getCouponCode
());
StripeCoupon
[]
stripeCoupons
=
StripeCoupon
.
SearchByAll
()
StripeCoupon
[]
stripeCoupons
=
StripeCoupon
.
SearchByAll
()
.
andCouponCode
(
new
EqualsFilter
<>(
hiringTeam
.
getCouponCode
()))
.
andCouponCode
(
new
EqualsFilter
<>(
hiringTeam
.
getCouponCode
()))
...
...
cmsWebApp/src/performa/form/SaveCompanyFP.java
View file @
5e134039
...
@@ -56,7 +56,7 @@ public class SaveCompanyFP extends SaveFP
...
@@ -56,7 +56,7 @@ public class SaveCompanyFP extends SaveFP
}
}
else
else
{
{
if
(
hiringTeam
.
getPaymentPlan
()
!=
null
)
if
(
hiringTeam
.
getPaymentPlan
()
!=
null
&&
subscription
!=
null
)
{
{
StripeUtils
.
cancelSubscription
(
subscription
,
true
);
StripeUtils
.
cancelSubscription
(
subscription
,
true
);
...
...
cmsWebApp/src/performa/form/SavePaymentPlanFP.java
View file @
5e134039
...
@@ -67,6 +67,15 @@ public class SavePaymentPlanFP extends SaveFP
...
@@ -67,6 +67,15 @@ public class SavePaymentPlanFP extends SaveFP
}
}
}
}
// Payment plan value might get set if apply coupon button is clicked after selecting a plan, and before saving plan.
// After that if PPJ is selected, need to reset plan to null - as no subscription is made at this point - S30819045
if
(
hiringTeam
.
isTrue
(
hiringTeam
.
getIsPPJ
())
&&
subscription
==
null
&&
hiringTeam
.
getPaymentPlan
()
!=
null
)
{
hiringTeam
.
setPaymentPlan
(
null
);
hiringTeam
.
setMaxCap
(
0
);
hiringTeam
.
setHasCap
(
false
);
}
// When Subscribe and Save selected
// When Subscribe and Save selected
if
(
CollectionUtils
.
equals
(
hiringTeam
.
getIsPPJ
(),
Boolean
.
FALSE
)
&&
(
firstTime
||
savePlan
))
if
(
CollectionUtils
.
equals
(
hiringTeam
.
getIsPPJ
(),
Boolean
.
FALSE
)
&&
(
firstTime
||
savePlan
))
{
{
...
...
cmsWebApp/src/performa/orm/HiringTeam.java
View file @
5e134039
...
@@ -164,7 +164,7 @@ public class HiringTeam extends BaseHiringTeam
...
@@ -164,7 +164,7 @@ public class HiringTeam extends BaseHiringTeam
{
{
if
(
getManageOwnBilling
())
if
(
getManageOwnBilling
())
{
{
return
getPaymentPlan
()
!=
null
&&
(
getAvailableCredits
()
>
getUsedCredits
()
||
!
getHasCap
()
||
(
getHasCap
()
&&
getMaxCap
()
>
getUsedCredits
()));
return
getPaymentPlan
()
!=
null
&&
getStripeSubscription
()
!=
null
&&
(
getAvailableCredits
()
>
getUsedCredits
()
||
!
getHasCap
()
||
(
getHasCap
()
&&
getMaxCap
()
>
getUsedCredits
()));
}
}
return
getBilledByTeam
().
canCreateJob
();
return
getBilledByTeam
().
canCreateJob
();
...
@@ -265,7 +265,7 @@ public class HiringTeam extends BaseHiringTeam
...
@@ -265,7 +265,7 @@ public class HiringTeam extends BaseHiringTeam
{
{
if
(
getManageOwnBilling
())
if
(
getManageOwnBilling
())
{
{
return
getCardID
()
!=
null
&&
getIsPPJ
()
!=
null
&&
(
getIsPPJ
()
||
(!
getIsPPJ
()
&&
getPaymentPlan
()
!=
null
));
return
getCardID
()
!=
null
&&
getIsPPJ
()
!=
null
&&
(
getIsPPJ
()
||
(!
getIsPPJ
()
&&
getPaymentPlan
()
!=
null
&&
getStripeSubscription
()
!=
null
));
}
}
return
getBilledByTeam
().
hasBillingSetup
();
return
getBilledByTeam
().
hasBillingSetup
();
...
@@ -276,7 +276,7 @@ public class HiringTeam extends BaseHiringTeam
...
@@ -276,7 +276,7 @@ public class HiringTeam extends BaseHiringTeam
{
{
if
(
getManageOwnBilling
())
if
(
getManageOwnBilling
())
{
{
return
isTrue
(
isPPJ
())
||
(
isFalse
(
isPPJ
())
&&
getPaymentPlan
()
!=
null
&&
(
getAvailableCredits
()
>
getUsedCredits
()
||
!
getHasCap
()
||
(
getHasCap
()
&&
getMaxCap
()
>
getUsedCredits
())));
return
isTrue
(
isPPJ
())
||
(
isFalse
(
isPPJ
())
&&
getPaymentPlan
()
!=
null
&&
getStripeSubscription
()
!=
null
&&
(
getAvailableCredits
()
>
getUsedCredits
()
||
!
getHasCap
()
||
(
getHasCap
()
&&
getMaxCap
()
>
getUsedCredits
())));
}
}
return
getBilledByTeam
().
allowJobCreation
();
return
getBilledByTeam
().
allowJobCreation
();
...
...
cmsWebApp/webroot/extensions/adminportal/billing.jsp
View file @
5e134039
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
Debug.assertion(hiringTeam != null , "Invalid hiring team in admin portal my company");
Debug.assertion(hiringTeam != null , "Invalid hiring team in admin portal my company");
String hiringTeamList = WebUtils.getSamePageInRenderMode(request, "Page");
String hiringTeamList = WebUtils.getSamePageInRenderMode(request, "Page");
String nextPage = WebUtils.getSamePageInRenderMode(request, (hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.get
PaymentPla
n() == null)) ? "ManagePlan" : "Billing");
String nextPage = WebUtils.getSamePageInRenderMode(request, (hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.get
StripeSubscriptio
n() == null)) ? "ManagePlan" : "Billing");
String replaceCardPage = WebUtils.getSamePageInRenderMode(request, "ReplaceCard");
String replaceCardPage = WebUtils.getSamePageInRenderMode(request, "ReplaceCard");
%>
%>
<script type="text/javascript">
<script type="text/javascript">
...
...
cmsWebApp/webroot/extensions/adminportal/inc/my_company_tabs.jsp
View file @
5e134039
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<%
<%
RoleType userRole = companyUser.getRoleForHiringTeam(hiringTeam);
RoleType userRole = companyUser.getRoleForHiringTeam(hiringTeam);
if((hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.get
PaymentPla
n() == null) || isAssumedUser) && hiringTeam.getManageOwnBilling())
if((hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.get
StripeSubscriptio
n() == null) || isAssumedUser) && hiringTeam.getManageOwnBilling())
{
{
%>
%>
<li class="<%= tabNumber == "2" ? "active" : ""%>">
<li class="<%= tabNumber == "2" ? "active" : ""%>">
...
...
cmsWebApp/webroot/extensions/adminportal/job_review_submit.jsp
View file @
5e134039
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<h1 class="page-title">Review Job
<h1 class="page-title">Review Job
<%
<%
if(billingTeam.getPaymentPlan() != null)
if(billingTeam.get
StripeSubscription() != null && billingTeam.get
PaymentPlan() != null)
{
{
Integer activeCount = billingTeam.getUsedCredits();
Integer activeCount = billingTeam.getUsedCredits();
Integer totCount = billingTeam.getAvailableCredits();
Integer totCount = billingTeam.getAvailableCredits();
...
...
cmsWebApp/webroot/extensions/adminportal/manage_plan.jsp
View file @
5e134039
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
}
}
String currencyFormat = Utils.getCurrencyFormat(hiringTeam);
String currencyFormat = Utils.getCurrencyFormat(hiringTeam);
boolean firstTime = hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.get
PaymentPla
n() == null);
boolean firstTime = hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.get
StripeSubscriptio
n() == null);
String samePage = WebUtils.getSamePageInRenderMode(request, "ManagePlan");
String samePage = WebUtils.getSamePageInRenderMode(request, "ManagePlan");
String nextPage = firstTime ? homePage : samePage;
String nextPage = firstTime ? homePage : samePage;
%>
%>
...
@@ -198,6 +198,7 @@
...
@@ -198,6 +198,7 @@
<oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="CouponCode" placeholder="Coupon Code" cssClass="form-control" />
<oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="CouponCode" placeholder="Coupon Code" cssClass="form-control" />
<oneit:button value="APPLY" name="applyCoupon" cssClass="btn btn-input-inside"
<oneit:button value="APPLY" name="applyCoupon" cssClass="btn btn-input-inside"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", samePage)
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", samePage)
.mapEntry ("firstTime", firstTime)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry ("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
.mapEntry ("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
.mapEntry ("attribNamesToRestore", Collections.singleton("HiringTeam"))
.mapEntry ("attribNamesToRestore", Collections.singleton("HiringTeam"))
...
@@ -379,7 +380,7 @@
...
@@ -379,7 +380,7 @@
<oneit:button skin="link" value=" " name="savePlan" cssClass="btn select-btn" style="display:none;"
<oneit:button skin="link" value=" " name="savePlan" cssClass="btn select-btn" style="display:none;"
requestAttribs="<%= CollectionUtils.EMPTY_MAP%>" />
requestAttribs="<%= CollectionUtils.EMPTY_MAP%>" />
<%
<%
if(isSelectedPlan)
if(isSelectedPlan
&& hiringTeam.getStripeSubscription() != null
)
{
{
%>
%>
<span class="btn active-btn">Active</span>
<span class="btn active-btn">Active</span>
...
...
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
View file @
5e134039
...
@@ -259,7 +259,7 @@
...
@@ -259,7 +259,7 @@
<%
<%
}
}
else if(billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.get
PaymentPla
n() == null))
else if(billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.get
StripeSubscriptio
n() == null))
{
{
%>
%>
...
@@ -278,7 +278,7 @@
...
@@ -278,7 +278,7 @@
else
else
{
{
%>
%>
<p>Please
select a
payment plan before creating jobs</p>
<p>Please
<%= billingTeam.getPaymentPlan() == null ? "select a" : "save your"%>
payment plan before creating jobs</p>
<div class="create-y-f-job">
<div class="create-y-f-job">
<oneit:button value=" " name="gotoPage" skin="link"
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", companyArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "ManagePlan").toMap()))
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", companyArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "ManagePlan").toMap()))
...
...
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