Commit 2e692848 by Haresh Godhani

Finish Hotfix-20190418

parents 207b71df 1c6c25b3
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<column name="job_title" type="String" nullable="false" length="30"/> <column name="job_title" type="String" nullable="false" length="30"/>
<column name="job_description" type="CLOB" nullable="false"/> <column name="job_description" type="CLOB" nullable="false"/>
<column name="ref_number" type="String" nullable="true" length="10"/> <column name="ref_number" type="String" nullable="true" length="10"/>
<column name="google_address_text" type="String" nullable="true" length="300"/> <column name="google_address_text" type="String" nullable="false" length="300"/>
<column name="location_radius" type="String" nullable="false" length="200"/> <column name="location_radius" type="String" nullable="false" length="200"/>
<column name="remote" type="Boolean" nullable="true"/> <column name="remote" type="Boolean" nullable="true"/>
<column name="job_type" type="String" nullable="false" length="200"/> <column name="job_type" type="String" nullable="false" length="200"/>
<column name="industry" type="String" nullable="true" length="200"/> <column name="industry" type="String" nullable="false" length="200"/>
<column name="require_cv" type="Boolean" nullable="true"/> <column name="require_cv" type="Boolean" nullable="true"/>
<column name="assessment_type" type="String" nullable="false" length="200"/> <column name="assessment_type" type="String" nullable="false" length="200"/>
<column name="include_assessment_criteria" type="Boolean" nullable="false"/> <column name="include_assessment_criteria" type="Boolean" nullable="false"/>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<column name="client_id" type="Long" length="11" nullable="true"/> <column name="client_id" type="Long" length="11" nullable="true"/>
<column name="hiring_team_id" type="Long" length="11" nullable="true"/> <column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/> <column name="company_user_id" type="Long" length="11" nullable="true"/>
<column name="job_title_id" type="Long" length="11" nullable="true"/> <column name="job_title_id" type="Long" length="11" nullable="false"/>
</NODE> </NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_assessment_template" indexName="idx_tl_assessment_template_TemplateID" isUnique="true"><column name="template_name"/><column name="hiring_team_id"/><column name="company_user_id"/></NODE> <NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_assessment_template" indexName="idx_tl_assessment_template_TemplateID" isUnique="true"><column name="template_name"/><column name="hiring_team_id"/><column name="company_user_id"/></NODE>
......
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
<column name="manually_closed" type="Boolean" nullable="true"/> <column name="manually_closed" type="Boolean" nullable="true"/>
<column name="last_edited" type="Date" nullable="true"/> <column name="last_edited" type="Date" nullable="true"/>
<column name="is_ppj" type="Boolean" nullable="true"/> <column name="is_ppj" type="Boolean" nullable="true"/>
<column name="industry" type="String" nullable="true" length="200"/> <column name="industry" type="String" nullable="false" length="200"/>
<column name="culture_statement" type="String" nullable="true" length="2000"/> <column name="culture_statement" type="String" nullable="true" length="2000"/>
<column name="draft_location" type="String" nullable="true" length="200"/> <column name="draft_location" type="String" nullable="true" length="200"/>
<column name="google_address_text" type="String" nullable="true" length="300"/> <column name="google_address_text" type="String" nullable="false" length="300"/>
<column name="level_id" type="Long" length="11" nullable="true"/> <column name="level_id" type="Long" length="11" nullable="true"/>
<column name="client_id" type="Long" length="11" nullable="true"/> <column name="client_id" type="Long" length="11" nullable="true"/>
<column name="job_owner_id" type="Long" length="11" nullable="true"/> <column name="job_owner_id" type="Long" length="11" nullable="true"/>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<column name="occupation_id" type="Long" length="11" nullable="false"/> <column name="occupation_id" type="Long" length="11" nullable="false"/>
<column name="shortened_url_id" type="Long" length="11" nullable="true"/> <column name="shortened_url_id" type="Long" length="11" nullable="true"/>
<column name="template_id" type="Long" length="11" nullable="true"/> <column name="template_id" type="Long" length="11" nullable="true"/>
<column name="job_title_id" type="Long" length="11" nullable="true"/> <column name="job_title_id" type="Long" length="11" nullable="false"/>
</NODE> </NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_job" indexName="idx_tl_job_client_id" isUnique="false"><column name="client_id"/></NODE> <NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_job" indexName="idx_tl_job_client_id" isUnique="false"><column name="client_id"/></NODE>
......
...@@ -12,11 +12,11 @@ CREATE TABLE tl_assessment_template ( ...@@ -12,11 +12,11 @@ CREATE TABLE tl_assessment_template (
job_title varchar(30) NOT NULL, job_title varchar(30) NOT NULL,
job_description text NOT NULL, job_description text NOT NULL,
ref_number varchar(10) NULL, ref_number varchar(10) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NOT NULL,
location_radius varchar(200) NOT NULL, location_radius varchar(200) NOT NULL,
remote char(1) NULL, remote char(1) NULL,
job_type varchar(200) NOT NULL, job_type varchar(200) NOT NULL,
industry varchar(200) NULL, industry varchar(200) NOT NULL,
require_cv char(1) NULL, require_cv char(1) NULL,
assessment_type varchar(200) NOT NULL, assessment_type varchar(200) NOT NULL,
include_assessment_criteria char(1) NOT NULL, include_assessment_criteria char(1) NOT NULL,
...@@ -27,7 +27,7 @@ CREATE TABLE tl_assessment_template ( ...@@ -27,7 +27,7 @@ CREATE TABLE tl_assessment_template (
client_id numeric(12) NULL, client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL, hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL, company_user_id numeric(12) NULL,
job_title_id numeric(12) NULL job_title_id numeric(12) NOT NULL
); );
......
...@@ -29,10 +29,10 @@ CREATE TABLE tl_job ( ...@@ -29,10 +29,10 @@ CREATE TABLE tl_job (
manually_closed char(1) NULL, manually_closed char(1) NULL,
last_edited datetime NULL, last_edited datetime NULL,
is_ppj char(1) NULL, is_ppj char(1) NULL,
industry varchar(200) NULL, industry varchar(200) NOT NULL,
culture_statement varchar(2000) NULL, culture_statement varchar(2000) NULL,
draft_location varchar(200) NULL, draft_location varchar(200) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NOT NULL,
level_id numeric(12) NULL, level_id numeric(12) NULL,
client_id numeric(12) NULL, client_id numeric(12) NULL,
job_owner_id numeric(12) NULL, job_owner_id numeric(12) NULL,
...@@ -41,7 +41,7 @@ CREATE TABLE tl_job ( ...@@ -41,7 +41,7 @@ CREATE TABLE tl_job (
occupation_id numeric(12) NOT NULL, occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL, shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL, template_id numeric(12) NULL,
job_title_id numeric(12) NULL job_title_id numeric(12) NOT NULL
); );
......
...@@ -13,11 +13,11 @@ CREATE TABLE tl_assessment_template ( ...@@ -13,11 +13,11 @@ CREATE TABLE tl_assessment_template (
job_title varchar2(30) NOT NULL, job_title varchar2(30) NOT NULL,
job_description clob NOT NULL, job_description clob NOT NULL,
ref_number varchar2(10) NULL, ref_number varchar2(10) NULL,
google_address_text varchar2(300) NULL, google_address_text varchar2(300) NOT NULL,
location_radius varchar2(200) NOT NULL, location_radius varchar2(200) NOT NULL,
remote char(1) NULL, remote char(1) NULL,
job_type varchar2(200) NOT NULL, job_type varchar2(200) NOT NULL,
industry varchar2(200) NULL, industry varchar2(200) NOT NULL,
require_cv char(1) NULL, require_cv char(1) NULL,
assessment_type varchar2(200) NOT NULL, assessment_type varchar2(200) NOT NULL,
include_assessment_criteria char(1) NOT NULL, include_assessment_criteria char(1) NOT NULL,
...@@ -28,7 +28,7 @@ CREATE TABLE tl_assessment_template ( ...@@ -28,7 +28,7 @@ CREATE TABLE tl_assessment_template (
client_id number(12) NULL, client_id number(12) NULL,
hiring_team_id number(12) NULL, hiring_team_id number(12) NULL,
company_user_id number(12) NULL, company_user_id number(12) NULL,
job_title_id number(12) NULL job_title_id number(12) NOT NULL
); );
......
...@@ -30,10 +30,10 @@ CREATE TABLE tl_job ( ...@@ -30,10 +30,10 @@ CREATE TABLE tl_job (
manually_closed char(1) NULL, manually_closed char(1) NULL,
last_edited date NULL, last_edited date NULL,
is_ppj char(1) NULL, is_ppj char(1) NULL,
industry varchar2(200) NULL, industry varchar2(200) NOT NULL,
culture_statement varchar2(2000) NULL, culture_statement varchar2(2000) NULL,
draft_location varchar2(200) NULL, draft_location varchar2(200) NULL,
google_address_text varchar2(300) NULL, google_address_text varchar2(300) NOT NULL,
level_id number(12) NULL, level_id number(12) NULL,
client_id number(12) NULL, client_id number(12) NULL,
job_owner_id number(12) NULL, job_owner_id number(12) NULL,
...@@ -42,7 +42,7 @@ CREATE TABLE tl_job ( ...@@ -42,7 +42,7 @@ CREATE TABLE tl_job (
occupation_id number(12) NOT NULL, occupation_id number(12) NOT NULL,
shortened_url_id number(12) NULL, shortened_url_id number(12) NULL,
template_id number(12) NULL, template_id number(12) NULL,
job_title_id number(12) NULL job_title_id number(12) NOT NULL
); );
......
...@@ -13,11 +13,11 @@ CREATE TABLE tl_assessment_template ( ...@@ -13,11 +13,11 @@ CREATE TABLE tl_assessment_template (
job_title varchar(30) NOT NULL, job_title varchar(30) NOT NULL,
job_description text NOT NULL, job_description text NOT NULL,
ref_number varchar(10) NULL, ref_number varchar(10) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NOT NULL,
location_radius varchar(200) NOT NULL, location_radius varchar(200) NOT NULL,
remote char(1) NULL, remote char(1) NULL,
job_type varchar(200) NOT NULL, job_type varchar(200) NOT NULL,
industry varchar(200) NULL, industry varchar(200) NOT NULL,
require_cv char(1) NULL, require_cv char(1) NULL,
assessment_type varchar(200) NOT NULL, assessment_type varchar(200) NOT NULL,
include_assessment_criteria char(1) NOT NULL, include_assessment_criteria char(1) NOT NULL,
...@@ -28,7 +28,7 @@ CREATE TABLE tl_assessment_template ( ...@@ -28,7 +28,7 @@ CREATE TABLE tl_assessment_template (
client_id numeric(12) NULL, client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL, hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL, company_user_id numeric(12) NULL,
job_title_id numeric(12) NULL job_title_id numeric(12) NOT NULL
); );
......
...@@ -30,10 +30,10 @@ CREATE TABLE tl_job ( ...@@ -30,10 +30,10 @@ CREATE TABLE tl_job (
manually_closed char(1) NULL, manually_closed char(1) NULL,
last_edited timestamp NULL, last_edited timestamp NULL,
is_ppj char(1) NULL, is_ppj char(1) NULL,
industry varchar(200) NULL, industry varchar(200) NOT NULL,
culture_statement varchar(2000) NULL, culture_statement varchar(2000) NULL,
draft_location varchar(200) NULL, draft_location varchar(200) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NOT NULL,
level_id numeric(12) NULL, level_id numeric(12) NULL,
client_id numeric(12) NULL, client_id numeric(12) NULL,
job_owner_id numeric(12) NULL, job_owner_id numeric(12) NULL,
...@@ -42,7 +42,7 @@ CREATE TABLE tl_job ( ...@@ -42,7 +42,7 @@ CREATE TABLE tl_job (
occupation_id numeric(12) NOT NULL, occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL, shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL, template_id numeric(12) NULL,
job_title_id numeric(12) NULL job_title_id numeric(12) NOT NULL
); );
......
...@@ -32,7 +32,8 @@ public class ApplyCouponFP extends SaveFP ...@@ -32,7 +32,8 @@ 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 );
if(hiringTeam.getCoupon() != null && hiringTeam.getCoupon().getCouponCode().equals(hiringTeam.getCouponCode())) if(hiringTeam.getCoupon() != null && hiringTeam.getCoupon().getCouponCode().equals(hiringTeam.getCouponCode()))
...@@ -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()))
...@@ -82,7 +88,7 @@ public class ApplyCouponFP extends SaveFP ...@@ -82,7 +88,7 @@ public class ApplyCouponFP extends SaveFP
hiringTeam.setCouponExpiryDate(DateDiff.add(new Date(), Calendar.MONTH, stripeCoupon.getDurationInMonths())); hiringTeam.setCouponExpiryDate(DateDiff.add(new Date(), Calendar.MONTH, stripeCoupon.getDurationInMonths()));
} }
hiringTeam.setCoupon(stripeCoupon); hiringTeam.setCoupon(stripeCoupon);
} }
else else
{ {
......
...@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import oneit.logging.*; import oneit.logging.*;
import oneit.objstore.*; import oneit.objstore.*;
import oneit.objstore.parser.BusinessObjectParser; import oneit.objstore.parser.BusinessObjectParser;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.servlets.forms.*; import oneit.servlets.forms.*;
import oneit.servlets.process.*; import oneit.servlets.process.*;
import oneit.utils.*; import oneit.utils.*;
...@@ -52,19 +53,19 @@ public class CompleteApplicationFP extends SaveFP ...@@ -52,19 +53,19 @@ public class CompleteApplicationFP extends SaveFP
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
ObjectTransaction objTran = ObjectTransaction.getTransaction(); ObjectTransaction objTran = ObjectTransaction.getTransaction();
JobApplication jobApplication = process.getAttribute("JobApplication") != null ? (JobApplication) process.getAttribute("JobApplication") : (JobApplication)request.getAttribute("JobApplication"); JobApplication application = process.getAttribute("JobApplication") != null ? (JobApplication) process.getAttribute("JobApplication") : (JobApplication)request.getAttribute("JobApplication");
jobApplication = jobApplication.getInTransaction(objTran); JobApplication jobApplication = application.getInTransaction(objTran);
if(!jobApplication.cultureCompleted()) if(!jobApplication.cultureCompleted())
{ {
BusinessObjectParser.assertFieldCondition(jobApplication.getCandidate().getCultureCriteriaAnswersCount()>0, jobApplication, JobApplication.FIELD_ObjectID, "completeCulture", exceptions, true, request); BusinessObjectParser.assertFieldCondition(jobApplication.getCandidate().getCultureCriteriaAnswersCount()>0, application, JobApplication.FIELD_ObjectID, "completeCulture", exceptions, true, request);
} }
if(jobApplication.isIncludeAssessmentCriteria()) if(jobApplication.isIncludeAssessmentCriteria())
{ {
JobApplication application = jobApplication.getInTransaction(objTran); AssessmentCriteriaAnswer[] criteria = AssessmentCriteriaAnswer.SearchByAll().andJobApplication(new EqualsFilter<>(jobApplication)).search(objTran);
BusinessObjectParser.assertFieldCondition(jobApplication.getJob().getAssessmentCriteriasCount() == application.getAssessmentCriteriaAnswersCount(), jobApplication, JobApplication.FIELD_ObjectID, "completeAssessment", exceptions, true, request); BusinessObjectParser.assertFieldCondition(jobApplication.getJob().getAssessmentCriteriasCount() == criteria.length, application, JobApplication.FIELD_ObjectID, "completeAssessment", exceptions, true, request);
} }
super.validate(process, submission, exceptions, params); super.validate(process, submission, exceptions, params);
......
...@@ -30,18 +30,11 @@ public class ProcessCultureFP extends SaveFP ...@@ -30,18 +30,11 @@ public class ProcessCultureFP extends SaveFP
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
boolean fromJobMatch = request.getAttribute("fromJobMatch") != null ? (boolean) request.getAttribute("fromJobMatch"): false;
boolean fromCulture = request.getAttribute("fromCulture") != null ? (boolean) request.getAttribute("fromCulture"): false; boolean fromCulture = request.getAttribute("fromCulture") != null ? (boolean) request.getAttribute("fromCulture"): false;
boolean fromAssessment = request.getAttribute("fromAssessment") != null ? (boolean) request.getAttribute("fromAssessment"): false; boolean fromAssessment = request.getAttribute("fromAssessment") != null ? (boolean) request.getAttribute("fromAssessment"): false;
Debug.assertion(job != null, "No job found . Call from " + getClass().getName()); Debug.assertion(job != null, "No job found . Call from " + getClass().getName());
if(fromJobMatch)
{
BusinessObjectParser.assertFieldCondition(job.getILOJobTitle() != null, job , Job.SINGLEREFERENCE_ILOJobTitle, "mandatory", exceptions, true, request);
}
if(fromCulture) if(fromCulture)
{ {
for(CultureCriteria criteria: job.getCultureCriteriasSet()) for(CultureCriteria criteria: job.getCultureCriteriasSet())
......
...@@ -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);
......
...@@ -101,8 +101,6 @@ public class SaveJobFP extends SaveFP ...@@ -101,8 +101,6 @@ public class SaveJobFP extends SaveFP
// } // }
// } // }
BusinessObjectParser.assertFieldCondition(job.getILOJobTitle() != null , job, Job.SINGLEREFERENCE_ILOJobTitle, "mandatory", exceptions, true, request);
if(status != null && status == JobStatus.OPEN) if(status != null && status == JobStatus.OPEN)
{ {
BusinessObjectParser.assertFieldCondition(billingTeam.getCardID() != null , billingTeam, HiringTeam.FIELD_CardID, "mandatoryCardDetails", exceptions, true, request); BusinessObjectParser.assertFieldCondition(billingTeam.getCardID() != null , billingTeam, HiringTeam.FIELD_CardID, "mandatoryCardDetails", exceptions, true, request);
......
...@@ -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))
{ {
......
...@@ -35,19 +35,17 @@ public class ValidateApplicationFP extends SaveFP ...@@ -35,19 +35,17 @@ public class ValidateApplicationFP extends SaveFP
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
ObjectTransaction objTran = process.getTransaction(); ObjectTransaction objTran = process.getTransaction();
JobApplication jobApplication = process.getAttribute("JobApplication") != null ? (JobApplication) process.getAttribute("JobApplication") : (JobApplication)request.getAttribute("JobApplication"); JobApplication application = process.getAttribute("JobApplication") != null ? (JobApplication) process.getAttribute("JobApplication") : (JobApplication)request.getAttribute("JobApplication");
JobApplication jobApplication = application.getInTransaction(objTran);
boolean fromRequirements = request.getAttribute("fromRequirements") != null ? (boolean) request.getAttribute("fromRequirements"): false; boolean fromRequirements = request.getAttribute("fromRequirements") != null ? (boolean) request.getAttribute("fromRequirements"): false;
Debug.assertion(jobApplication != null, "No jobApplication found . Call from " + getClass().getName()); Debug.assertion(jobApplication != null, "No jobApplication found . Call from " + getClass().getName());
jobApplication = jobApplication.getInTransaction(objTran);
if(jobApplication.isIncludeAssessmentCriteria() && fromRequirements) if(jobApplication.isIncludeAssessmentCriteria() && fromRequirements)
{ {
// JobApplication application = jobApplication.getInTransaction(objTran); AssessmentCriteriaAnswer[] criteria = AssessmentCriteriaAnswer.SearchByAll().andJobApplication(new EqualsFilter<>(jobApplication)).search(objTran);
AssessmentCriteriaAnswer[] application = AssessmentCriteriaAnswer.SearchByAll().andJobApplication(new EqualsFilter<>(jobApplication)).search(objTran);
BusinessObjectParser.assertFieldCondition(jobApplication.getJob().getAssessmentCriteriasCount() == application.length, jobApplication, JobApplication.FIELD_ObjectID, "completeAssessment", exceptions, true, request); BusinessObjectParser.assertFieldCondition(jobApplication.getJob().getAssessmentCriteriasCount() == criteria.length, application, JobApplication.FIELD_ObjectID, "completeAssessment", exceptions, true, request);
} }
} }
} }
\ No newline at end of file
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
<ATTRIB name="JobTitle" type="String" dbcol="job_title" length="30" mandatory="true"/> <ATTRIB name="JobTitle" type="String" dbcol="job_title" length="30" mandatory="true"/>
<ATTRIB name="JobDescription" type="String" dbcol="job_description" mandatory="true"/> <ATTRIB name="JobDescription" type="String" dbcol="job_description" mandatory="true"/>
<ATTRIB name="ReferenceNumber" type="String" dbcol="ref_number" length="10"/> <ATTRIB name="ReferenceNumber" type="String" dbcol="ref_number" length="10"/>
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" /> <ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" mandatory="true" length="300" />
<ATTRIB name="ExpectedCandidateRadius" type="LocationRadius" dbcol="location_radius" defaultValue="LocationRadius.KM100" attribHelper="EnumeratedAttributeHelper" mandatory="true"/> <ATTRIB name="ExpectedCandidateRadius" type="LocationRadius" dbcol="location_radius" defaultValue="LocationRadius.KM100" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="Remote" type="Boolean" dbcol="remote" defaultValue="Boolean.FALSE"/> <ATTRIB name="Remote" type="Boolean" dbcol="remote" defaultValue="Boolean.FALSE"/>
<ATTRIB name="JobType" type="JobType" dbcol="job_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="JobType.FULL_TIME"/> <ATTRIB name="JobType" type="JobType" dbcol="job_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="JobType.FULL_TIME"/>
<ATTRIB name="Industry" type="Industry" dbcol="industry" attribHelper="EnumeratedAttributeHelper"/> <ATTRIB name="Industry" type="Industry" dbcol="industry" mandatory="true" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="RequireCV" type="Boolean" dbcol="require_cv" defaultValue="Boolean.FALSE"/> <ATTRIB name="RequireCV" type="Boolean" dbcol="require_cv" defaultValue="Boolean.FALSE"/>
<ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="AssessmentType.COMPREHENSIVE"/> <ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="AssessmentType.COMPREHENSIVE"/>
<ATTRIB name="IncludeAssessmentCriteria" type="Boolean" dbcol="include_assessment_criteria" mandatory="true" defaultValue="Boolean.TRUE"/> <ATTRIB name="IncludeAssessmentCriteria" type="Boolean" dbcol="include_assessment_criteria" mandatory="true" defaultValue="Boolean.TRUE"/>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" /> <SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" />
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" uniqueGroup="TemplateID"/> <SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" uniqueGroup="TemplateID"/>
<SINGLEREFERENCE name="CompanyUser" type="CompanyUser" dbcol="company_user_id" uniqueGroup="TemplateID"/> <SINGLEREFERENCE name="CompanyUser" type="CompanyUser" dbcol="company_user_id" uniqueGroup="TemplateID"/>
<SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" mandatory="false"/> <SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" mandatory="true"/>
</TABLE> </TABLE>
......
...@@ -320,7 +320,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -320,7 +320,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "job_title_id"); metaInfo.put ("dbcol", "job_title_id");
metaInfo.put ("mandatory", "false"); metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "ILOJobTitle"); metaInfo.put ("name", "ILOJobTitle");
metaInfo.put ("type", "ILOJobTitle"); metaInfo.put ("type", "ILOJobTitle");
...@@ -414,6 +414,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -414,6 +414,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
metaInfo.put ("dbcol", "google_address_text"); metaInfo.put ("dbcol", "google_address_text");
metaInfo.put ("length", "300"); metaInfo.put ("length", "300");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "GoogleAddressText"); metaInfo.put ("name", "GoogleAddressText");
metaInfo.put ("type", "String"); metaInfo.put ("type", "String");
...@@ -494,6 +495,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -494,6 +495,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper"); metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "industry"); metaInfo.put ("dbcol", "industry");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Industry"); metaInfo.put ("name", "Industry");
metaInfo.put ("type", "Industry"); metaInfo.put ("type", "Industry");
...@@ -1101,6 +1103,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -1101,6 +1103,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
oldAndNewIdentical = HELPER_GoogleAddressText.compare (_GoogleAddressText, newGoogleAddressText); oldAndNewIdentical = HELPER_GoogleAddressText.compare (_GoogleAddressText, newGoogleAddressText);
} }
BusinessObjectParser.assertFieldCondition (newGoogleAddressText != null, this, FIELD_GoogleAddressText, "mandatory");
if (FIELD_GoogleAddressText_Validators.length > 0) if (FIELD_GoogleAddressText_Validators.length > 0)
...@@ -1495,6 +1498,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -1495,6 +1498,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
oldAndNewIdentical = HELPER_Industry.compare (_Industry, newIndustry); oldAndNewIdentical = HELPER_Industry.compare (_Industry, newIndustry);
} }
BusinessObjectParser.assertFieldCondition (newIndustry != null, this, FIELD_Industry, "mandatory");
if (FIELD_Industry_Validators.length > 0) if (FIELD_Industry_Validators.length > 0)
...@@ -2830,6 +2834,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -2830,6 +2834,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
*/ */
public void setILOJobTitle (ILOJobTitle newILOJobTitle) throws StorageException, FieldException public void setILOJobTitle (ILOJobTitle newILOJobTitle) throws StorageException, FieldException
{ {
BusinessObjectParser.assertFieldCondition (newILOJobTitle != null, this, SINGLEREFERENCE_ILOJobTitle, "mandatory");
if (_ILOJobTitle.wouldReferencedChange (newILOJobTitle)) if (_ILOJobTitle.wouldReferencedChange (newILOJobTitle))
...@@ -3504,6 +3509,8 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -3504,6 +3509,8 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
context.check (getOccupationID() != null, this, SINGLEREFERENCE_Occupation, "mandatory"); context.check (getOccupationID() != null, this, SINGLEREFERENCE_Occupation, "mandatory");
context.check (getILOJobTitleID() != null, this, SINGLEREFERENCE_ILOJobTitle, "mandatory");
} }
...@@ -4384,11 +4391,11 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4384,11 +4391,11 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
result.add(HELPER_JobTitle.getAttribObject (getClass (), _JobTitle, true, FIELD_JobTitle)); result.add(HELPER_JobTitle.getAttribObject (getClass (), _JobTitle, true, FIELD_JobTitle));
result.add(HELPER_JobDescription.getAttribObject (getClass (), _JobDescription, true, FIELD_JobDescription)); result.add(HELPER_JobDescription.getAttribObject (getClass (), _JobDescription, true, FIELD_JobDescription));
result.add(HELPER_ReferenceNumber.getAttribObject (getClass (), _ReferenceNumber, false, FIELD_ReferenceNumber)); result.add(HELPER_ReferenceNumber.getAttribObject (getClass (), _ReferenceNumber, false, FIELD_ReferenceNumber));
result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, false, FIELD_GoogleAddressText)); result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, true, FIELD_GoogleAddressText));
result.add(HELPER_ExpectedCandidateRadius.getAttribObject (getClass (), _ExpectedCandidateRadius, true, FIELD_ExpectedCandidateRadius)); result.add(HELPER_ExpectedCandidateRadius.getAttribObject (getClass (), _ExpectedCandidateRadius, true, FIELD_ExpectedCandidateRadius));
result.add(HELPER_Remote.getAttribObject (getClass (), _Remote, false, FIELD_Remote)); result.add(HELPER_Remote.getAttribObject (getClass (), _Remote, false, FIELD_Remote));
result.add(HELPER_JobType.getAttribObject (getClass (), _JobType, true, FIELD_JobType)); result.add(HELPER_JobType.getAttribObject (getClass (), _JobType, true, FIELD_JobType));
result.add(HELPER_Industry.getAttribObject (getClass (), _Industry, false, FIELD_Industry)); result.add(HELPER_Industry.getAttribObject (getClass (), _Industry, true, FIELD_Industry));
result.add(HELPER_RequireCV.getAttribObject (getClass (), _RequireCV, false, FIELD_RequireCV)); result.add(HELPER_RequireCV.getAttribObject (getClass (), _RequireCV, false, FIELD_RequireCV));
result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, true, FIELD_AssessmentType)); result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, true, FIELD_AssessmentType));
result.add(HELPER_IncludeAssessmentCriteria.getAttribObject (getClass (), _IncludeAssessmentCriteria, true, FIELD_IncludeAssessmentCriteria)); result.add(HELPER_IncludeAssessmentCriteria.getAttribObject (getClass (), _IncludeAssessmentCriteria, true, FIELD_IncludeAssessmentCriteria));
......
...@@ -562,6 +562,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -562,6 +562,7 @@ public abstract class BaseJob extends BaseBusinessClass
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "job_title_id"); metaInfo.put ("dbcol", "job_title_id");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "ILOJobTitle"); metaInfo.put ("name", "ILOJobTitle");
metaInfo.put ("type", "ILOJobTitle"); metaInfo.put ("type", "ILOJobTitle");
...@@ -1230,6 +1231,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -1230,6 +1231,7 @@ public abstract class BaseJob extends BaseBusinessClass
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper"); metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "industry"); metaInfo.put ("dbcol", "industry");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Industry"); metaInfo.put ("name", "Industry");
metaInfo.put ("type", "Industry"); metaInfo.put ("type", "Industry");
...@@ -1287,6 +1289,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -1287,6 +1289,7 @@ public abstract class BaseJob extends BaseBusinessClass
metaInfo.put ("dbcol", "google_address_text"); metaInfo.put ("dbcol", "google_address_text");
metaInfo.put ("length", "300"); metaInfo.put ("length", "300");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "GoogleAddressText"); metaInfo.put ("name", "GoogleAddressText");
metaInfo.put ("type", "String"); metaInfo.put ("type", "String");
...@@ -3544,6 +3547,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -3544,6 +3547,7 @@ public abstract class BaseJob extends BaseBusinessClass
oldAndNewIdentical = HELPER_Industry.compare (_Industry, newIndustry); oldAndNewIdentical = HELPER_Industry.compare (_Industry, newIndustry);
} }
BusinessObjectParser.assertFieldCondition (newIndustry != null, this, FIELD_Industry, "mandatory");
if (FIELD_Industry_Validators.length > 0) if (FIELD_Industry_Validators.length > 0)
...@@ -3838,6 +3842,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -3838,6 +3842,7 @@ public abstract class BaseJob extends BaseBusinessClass
oldAndNewIdentical = HELPER_GoogleAddressText.compare (_GoogleAddressText, newGoogleAddressText); oldAndNewIdentical = HELPER_GoogleAddressText.compare (_GoogleAddressText, newGoogleAddressText);
} }
BusinessObjectParser.assertFieldCondition (newGoogleAddressText != null, this, FIELD_GoogleAddressText, "mandatory");
if (FIELD_GoogleAddressText_Validators.length > 0) if (FIELD_GoogleAddressText_Validators.length > 0)
...@@ -6709,6 +6714,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -6709,6 +6714,7 @@ public abstract class BaseJob extends BaseBusinessClass
*/ */
public void setILOJobTitle (ILOJobTitle newILOJobTitle) throws StorageException, FieldException public void setILOJobTitle (ILOJobTitle newILOJobTitle) throws StorageException, FieldException
{ {
BusinessObjectParser.assertFieldCondition (newILOJobTitle != null, this, SINGLEREFERENCE_ILOJobTitle, "mandatory");
if (_ILOJobTitle.wouldReferencedChange (newILOJobTitle)) if (_ILOJobTitle.wouldReferencedChange (newILOJobTitle))
...@@ -7819,6 +7825,8 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -7819,6 +7825,8 @@ public abstract class BaseJob extends BaseBusinessClass
context.check (getOccupationID() != null, this, SINGLEREFERENCE_Occupation, "mandatory"); context.check (getOccupationID() != null, this, SINGLEREFERENCE_Occupation, "mandatory");
context.check (getILOJobTitleID() != null, this, SINGLEREFERENCE_ILOJobTitle, "mandatory");
} }
...@@ -10419,10 +10427,10 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -10419,10 +10427,10 @@ public abstract class BaseJob extends BaseBusinessClass
result.add(HELPER_IsManuallyClosed.getAttribObject (getClass (), _IsManuallyClosed, false, FIELD_IsManuallyClosed)); result.add(HELPER_IsManuallyClosed.getAttribObject (getClass (), _IsManuallyClosed, false, FIELD_IsManuallyClosed));
result.add(HELPER_LastEdited.getAttribObject (getClass (), _LastEdited, false, FIELD_LastEdited)); result.add(HELPER_LastEdited.getAttribObject (getClass (), _LastEdited, false, FIELD_LastEdited));
result.add(HELPER_IsPPJ.getAttribObject (getClass (), _IsPPJ, false, FIELD_IsPPJ)); result.add(HELPER_IsPPJ.getAttribObject (getClass (), _IsPPJ, false, FIELD_IsPPJ));
result.add(HELPER_Industry.getAttribObject (getClass (), _Industry, false, FIELD_Industry)); result.add(HELPER_Industry.getAttribObject (getClass (), _Industry, true, FIELD_Industry));
result.add(HELPER_CultureStatement.getAttribObject (getClass (), _CultureStatement, false, FIELD_CultureStatement)); result.add(HELPER_CultureStatement.getAttribObject (getClass (), _CultureStatement, false, FIELD_CultureStatement));
result.add(HELPER_DraftLocation.getAttribObject (getClass (), _DraftLocation, false, FIELD_DraftLocation)); result.add(HELPER_DraftLocation.getAttribObject (getClass (), _DraftLocation, false, FIELD_DraftLocation));
result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, false, FIELD_GoogleAddressText)); result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, true, FIELD_GoogleAddressText));
result.add(HELPER_Email.getAttribObject (getClass (), _Email, false, FIELD_Email)); result.add(HELPER_Email.getAttribObject (getClass (), _Email, false, FIELD_Email));
result.add(HELPER_Password.getAttribObject (getClass (), _Password, false, FIELD_Password)); result.add(HELPER_Password.getAttribObject (getClass (), _Password, false, FIELD_Password));
result.add(HELPER_ConfirmPassword.getAttribObject (getClass (), _ConfirmPassword, false, FIELD_ConfirmPassword)); result.add(HELPER_ConfirmPassword.getAttribObject (getClass (), _ConfirmPassword, false, FIELD_ConfirmPassword));
......
...@@ -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();
......
...@@ -71,10 +71,23 @@ public class Job extends BaseJob ...@@ -71,10 +71,23 @@ public class Job extends BaseJob
{ {
setRandomKey(RandomStringGen.getRandomStringGen().generateAlphaNum(4)); setRandomKey(RandomStringGen.getRandomStringGen().generateAlphaNum(4));
//TODO: verify SecUser txUser = SecUser.getTXUser(getTransaction());
SecUser txUser = SecUser.getTXUser(getTransaction()); CompanyUser companyUser = txUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
setCreatedBy(txUser.getExtension(CompanyUser.REFERENCE_CompanyUser)); setCreatedBy(companyUser);
setHiringTeam(hiringTeam);
setJobOwner(companyUser);
if(hiringTeam.getIndustry() != null)
{
setIndustry(hiringTeam.getIndustry());
}
if(hiringTeam.getGoogleAddressText() != null)
{
setGoogleAddressText(hiringTeam.getGoogleAddressText());
}
} }
......
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
<ATTRIB name="IsManuallyClosed" type="Boolean" dbcol="manually_closed" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsManuallyClosed" type="Boolean" dbcol="manually_closed" defaultValue="Boolean.FALSE"/>
<ATTRIB name="LastEdited" type="Date" dbcol="last_edited" /> <ATTRIB name="LastEdited" type="Date" dbcol="last_edited" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.FALSE"/>
<ATTRIB name="Industry" type="Industry" dbcol="industry" attribHelper="EnumeratedAttributeHelper"/> <ATTRIB name="Industry" type="Industry" dbcol="industry" mandatory="true" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="CultureStatement" type="String" dbcol="culture_statement" length="2000"/> <ATTRIB name="CultureStatement" type="String" dbcol="culture_statement" length="2000"/>
<ATTRIB name="DraftLocation" type="DraftLocation" dbcol="draft_location" attribHelper="EnumeratedAttributeHelper"/> <ATTRIB name="DraftLocation" type="DraftLocation" dbcol="draft_location" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" /> <ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" mandatory="true" length="300" />
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="false"/> <SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="false"/>
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" backreferenceName="Jobs"/> <SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" backreferenceName="Jobs"/>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/> <SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/>
<SINGLEREFERENCE name="ShortenedURL" type="ShortenedURL" dbcol="shortened_url_id" /> <SINGLEREFERENCE name="ShortenedURL" type="ShortenedURL" dbcol="shortened_url_id" />
<SINGLEREFERENCE name="AssessmentTemplate" type="AssessmentCriteriaTemplate" dbcol="template_id" /> <SINGLEREFERENCE name="AssessmentTemplate" type="AssessmentCriteriaTemplate" dbcol="template_id" />
<SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" /> <SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" mandatory="true"/>
</TABLE> </TABLE>
......
...@@ -5065,7 +5065,7 @@ span.right-img { ...@@ -5065,7 +5065,7 @@ span.right-img {
.success-message{background-color: #67b413;box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.15);} .success-message{background-color: #67b413;box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.15);}
/*.error-message{background-color: #f9513d;box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.15);}*/ /*.error-message{background-color: #f9513d;box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.15);}*/
.error-message { .error-message {
height: 109px; /*height: 109px;*/
border-radius: 2px; border-radius: 2px;
background-color: #F9623D; background-color: #F9623D;
box-shadow: 0 3px 5px 0 rgba(0,0,0,0.02); box-shadow: 0 3px 5px 0 rgba(0,0,0,0.02);
......
...@@ -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.getPaymentPlan() == null)) ? "ManagePlan" : "Billing"); String nextPage = WebUtils.getSamePageInRenderMode(request, (hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.getStripeSubscription() == null)) ? "ManagePlan" : "Billing");
String replaceCardPage = WebUtils.getSamePageInRenderMode(request, "ReplaceCard"); String replaceCardPage = WebUtils.getSamePageInRenderMode(request, "ReplaceCard");
%> %>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -27,14 +27,21 @@ ...@@ -27,14 +27,21 @@
}); });
}); });
function copyHTMLToClip(ele) { function copyHTMLToClip(ele, verified) {
var aux = document.createElement("textarea"); var aux = document.createElement("textarea");
aux.value = $(ele).text().trim(); aux.value = $(ele).text().trim();
document.body.appendChild(aux); document.body.appendChild(aux);
aux.select(); aux.select();
document.execCommand("copy"); document.execCommand("copy");
document.body.removeChild(aux); document.body.removeChild(aux);
alert("link copied to clipboard"); if(verified)
{
alert("link copied to clipboard");
}
else
{
alert("This applicant's email address is not verified. If the email address is wrong, further messages cannot be sent. \nLink copied to clipboard");
}
}; };
</script> </script>
<div class="view-appli-list"> <div class="view-appli-list">
...@@ -78,6 +85,11 @@ ...@@ -78,6 +85,11 @@
<% <%
} }
if( candidate.getVerificationKey() == null)
{
candidate.setVerificationKey(new RandomStringGen().generateAlphaNum(6));
}
String jobLink = LoopbackHTTP.getRemoteAccessURL() String jobLink = LoopbackHTTP.getRemoteAccessURL()
+ Utils.APPLICANT_LINK + Utils.APPLICANT_LINK
+ "?id=" + job.getID() + "?id=" + job.getID()
...@@ -87,7 +99,7 @@ ...@@ -87,7 +99,7 @@
%> %>
<oneit:toString value="<%= candidate %>" mode="EscapeHTML" /> <oneit:toString value="<%= candidate %>" mode="EscapeHTML" />
<span style="float:right; padding-right: 5px;"> <span style="float:right; padding-right: 5px;">
<a style="float:right; padding-right: 10px;" onclick="copyHTMLToClip('.<%= jobApplication.getID().toString() + "link"%>')"> <a style="float:right; padding-right: 10px;" onclick="copyHTMLToClip('.<%= jobApplication.getID().toString() + "link"%>', <%= candidate.getIsAccountVerified()%>)">
<img src="images/copy-icon.jpg"> <img src="images/copy-icon.jpg">
<span style="display:none;" class='<%= jobApplication.getID().toString() + "link"%>'> <span style="display:none;" class='<%= jobApplication.getID().toString() + "link"%>'>
<%= jobLink %> <%= jobLink %>
......
...@@ -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.getPaymentPlan() == null) || isAssumedUser) && hiringTeam.getManageOwnBilling()) if((hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.getStripeSubscription() == null) || isAssumedUser) && hiringTeam.getManageOwnBilling())
{ {
%> %>
<li class="<%= tabNumber == "2" ? "active" : ""%>"> <li class="<%= tabNumber == "2" ? "active" : ""%>">
......
...@@ -151,7 +151,11 @@ ...@@ -151,7 +151,11 @@
$(this).val(''); $(this).val('');
} }
}); });
if($('input[type="text"][id$="Industry"]').next().val() === ""){
$('input[type="text"][id$="Industry"]').val('');
}
$('input[type="text"][id$="Industry"]').attr('placeholder','Please select an Industry'); $('input[type="text"][id$="Industry"]').attr('placeholder','Please select an Industry');
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').attr('placeholder','Please select a Job Title'); $('input[type="text"][id$="ILOJobTitle_autocomplete"]').attr('placeholder','Please select a Job Title');
......
...@@ -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.getStripeSubscription() != null && billingTeam.getPaymentPlan() != null)
{ {
Integer activeCount = billingTeam.getUsedCredits(); Integer activeCount = billingTeam.getUsedCredits();
Integer totCount = billingTeam.getAvailableCredits(); Integer totCount = billingTeam.getAvailableCredits();
......
...@@ -24,11 +24,6 @@ ...@@ -24,11 +24,6 @@
.andHiringTeam(new EqualsFilter<>(hiringTeam)) .andHiringTeam(new EqualsFilter<>(hiringTeam))
.search(transaction); .search(transaction);
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATE_JOB); String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATE_JOB);
job.setHiringTeam(hiringTeam);
job.setJobOwner(companyUser);
job.setIndustry(hiringTeam.getIndustry());
job.setGoogleAddressText(hiringTeam.getGoogleAddressText());
%> %>
<style> <style>
.rectangle-4.special{ .rectangle-4.special{
......
...@@ -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.getPaymentPlan() == null); boolean firstTime = hiringTeam.getIsPPJ() == null || (!hiringTeam.getIsPPJ() && hiringTeam.getStripeSubscription() == 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>
......
...@@ -13,11 +13,14 @@ Job.JobTemplate = Job Template ...@@ -13,11 +13,14 @@ Job.JobTemplate = Job Template
Job.Occupation = Job Occupation Classification Job.Occupation = Job Occupation Classification
Job.ExpectedCandidateRadius = Expected Candidate Radius Job.ExpectedCandidateRadius = Expected Candidate Radius
Job.AssessmentTemplate = Template Job.AssessmentTemplate = Template
Job.GoogleAddressText = Google Location
Job.ILOJobTitle = ILO Standard Job Title
CultureCriteria.Importance = Rate Importance CultureCriteria.Importance = Rate Importance
CultureCriteria.CultureElementRating = Rating CultureCriteria.CultureElementRating = Rating
AssessmentCriteriaTemplate.TemplateName = Template Name AssessmentCriteriaTemplate.TemplateName = Template Name
AssessmentCriteriaTemplate.GoogleAddressText = Google Location
CultureCriteriaTemplate.TemplateName = Template Name CultureCriteriaTemplate.TemplateName = Template Name
......
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
<% <%
} }
else if(billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getPaymentPlan() == null)) else if(billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getStripeSubscription() == 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()))
......
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