Commit 176262b3 by Nilu

manage plan layout changes - HT015. Layout styling to be done by saliya

parent 189d8aa8
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
<column name="card_id" type="String" nullable="true" length="100"/> <column name="card_id" type="String" nullable="true" length="100"/>
<column name="plan_renewed_on" type="Date" nullable="true"/> <column name="plan_renewed_on" type="Date" nullable="true"/>
<column name="used_credits" type="Long" nullable="true"/> <column name="used_credits" type="Long" nullable="true"/>
<column name="is_ppj" type="Boolean" nullable="true"/>
<column name="has_cap" type="Boolean" nullable="true"/>
<column name="max_cap" type="Long" nullable="true"/>
<column name="company_id" type="Long" length="11" nullable="false"/> <column name="company_id" type="Long" length="11" nullable="false"/>
<column name="billing_team_id" type="Long" length="11" nullable="true"/> <column name="billing_team_id" type="Long" length="11" nullable="true"/>
<column name="added_by_user_id" type="Long" length="11" nullable="false"/> <column name="added_by_user_id" type="Long" length="11" nullable="false"/>
......
...@@ -26,6 +26,9 @@ CREATE TABLE tl_hiring_team ( ...@@ -26,6 +26,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar(100) NULL, card_id varchar(100) NULL,
plan_renewed_on datetime NULL, plan_renewed_on datetime NULL,
used_credits numeric(12) NULL, used_credits numeric(12) NULL,
is_ppj char(1) NULL,
has_cap char(1) NULL,
max_cap numeric(12) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team ( ...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar2(100) NULL, card_id varchar2(100) NULL,
plan_renewed_on date NULL, plan_renewed_on date NULL,
used_credits number(12) NULL, used_credits number(12) NULL,
is_ppj char(1) NULL,
has_cap char(1) NULL,
max_cap number(12) NULL,
company_id number(12) NOT NULL, company_id number(12) NOT NULL,
billing_team_id number(12) NULL, billing_team_id number(12) NULL,
added_by_user_id number(12) NOT NULL, added_by_user_id number(12) NOT NULL,
......
...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team ( ...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar(100) NULL, card_id varchar(100) NULL,
plan_renewed_on timestamp NULL, plan_renewed_on timestamp NULL,
used_credits numeric(12) NULL, used_credits numeric(12) NULL,
is_ppj char(1) NULL,
has_cap char(1) NULL,
max_cap numeric(12) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -25,11 +25,11 @@ public class SaveCompanyFP extends SaveFP ...@@ -25,11 +25,11 @@ public class SaveCompanyFP extends SaveFP
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();
Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company"); // Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company");
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam"); HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
Boolean isPayment = (Boolean) request.getAttribute("IsPayment"); Boolean isPayment = (Boolean) request.getAttribute("IsPayment");
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"In SaveCompanyFP saving company : ", company ); // LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"In SaveCompanyFP saving company : ", company );
if(CollectionUtils.equals(hiringTeam.getIsLogoDeleted(), Boolean.TRUE)) if(CollectionUtils.equals(hiringTeam.getIsLogoDeleted(), Boolean.TRUE))
{ {
...@@ -43,23 +43,23 @@ public class SaveCompanyFP extends SaveFP ...@@ -43,23 +43,23 @@ public class SaveCompanyFP extends SaveFP
hiringTeam.setBillingTeam(null); hiringTeam.setBillingTeam(null);
} }
if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null) // if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
{ // {
company.setPaymentPlan(company.getSelectedPaymentPlan()); // company.setPaymentPlan(company.getSelectedPaymentPlan());
//
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Company payment plan updated.", company, company.getPaymentPlan()); // LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Company payment plan updated.", company, company.getPaymentPlan());
//
if(company.getCardID() != null ) // if(company.getCardID() != null )
{ // {
// cannot subscribe a user to a plan without card details // // cannot subscribe a user to a plan without card details
StripeUtils.updatePlan(company); // StripeUtils.updatePlan(company);
//
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Strpe subscription updated.", company, company.getStripeSubscription()); // LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Strpe subscription updated.", company, company.getStripeSubscription());
} // }
} // }
//
// Update company in intercom // // Update company in intercom
IntercomUtils.updateCompany(company); // IntercomUtils.updateCompany(company);
return super.processForm(process, submission, params); return super.processForm(process, submission, params);
} }
...@@ -69,16 +69,16 @@ public class SaveCompanyFP extends SaveFP ...@@ -69,16 +69,16 @@ public class SaveCompanyFP extends SaveFP
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company"); // Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company");
Boolean isPayment = (Boolean) request.getAttribute("IsPayment"); Boolean isPayment = (Boolean) request.getAttribute("IsPayment");
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam"); HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
//to select payment plan when job open //to select payment plan when job open
if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null) // if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
{ // {
BusinessObjectParser.assertFieldCondition(company.getSelectedPaymentPlan()!= null, company , Company.SINGLEREFERENCE_PaymentPlan, "mandatory", exceptions, true, request); // BusinessObjectParser.assertFieldCondition(company.getSelectedPaymentPlan()!= null, company , Company.SINGLEREFERENCE_PaymentPlan, "mandatory", exceptions, true, request);
} // }
//
if(hiringTeam != null && !hiringTeam.getManageOwnBilling()) if(hiringTeam != null && !hiringTeam.getManageOwnBilling())
{ {
BusinessObjectParser.assertFieldCondition(hiringTeam.getBillingTeam() != null, hiringTeam , HiringTeam.SINGLEREFERENCE_BillingTeam, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(hiringTeam.getBillingTeam() != null, hiringTeam , HiringTeam.SINGLEREFERENCE_BillingTeam, "mandatory", exceptions, true, request);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<MULTIPLEREFERENCE name="Clients" type="Client" backreferenceName="HiringTeam" /> <MULTIPLEREFERENCE name="Clients" type="Client" backreferenceName="HiringTeam" />
<TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="CouponCode" type="String" length="20"/>
<TABLE name="tl_hiring_team" tablePrefix="object"> <TABLE name="tl_hiring_team" tablePrefix="object">
...@@ -33,6 +34,9 @@ ...@@ -33,6 +34,9 @@
<ATTRIB name="CardID" type="String" dbcol="card_id" length="100" /> <ATTRIB name="CardID" type="String" dbcol="card_id" length="100" />
<ATTRIB name="PlanRenewedOn" type="Date" dbcol="plan_renewed_on" mandatory="false" /> <ATTRIB name="PlanRenewedOn" type="Date" dbcol="plan_renewed_on" mandatory="false" />
<ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" /> <ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.TRUE"/>
<ATTRIB name="HasCap" type="Boolean" dbcol="has_cap" defaultValue="Boolean.FALSE"/>
<ATTRIB name="MaxCap" type="Integer" dbcol="max_cap" />
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" /> <SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" />
<SINGLEREFERENCE name="BillingTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" /> <SINGLEREFERENCE name="BillingTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" />
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<% <%
String tabNumber = (String) getData(request, "TabNumber"); String tabNumber = (String) getData(request, "TabNumber");
String firstPage = WebUtils.getSamePageInRenderMode(request, "Page"); String firstPage = WebUtils.getSamePageInRenderMode(request, "Page");
String detailsPage = WebUtils.getSamePageInRenderMode(request, "HiringTeam");
String secondPage = WebUtils.getSamePageInRenderMode(request, "ManagePlan"); String secondPage = WebUtils.getSamePageInRenderMode(request, "ManagePlan");
String thirdPage = WebUtils.getSamePageInRenderMode(request, "Billing"); String thirdPage = WebUtils.getSamePageInRenderMode(request, "Billing");
String forthPage = WebUtils.getSamePageInRenderMode(request, "Invoices"); String forthPage = WebUtils.getSamePageInRenderMode(request, "Invoices");
...@@ -20,7 +21,7 @@ ...@@ -20,7 +21,7 @@
<ul class="nav nav-tabs tabs-left"> <ul class="nav nav-tabs tabs-left">
<li class="<%= tabNumber == "1" ? "active" : ""%>"> <li class="<%= tabNumber == "1" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link" <oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", firstPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", detailsPage)
.toMap() %>"> .toMap() %>">
Team Details Team Details
</oneit:button> </oneit:button>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<div class="<%= widthClass %> appli-l eq-second-height"> <div class="<%= widthClass %> appli-l eq-second-height">
<span class="appli-view-bar"> <span class="appli-view-bar">
<div class="progress"> <div class="progress">
<div class="progress-bar <%= (criteriaVal == 100 ? " green" : "")%>" role="progressbar" aria-valuenow="<%= criteria %>" aria-valuemin="0" aria-valuemax="100" <div class="progress-bar <%= (criteriaVal == 100 && !missingReq ? " green" : "")%>" role="progressbar" aria-valuenow="<%= criteria %>" aria-valuemin="0" aria-valuemax="100"
style="<%= "width: " + criteria %>"> style="<%= "width: " + criteria %>">
</div> </div>
</div> </div>
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
job.setHiringTeam(hiringTeam); job.setHiringTeam(hiringTeam);
job.setJobOwner(companyUser); job.setJobOwner(companyUser);
%> %>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() $(document).ready(function()
...@@ -38,15 +36,15 @@ ...@@ -38,15 +36,15 @@
$(".oneit-radio input").each(function(){ $(".oneit-radio input").each(function(){
if($(this).is(':checked')) { if($(this).is(':checked')) {
updateRadioChecked(this); updateRadioChecked(this);
} }
$(this).click(function(){ $(this).click(function(){
if($(this).is(':checked')) { if($(this).is(':checked')) {
updateRadioChecked(this); updateRadioChecked(this);
} }
}); });
}); });
}); });
...@@ -68,7 +66,6 @@ ...@@ -68,7 +66,6 @@
<div class="form-page-area nopadding"> <div class="form-page-area nopadding">
<div class="create-job"> <div class="create-job">
<div class="form-page-section"> <div class="form-page-section">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-16">Select a starting point</label> <label class="label-16">Select a starting point</label>
...@@ -80,42 +77,33 @@ ...@@ -80,42 +77,33 @@
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
<div class="oneit-radio"> <div class="oneit-radio">
<label class="create-job-selector rectangle-4"> <label class="create-job-selector rectangle-4">
<img src="images/create_from_template.png"> <img src="images/create_from_template.png">
<h3>Create from template</h3> <h3>Create from template</h3>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/> <oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/>
<div> <div>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="JobTemplate" options="<%= jobs %>" <tagfile:ormsingleasso_select obj="<%= job %>" assocName="JobTemplate" options="<%= jobs %>"
blankValue="Select your template"/> blankValue="Select your template"/>
</div> </div>
</label>
</div>
</label>
</div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="oneit-radio" > <div class="oneit-radio" >
<label class="create-job-selector rectangle-4"> <label class="create-job-selector rectangle-4">
<img src="images/create_new_job.png">
<img src="images/create_new_job.png"> <h3>Create a new job</h3>
<h3>Create a new job</h3> <oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="false"/>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="false"/> <div>
<div> New jobs can be saved as a template to be used in future.
New jobs can be saved as a template to be used in future. </div>
</div> </label>
</div>
</label>
</div>
</div> </div>
</div> </div>
<div class="text-center"> <div class="text-center">
<oneit:button value="Get Started" name="gotoCreateJob" cssClass="btn btn-primary largeBtn" <oneit:button value="Get Started" name="gotoCreateJob" cssClass="btn btn-primary largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job", job) .mapEntry("Job", job)
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser); CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
Company company = companyUser.getCompany(); Company company = companyUser.getCompany();
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam"); HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
Debug.assertion(company != null , "Invalid company in admin portal my company"); Debug.assertion(company != null , "Invalid company in admin portal my company");
Debug.assertion(company != null , "Invalid hiring team in admin portal my company"); Debug.assertion(company != null , "Invalid hiring team in admin portal my company");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
%> %>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() $(document).ready(function()
...@@ -54,10 +54,15 @@ ...@@ -54,10 +54,15 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row content"> <div class="row content">
<div class="main-content-area"> <div class="main-content-area">
<h1 class="page-title"><%= hiringTeam.getHiringTeamName() %></h1> <oneit:form name="editCompany" method="post" enctype="multipart/form-data">
<div class="my-company-area">
<oneit:form name="editCompany" method="post" enctype="multipart/form-data"> <oneit:button cssClass="arrow-btn-blue" name="gotoPage" value=" " skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage).toMap() %>" >
<img src="images/arrow-left-prev_blue.svg" />
</oneit:button>
<h1 class="page-title"><%= hiringTeam.getHiringTeamName() %></h1>
<div class="my-company-area">
<div style="padding-left: 15px; padding-right: 15px;"> <div style="padding-left: 15px; padding-right: 15px;">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/> <oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
</div> </div>
...@@ -182,8 +187,8 @@ ...@@ -182,8 +187,8 @@
</div> </div>
</div> </div>
</div> </div>
</oneit:form> </div>
</div> </oneit:form>
</div> </div>
</div> </div>
</div> </div>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_hiring_team</tableName>
<column name="is_ppj" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_hiring_team</tableName>
<column name="has_cap" type="Boolean" nullable="true"/>
<column name="max_cap" type="Long" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment