Commit 176262b3 by Nilu

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

parent 189d8aa8
......@@ -26,6 +26,9 @@
<column name="card_id" type="String" nullable="true" length="100"/>
<column name="plan_renewed_on" type="Date" 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="billing_team_id" type="Long" length="11" nullable="true"/>
<column name="added_by_user_id" type="Long" length="11" nullable="false"/>
......
......@@ -26,6 +26,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar(100) NULL,
plan_renewed_on datetime 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,
billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL,
......
......@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar2(100) NULL,
plan_renewed_on date 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,
billing_team_id number(12) NULL,
added_by_user_id number(12) NOT NULL,
......
......@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar(100) NULL,
plan_renewed_on timestamp 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,
billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL,
......
......@@ -25,11 +25,11 @@ public class SaveCompanyFP extends SaveFP
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
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");
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))
{
......@@ -43,23 +43,23 @@ public class SaveCompanyFP extends SaveFP
hiringTeam.setBillingTeam(null);
}
if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
{
company.setPaymentPlan(company.getSelectedPaymentPlan());
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Company payment plan updated.", company, company.getPaymentPlan());
if(company.getCardID() != null )
{
// cannot subscribe a user to a plan without card details
StripeUtils.updatePlan(company);
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Strpe subscription updated.", company, company.getStripeSubscription());
}
}
// Update company in intercom
IntercomUtils.updateCompany(company);
// if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
// {
// company.setPaymentPlan(company.getSelectedPaymentPlan());
//
// LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Company payment plan updated.", company, company.getPaymentPlan());
//
// if(company.getCardID() != null )
// {
// // cannot subscribe a user to a plan without card details
// StripeUtils.updatePlan(company);
//
// LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Strpe subscription updated.", company, company.getStripeSubscription());
// }
// }
//
// // Update company in intercom
// IntercomUtils.updateCompany(company);
return super.processForm(process, submission, params);
}
......@@ -69,16 +69,16 @@ public class SaveCompanyFP extends SaveFP
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{
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");
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
//to select payment plan when job open
if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
{
BusinessObjectParser.assertFieldCondition(company.getSelectedPaymentPlan()!= null, company , Company.SINGLEREFERENCE_PaymentPlan, "mandatory", exceptions, true, request);
}
// if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
// {
// BusinessObjectParser.assertFieldCondition(company.getSelectedPaymentPlan()!= null, company , Company.SINGLEREFERENCE_PaymentPlan, "mandatory", exceptions, true, request);
// }
//
if(hiringTeam != null && !hiringTeam.getManageOwnBilling())
{
BusinessObjectParser.assertFieldCondition(hiringTeam.getBillingTeam() != null, hiringTeam , HiringTeam.SINGLEREFERENCE_BillingTeam, "mandatory", exceptions, true, request);
......
......@@ -12,6 +12,7 @@
<MULTIPLEREFERENCE name="Clients" type="Client" backreferenceName="HiringTeam" />
<TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="CouponCode" type="String" length="20"/>
<TABLE name="tl_hiring_team" tablePrefix="object">
......@@ -33,6 +34,9 @@
<ATTRIB name="CardID" type="String" dbcol="card_id" length="100" />
<ATTRIB name="PlanRenewedOn" type="Date" dbcol="plan_renewed_on" mandatory="false" />
<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="BillingTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" />
......
......@@ -7,6 +7,7 @@
<%
String tabNumber = (String) getData(request, "TabNumber");
String firstPage = WebUtils.getSamePageInRenderMode(request, "Page");
String detailsPage = WebUtils.getSamePageInRenderMode(request, "HiringTeam");
String secondPage = WebUtils.getSamePageInRenderMode(request, "ManagePlan");
String thirdPage = WebUtils.getSamePageInRenderMode(request, "Billing");
String forthPage = WebUtils.getSamePageInRenderMode(request, "Invoices");
......@@ -20,7 +21,7 @@
<ul class="nav nav-tabs tabs-left">
<li class="<%= tabNumber == "1" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", firstPage)
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", detailsPage)
.toMap() %>">
Team Details
</oneit:button>
......
......@@ -104,7 +104,7 @@
<div class="<%= widthClass %> appli-l eq-second-height">
<span class="appli-view-bar">
<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 %>">
</div>
</div>
......
......@@ -29,8 +29,6 @@
job.setJobOwner(companyUser);
%>
<script type="text/javascript">
$(document).ready(function()
{
......@@ -68,7 +66,6 @@
<div class="form-page-area nopadding">
<div class="create-job">
<div class="form-page-section">
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Select a starting point</label>
......@@ -80,11 +77,9 @@
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<div class="oneit-radio">
<label class="create-job-selector rectangle-4">
<img src="images/create_from_template.png">
<h3>Create from template</h3>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/>
......@@ -92,30 +87,23 @@
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="JobTemplate" options="<%= jobs %>"
blankValue="Select your template"/>
</div>
</label>
</div>
</div>
<div class="col-md-6">
<div class="oneit-radio" >
<label class="create-job-selector rectangle-4">
<img src="images/create_new_job.png">
<h3>Create a new job</h3>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="false"/>
<div>
New jobs can be saved as a template to be used in future.
</div>
</label>
</div>
</div>
</div>
<div class="text-center">
<oneit:button value="Get Started" name="gotoCreateJob" cssClass="btn btn-primary largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job", job)
......
......@@ -10,12 +10,12 @@
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
Company company = companyUser.getCompany();
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 hiring team in admin portal my company");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
%>
<script type="text/javascript">
$(document).ready(function()
......@@ -54,10 +54,15 @@
<div class="container-fluid">
<div class="row content">
<div class="main-content-area">
<h1 class="page-title"><%= hiringTeam.getHiringTeamName() %></h1>
<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;">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
</div>
......@@ -182,8 +187,8 @@
</div>
</div>
</div>
</oneit:form>
</div>
</oneit:form>
</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