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
d4ad4423
Commit
d4ad4423
authored
Jan 03, 2019
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
force user to set up billing and payment plan.
Fix issue with switching from subscription to PPJ back and forth
parent
3346a749
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
88 additions
and
22 deletions
+88
-22
HiringTeam.java
cmsWebApp/src/performa/orm/HiringTeam.java
+6
-0
culture_templates.jsp
...bApp/webroot/extensions/adminportal/culture_templates.jsp
+5
-0
job_templates.jsp
cmsWebApp/webroot/extensions/adminportal/job_templates.jsp
+5
-0
list_clients.jsp
cmsWebApp/webroot/extensions/adminportal/list_clients.jsp
+1
-1
list_jobs.jsp
cmsWebApp/webroot/extensions/adminportal/list_jobs.jsp
+5
-0
manage_plan.jsp
cmsWebApp/webroot/extensions/adminportal/manage_plan.jsp
+15
-3
manage_users.jsp
cmsWebApp/webroot/extensions/adminportal/manage_users.jsp
+5
-0
page_admin_home.jsp
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
+46
-18
No files found.
cmsWebApp/src/performa/orm/HiringTeam.java
View file @
d4ad4423
...
@@ -254,4 +254,9 @@ public class HiringTeam extends BaseHiringTeam
...
@@ -254,4 +254,9 @@ public class HiringTeam extends BaseHiringTeam
{
{
return
CollectionUtils
.
equals
(
getPaymentPlan
(),
paymentPlan
);
return
CollectionUtils
.
equals
(
getPaymentPlan
(),
paymentPlan
);
}
}
public
boolean
hasBillingSetup
()
{
return
getCardID
()
!=
null
&&
getIsPPJ
()
!=
null
&&
(
getIsPPJ
()
||
(!
getIsPPJ
()
&&
getPaymentPlan
()
!=
null
));
}
}
}
\ No newline at end of file
cmsWebApp/webroot/extensions/adminportal/culture_templates.jsp
View file @
d4ad4423
...
@@ -13,6 +13,11 @@
...
@@ -13,6 +13,11 @@
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, String[]> parameterMap = request.getParameterMap();
Client selectedClient = null;
Client selectedClient = null;
if(!hiringTeam.hasBillingSetup())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
Client[] clients = (Client[]) process.getAttribute("Clients");
Client[] clients = (Client[]) process.getAttribute("Clients");
...
...
cmsWebApp/webroot/extensions/adminportal/job_templates.jsp
View file @
d4ad4423
...
@@ -13,6 +13,11 @@
...
@@ -13,6 +13,11 @@
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, String[]> parameterMap = request.getParameterMap();
Client selectedClient = null;
Client selectedClient = null;
if(!hiringTeam.hasBillingSetup())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
Client[] clients = (Client[]) process.getAttribute("Clients");
Client[] clients = (Client[]) process.getAttribute("Clients");
...
...
cmsWebApp/webroot/extensions/adminportal/list_clients.jsp
View file @
d4ad4423
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
HiringTeam hiringTeam = companyUser.getSelectedTeam();
if(!hiringTeam.showHasClientSupport())
if(!hiringTeam.showHasClientSupport()
|| !hiringTeam.hasBillingSetup()
)
{
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
}
...
...
cmsWebApp/webroot/extensions/adminportal/list_jobs.jsp
View file @
d4ad4423
...
@@ -21,6 +21,11 @@
...
@@ -21,6 +21,11 @@
SearchJob searchJob = (SearchJob) RunSearchExecutorFP.setupExecutor(request, SearchJob.REFERENCE_SearchJob, true);
SearchJob searchJob = (SearchJob) RunSearchExecutorFP.setupExecutor(request, SearchJob.REFERENCE_SearchJob, true);
Job[] jobs = (Job[])process.getAttribute("jobs");
Job[] jobs = (Job[])process.getAttribute("jobs");
if(!hiringTeam.hasBillingSetup())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
if(jobs == null)
if(jobs == null)
{
{
jobs = (Job[]) searchJob.doSearch();
jobs = (Job[]) searchJob.doSearch();
...
...
cmsWebApp/webroot/extensions/adminportal/manage_plan.jsp
View file @
d4ad4423
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
PaymentPlan currentPlan = hiringTeam.getPaymentPlan();
PaymentPlan currentPlan = hiringTeam.getPaymentPlan();
boolean hasValidCoupon = hiringTeam.hasValidCoupon();
boolean hasValidCoupon = hiringTeam.hasValidCoupon();
if(
!hiringTeam.isPPJ() && currentPlan
!= null)
if(
currentPlan != null && hiringTeam.getStripeSubscription()
!= null)
{
{
subscription = StripeUtils.retrieveSubscription(hiringTeam.getStripeSubscription());
subscription = StripeUtils.retrieveSubscription(hiringTeam.getStripeSubscription());
}
}
...
@@ -228,7 +228,20 @@
...
@@ -228,7 +228,20 @@
</div>
</div>
<%
<%
}
}
// temp solution. SimpleAssocHandler sets null value for plan as it is not visible in the form when PPJ is selected.
// Problem occurs when shifting from PPJ to Subscription
if(hiringTeam.getPaymentPlan() != null)
{
String paymentPlanKey = WebUtils.getRadioSingleAssocKey(request, hiringTeam, HiringTeam.SINGLEREFERENCE_PaymentPlan);
String paymentPlanId = String.valueOf(hiringTeam.getPaymentPlan().getID().longID());
%>
<input type="radio" name="<%= paymentPlanKey %>" id="<%= paymentPlanId %>" class="hide" value="<%= paymentPlanId %>" checked/>
<%
}
%>
%>
<div class="form-group row">
<div class="form-group row">
<div class="col-md-12 oneit-radio coupon-applied">
<div class="col-md-12 oneit-radio coupon-applied">
<div class="rectangle-5">
<div class="rectangle-5">
...
@@ -277,7 +290,7 @@
...
@@ -277,7 +290,7 @@
<div class="manage-plan-row">
<div class="manage-plan-row">
<div class="radio">
<div class="radio">
<label class="plan-selection">
<label class="plan-selection">
<oneit:ormInput obj="<%= hiringTeam %>" type="radio" attributeName="IsPPJ" value="false"/>
<oneit:ormInput obj="<%= hiringTeam %>" type="radio" attributeName="IsPPJ" value="false"
onchange="<%= firstTime ? "return false;" : "changeSubscribe()" %>"
/>
</label>
</label>
</div>
</div>
<oneit:button value=" " name="savePlan" cssClass="hide" id="saveSubscribe"
<oneit:button value=" " name="savePlan" cssClass="hide" id="saveSubscribe"
...
@@ -451,7 +464,6 @@
...
@@ -451,7 +464,6 @@
{
{
String planKey = WebUtils.getRadioSingleAssocKey(request, hiringTeam, HiringTeam.SINGLEREFERENCE_PaymentPlan);
String planKey = WebUtils.getRadioSingleAssocKey(request, hiringTeam, HiringTeam.SINGLEREFERENCE_PaymentPlan);
String planId = String.valueOf(paymentPlan.getID().longID());
String planId = String.valueOf(paymentPlan.getID().longID());
%>
%>
<input type="radio" name="<%= planKey %>" id="<%= planId %>" class="level_radio" value="<%= planId %>"/>
<input type="radio" name="<%= planKey %>" id="<%= planId %>" class="level_radio" value="<%= planId %>"/>
<label for="<%= planId %>">
<label for="<%= planId %>">
...
...
cmsWebApp/webroot/extensions/adminportal/manage_users.jsp
View file @
d4ad4423
...
@@ -24,6 +24,11 @@
...
@@ -24,6 +24,11 @@
Debug.assertion(hiringTeam != null, "Hiring Team is null in admin portal Manage Teammates");
Debug.assertion(hiringTeam != null, "Hiring Team is null in admin portal Manage Teammates");
if(!hiringTeam.hasBillingSetup())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
if(inviteTeammate == null)
if(inviteTeammate == null)
{
{
inviteTeammate = InviteTeammateNPO.createInviteTeammateNPO(objTran);
inviteTeammate = InviteTeammateNPO.createInviteTeammateNPO(objTran);
...
...
cmsWebApp/webroot/extensions/adminportal/page_admin_home.jsp
View file @
d4ad4423
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
HiringTeam hiringTeam = companyUser.getSelectedTeam();
HiringTeam hiringTeam = companyUser.getSelectedTeam();
SearchHome searchHome = (SearchHome) RunSearchExecutorFP.setupExecutor(request, SearchHome.REFERENCE_SearchHome, true);
SearchHome searchHome = (SearchHome) RunSearchExecutorFP.setupExecutor(request, SearchHome.REFERENCE_SearchHome, true);
Job[] allJobs = (Job[])process.getAttribute("allJobs");
Job[] allJobs = (Job[])process.getAttribute("allJobs");
RoleType userRole = companyUser.getRoleForHiringTeam(hiringTeam);
searchHome.setHiringTeam(hiringTeam);
searchHome.setHiringTeam(hiringTeam);
searchHome.setCompanyUser(companyUser);
searchHome.setCompanyUser(companyUser);
...
@@ -74,6 +75,7 @@
...
@@ -74,6 +75,7 @@
String jobsPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap());
String jobsPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap());
boolean firstTime = request.getParameter("firstTime") != null ? Boolean.parseBoolean(request.getParameter("firstTime")) : false;
boolean firstTime = request.getParameter("firstTime") != null ? Boolean.parseBoolean(request.getParameter("firstTime")) : false;
boolean canCreateJob = Utils.allowJobCreation(hiringTeam);
boolean canCreateJob = Utils.allowJobCreation(hiringTeam);
%>
%>
<style>
<style>
...
@@ -226,15 +228,28 @@
...
@@ -226,15 +228,28 @@
<div class="modal-dialog welcome-pop-top">
<div class="modal-dialog welcome-pop-top">
<div class="modal-body main-welcome-popup">
<div class="modal-body main-welcome-popup">
<h2>You haven't set up billing yet!</h2>
<h2>You haven't set up billing yet!</h2>
<p>Please set up billing details before creating jobs.</p>
<%
<div class="create-y-f-job">
if(userRole == RoleType.STANDARD)
<oneit:button value=" " name="gotoPage" skin="link"
{
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", companyArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Billing").toMap()))
%>
.mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
<p>Please contact your Administrator to set up billing</p>
.toMap() %>">
<%
Setup Billing
}
</oneit:button>
else
</div>
{
%>
<p>Please set up billing details before creating jobs.</p>
<div class="create-y-f-job">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", companyArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Billing").toMap()))
.mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
.toMap() %>">
Setup Billing
</oneit:button>
</div>
<%
}
%>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -251,15 +266,28 @@
...
@@ -251,15 +266,28 @@
<div class="modal-dialog welcome-pop-top">
<div class="modal-dialog welcome-pop-top">
<div class="modal-body main-welcome-popup">
<div class="modal-body main-welcome-popup">
<h2>You haven't set up a payment plan yet!</h2>
<h2>You haven't set up a payment plan yet!</h2>
<p>Please select a payment plan before creating jobs</p>
<%
<div class="create-y-f-job">
if(userRole == RoleType.STANDARD)
<oneit:button value=" " name="gotoPage" skin="link"
{
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", companyArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "ManagePlan").toMap()))
%>
.mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
<p>Please contact your Administrator to set up a plan</p>
.toMap() %>">
<%
Setup Payment Plan
}
</oneit:button>
else
</div>
{
%>
<p>Please select a payment plan before creating jobs</p>
<div class="create-y-f-job">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", companyArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "ManagePlan").toMap()))
.mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
.toMap() %>">
Setup Payment Plan
</oneit:button>
</div>
<%
}
%>
</div>
</div>
</div>
</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