Commit 0d6df2a8 by Harsh Shah

Finish Release-20190614

parents 883db116 bed8c30c
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<column name="card_post_code" type="String" nullable="true" length="10"/> <column name="card_post_code" type="String" nullable="true" length="10"/>
<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="ppj_credits" type="Long" nullable="true"/>
<column name="used_credits" type="Long" nullable="true"/> <column name="used_credits" type="Long" nullable="true"/>
<column name="available_credits" type="Long" nullable="true"/> <column name="available_credits" type="Long" nullable="true"/>
<column name="is_ppj" type="Boolean" nullable="true"/> <column name="is_ppj" type="Boolean" nullable="true"/>
...@@ -36,6 +37,8 @@ ...@@ -36,6 +37,8 @@
<column name="last_plan_amount" type="Double" nullable="true"/> <column name="last_plan_amount" type="Double" nullable="true"/>
<column name="google_address_text" type="String" nullable="true" length="300"/> <column name="google_address_text" type="String" nullable="true" length="300"/>
<column name="plan_cancelled" type="Boolean" nullable="true"/> <column name="plan_cancelled" type="Boolean" nullable="true"/>
<column name="on_trial" type="Boolean" nullable="true"/>
<column name="trial_job_count" type="Long" nullable="true"/>
<column name="message_id" type="Long" nullable="true"/> <column name="message_id" 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"/>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<column name="object_id" type="Long" nullable="false" length="11"/> <column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/> <column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/> <column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="job_title" type="String" nullable="false" length="30"/> <column name="job_title" type="String" nullable="false" length="60"/>
<column name="job_description" type="CLOB" nullable="false"/> <column name="job_description" type="CLOB" nullable="false"/>
<column name="job_status" type="String" nullable="false" length="200"/> <column name="job_status" type="String" nullable="false" length="200"/>
<column name="open_date" type="Date" nullable="true"/> <column name="open_date" type="Date" nullable="true"/>
......
<?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.DefineTableOperation">
<tableName factory="String">tl_notification_template</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="notification_type" type="String" nullable="false" length="200"/>
<column name="days_after" type="Long" nullable="false"/>
<column name="notification_content" type="CLOB" nullable="false"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
...@@ -27,6 +27,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -27,6 +27,7 @@ CREATE TABLE tl_hiring_team (
card_post_code varchar(10) NULL, card_post_code varchar(10) NULL,
card_id varchar(100) NULL, card_id varchar(100) NULL,
plan_renewed_on datetime NULL, plan_renewed_on datetime NULL,
ppj_credits numeric(12) NULL,
used_credits numeric(12) NULL, used_credits numeric(12) NULL,
available_credits numeric(12) NULL, available_credits numeric(12) NULL,
is_ppj char(1) NULL, is_ppj char(1) NULL,
...@@ -36,6 +37,8 @@ CREATE TABLE tl_hiring_team ( ...@@ -36,6 +37,8 @@ CREATE TABLE tl_hiring_team (
last_plan_amount numeric(20,5) NULL, last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NULL,
plan_cancelled char(1) NULL, plan_cancelled char(1) NULL,
on_trial char(1) NULL,
trial_job_count numeric(12) NULL,
message_id numeric(12) NULL, message_id 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,
......
...@@ -8,7 +8,7 @@ CREATE TABLE tl_job ( ...@@ -8,7 +8,7 @@ CREATE TABLE tl_job (
object_last_updated_date datetime DEFAULT getdate() NOT NULL , object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL object_created_date datetime DEFAULT getdate() NOT NULL
, ,
job_title varchar(30) NOT NULL, job_title varchar(60) NOT NULL,
job_description text NOT NULL, job_description text NOT NULL,
job_status varchar(200) NOT NULL, job_status varchar(200) NOT NULL,
open_date datetime NULL, open_date datetime NULL,
......
-- DROP TABLE tl_notification_template;
CREATE TABLE tl_notification_template (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
notification_type varchar(200) NOT NULL,
days_after numeric(12) NOT NULL,
notification_content text NOT NULL
);
ALTER TABLE tl_notification_template ADD
CONSTRAINT PK_tl_notification_template PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
...@@ -28,6 +28,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -28,6 +28,7 @@ CREATE TABLE tl_hiring_team (
card_post_code varchar2(10) NULL, card_post_code varchar2(10) NULL,
card_id varchar2(100) NULL, card_id varchar2(100) NULL,
plan_renewed_on date NULL, plan_renewed_on date NULL,
ppj_credits number(12) NULL,
used_credits number(12) NULL, used_credits number(12) NULL,
available_credits number(12) NULL, available_credits number(12) NULL,
is_ppj char(1) NULL, is_ppj char(1) NULL,
...@@ -37,6 +38,8 @@ CREATE TABLE tl_hiring_team ( ...@@ -37,6 +38,8 @@ CREATE TABLE tl_hiring_team (
last_plan_amount number(20,5) NULL, last_plan_amount number(20,5) NULL,
google_address_text varchar2(300) NULL, google_address_text varchar2(300) NULL,
plan_cancelled char(1) NULL, plan_cancelled char(1) NULL,
on_trial char(1) NULL,
trial_job_count number(12) NULL,
message_id number(12) NULL, message_id 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,
......
...@@ -9,7 +9,7 @@ CREATE TABLE tl_job ( ...@@ -9,7 +9,7 @@ CREATE TABLE tl_job (
object_last_updated_date date DEFAULT SYSDATE NOT NULL , object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL object_created_date date DEFAULT SYSDATE NOT NULL
, ,
job_title varchar2(30) NOT NULL, job_title varchar2(60) NOT NULL,
job_description clob NOT NULL, job_description clob NOT NULL,
job_status varchar2(200) NOT NULL, job_status varchar2(200) NOT NULL,
open_date date NULL, open_date date NULL,
......
-- DROP TABLE tl_notification_template;
CREATE TABLE tl_notification_template (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
notification_type varchar2(200) NOT NULL,
days_after number(12) NOT NULL,
notification_content clob NOT NULL
);
ALTER TABLE tl_notification_template ADD
CONSTRAINT PK_tl_notification_template PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
...@@ -28,6 +28,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -28,6 +28,7 @@ CREATE TABLE tl_hiring_team (
card_post_code varchar(10) NULL, card_post_code varchar(10) NULL,
card_id varchar(100) NULL, card_id varchar(100) NULL,
plan_renewed_on timestamp NULL, plan_renewed_on timestamp NULL,
ppj_credits numeric(12) NULL,
used_credits numeric(12) NULL, used_credits numeric(12) NULL,
available_credits numeric(12) NULL, available_credits numeric(12) NULL,
is_ppj char(1) NULL, is_ppj char(1) NULL,
...@@ -37,6 +38,8 @@ CREATE TABLE tl_hiring_team ( ...@@ -37,6 +38,8 @@ CREATE TABLE tl_hiring_team (
last_plan_amount numeric(20,5) NULL, last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NULL,
plan_cancelled char(1) NULL, plan_cancelled char(1) NULL,
on_trial char(1) NULL,
trial_job_count numeric(12) NULL,
message_id numeric(12) NULL, message_id 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,
......
...@@ -9,7 +9,7 @@ CREATE TABLE tl_job ( ...@@ -9,7 +9,7 @@ CREATE TABLE tl_job (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL , object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL object_created_date timestamp DEFAULT NOW() NOT NULL
, ,
job_title varchar(30) NOT NULL, job_title varchar(60) NOT NULL,
job_description text NOT NULL, job_description text NOT NULL,
job_status varchar(200) NOT NULL, job_status varchar(200) NOT NULL,
open_date timestamp NULL, open_date timestamp NULL,
......
-- @AutoRun
-- drop table tl_notification_template;
CREATE TABLE tl_notification_template (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
notification_type varchar(200) NOT NULL,
days_after numeric(12) NOT NULL,
notification_content text NOT NULL
);
ALTER TABLE tl_notification_template ADD
CONSTRAINT pk_tl_notification_template PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
...@@ -6,7 +6,9 @@ import oneit.objstore.ObjectTransaction; ...@@ -6,7 +6,9 @@ import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException; import oneit.objstore.StorageException;
import oneit.objstore.rdbms.filters.LessThanFilter; import oneit.objstore.rdbms.filters.LessThanFilter;
import oneit.utils.DateDiff; import oneit.utils.DateDiff;
import oneit.utils.math.NullArith;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
import performa.orm.HiringTeam;
import performa.orm.Job; import performa.orm.Job;
import performa.orm.types.JobStatus; import performa.orm.types.JobStatus;
...@@ -30,7 +32,39 @@ public class CloseJobBatch extends ORMBatch ...@@ -30,7 +32,39 @@ public class CloseJobBatch extends ORMBatch
job.setIsManuallyClosed(Boolean.FALSE); job.setIsManuallyClosed(Boolean.FALSE);
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Setting Job Status to Closed in job : ", job); LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Setting Job Status to Closed in job : ", job);
if(job.getJobApplicationsCount() == 0)
{
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "No Applicants for job: ", job, " hence crediting account : ", billingTeam);
if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
billingTeam.setTrialJobCount(billingTeam.getTrialJobCount() - 1);
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Reducing trail job count of hiring team : ", billingTeam);
}
else
{
if(billingTeam.getIsPPJ())
{
billingTeam.setPPJCredits(NullArith.add(billingTeam.getPPJCredits(), 1).intValue());
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Increasing PPJ Credits of hiring team : ", billingTeam);
}
else
{
if(billingTeam.getUsedCredits() > billingTeam.getAvailableCredits())
{
billingTeam.setAvailableCredits(NullArith.add(billingTeam.getAvailableCredits(), 1).intValue());
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Increasing Available Credits of hiring team (to recover usage records on stripe) : ", billingTeam);
} }
billingTeam.setUsedCredits(NullArith.subtract(billingTeam.getUsedCredits(), 1).intValue());
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Reducing used credits of hiring team ", billingTeam);
}
}
}
}
} }
} }
\ No newline at end of file
package performa.batch;
import java.util.Calendar;
import oneit.appservices.batch.ORMBatch;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException;
import oneit.objstore.rdbms.filters.InFilter;
import oneit.objstore.rdbms.filters.LessThanEqualFilter;
import oneit.utils.DateDiff;
import oneit.utils.parsers.FieldException;
import performa.orm.Job;
import performa.orm.types.JobStatus;
public class NotificationBatch extends ORMBatch
{
public static LoggingArea NOTIFICATION_BATCH = LoggingArea.createLoggingArea("NotificationBatch");
@Override
public void run(ObjectTransaction ot) throws StorageException, FieldException
{
LogMgr.log (NOTIFICATION_BATCH, LogLevel.PROCESSING1, "RUNNING Notification Batch");
Job[] closedJobs = Job.SearchByAll()
.andJobStatus(new InFilter<>(JobStatus.COMPLETE, JobStatus.FILLED))
.andLastStatusChangeDate(new LessThanEqualFilter<>(DateDiff.add(DateDiff.getToday(), 14, Calendar.DATE)))
.search(ot);
}
}
\ No newline at end of file
...@@ -74,6 +74,7 @@ public class AddHiringTeamFP extends SaveFP ...@@ -74,6 +74,7 @@ public class AddHiringTeamFP extends SaveFP
} }
else else
{ {
hiringTeam.setOnTrial(false);
hiringTeam.setBilledByTeam(company.getBillingTeam()); hiringTeam.setBilledByTeam(company.getBillingTeam());
} }
......
...@@ -16,7 +16,6 @@ import oneit.servlets.process.SaveFP; ...@@ -16,7 +16,6 @@ import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException; import oneit.utils.BusinessException;
import oneit.utils.DateDiff; import oneit.utils.DateDiff;
import oneit.utils.math.NullArith; import oneit.utils.math.NullArith;
import performa.orm.CompanyUser;
import performa.orm.HiringTeam; import performa.orm.HiringTeam;
import performa.orm.Job; import performa.orm.Job;
import performa.utils.StripeUtils; import performa.utils.StripeUtils;
...@@ -34,11 +33,9 @@ public class ExtendJobFP extends SaveFP ...@@ -34,11 +33,9 @@ public class ExtendJobFP extends SaveFP
HiringTeam hiringTeam = job.getHiringTeam(); HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam(); HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
SecUser secUser = SecUser.getTXUser(process.getTransaction()); SecUser secUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Start of Extend job : ", job); LogMgr.log(LOG, LogLevel.PROCESSING1, "Start of Extend job : ", job);
job.setApplyBy(DateDiff.add(job.getApplyBy(), Calendar.DATE, 30)); job.setApplyBy(DateDiff.add(job.getApplyBy(), Calendar.DATE, 30));
job.setLastEdited(new Date()); job.setLastEdited(new Date());
...@@ -53,7 +50,7 @@ public class ExtendJobFP extends SaveFP ...@@ -53,7 +50,7 @@ public class ExtendJobFP extends SaveFP
} }
else if(billingTeam.getIsPPJ()) else if(billingTeam.getIsPPJ())
{ {
StripeUtils.makePayment(hiringTeam, job); hiringTeam.makePayment(job);
} }
LogMgr.log(LOG, LogLevel.PROCESSING1, "Job Extended. Apply by date : ", job.getApplyBy()); LogMgr.log(LOG, LogLevel.PROCESSING1, "Job Extended. Apply by date : ", job.getApplyBy());
......
...@@ -59,7 +59,7 @@ public class MakePaymentFP extends SaveFP ...@@ -59,7 +59,7 @@ public class MakePaymentFP extends SaveFP
if(hiringTeam.getCardID() != null && hiringTeam.isTrue(hiringTeam.getIsPPJ())) if(hiringTeam.getCardID() != null && hiringTeam.isTrue(hiringTeam.getIsPPJ()))
{ {
StripeUtils.makePayment(hiringTeam, job); hiringTeam.makePayment(job);
} }
if(hiringTeam.getCardID() == null) if(hiringTeam.getCardID() == null)
......
...@@ -56,6 +56,8 @@ public class SaveCompanyFP extends SaveFP ...@@ -56,6 +56,8 @@ public class SaveCompanyFP extends SaveFP
} }
else else
{ {
hiringTeam.setOnTrial(false);
if(hiringTeam.getPaymentPlan() != null && subscription != null) if(hiringTeam.getPaymentPlan() != null && subscription != null)
{ {
StripeUtils.cancelSubscription(subscription, true); StripeUtils.cancelSubscription(subscription, true);
......
...@@ -35,12 +35,43 @@ public class SaveJobFP extends SaveFP ...@@ -35,12 +35,43 @@ public class SaveJobFP extends SaveFP
LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"In SaveJobFP saving job : ", job ); LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"In SaveJobFP saving job : ", job );
if(job.getJobStatus() == JobStatus.DRAFT && status != null && status == JobStatus.OPEN) if(job.getJobStatus() == JobStatus.OPEN && status != null && status == JobStatus.CANCELLED)
{
if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
billingTeam.setTrialJobCount(billingTeam.getTrialJobCount() - 1);
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence reducing trial job count : ", billingTeam);
}
else
{
if(billingTeam.getIsPPJ())
{
billingTeam.setPPJCredits(NullArith.add(billingTeam.getPPJCredits(), 1).intValue());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence increasing PPJ credits : ", billingTeam);
}
else
{
if(billingTeam.getUsedCredits() > billingTeam.getAvailableCredits())
{
billingTeam.setAvailableCredits(NullArith.add(billingTeam.getAvailableCredits(), 1).intValue());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence increasing available credits (to recover usage records on stripe) : ", billingTeam);
}
billingTeam.setUsedCredits(NullArith.subtract(billingTeam.getUsedCredits(), 1).intValue());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence reducing used credits : ", billingTeam);
}
}
}
else if(job.getJobStatus() == JobStatus.DRAFT && status != null && status == JobStatus.OPEN)
{ {
job.setApplyBy(DateDiff.add(DateDiff.getToday(), Calendar.DATE, 30)); job.setApplyBy(DateDiff.add(DateDiff.getToday(), Calendar.DATE, 30));
job.setOpenDate(new Date()); job.setOpenDate(new Date());
if (billingTeam.canCreateJob()) if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
billingTeam.setTrialJobCount(billingTeam.getTrialJobCount() + 1);
}
else if (billingTeam.canCreateJob())
{ {
billingTeam.setUsedCredits(NullArith.add(billingTeam.getUsedCredits(), 1).intValue()); billingTeam.setUsedCredits(NullArith.add(billingTeam.getUsedCredits(), 1).intValue());
...@@ -51,7 +82,7 @@ public class SaveJobFP extends SaveFP ...@@ -51,7 +82,7 @@ public class SaveJobFP extends SaveFP
} }
else if(billingTeam.getIsPPJ()) else if(billingTeam.getIsPPJ())
{ {
StripeUtils.makePayment(hiringTeam, job); billingTeam.makePayment(job);
} }
LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"Job status changed as Open. ", job ); LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"Job status changed as Open. ", job );
...@@ -91,18 +122,14 @@ public class SaveJobFP extends SaveFP ...@@ -91,18 +122,14 @@ public class SaveJobFP extends SaveFP
HiringTeam hiringTeam = job.getHiringTeam(); HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam(); HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
// if(job.getJobStatus() != JobStatus.DRAFT || openJob == Boolean.TRUE)
// {
// BusinessObjectParser.assertFieldCondition(job.getLevel() != null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
//
// if(job.getLevel() != null)
// {
// BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
// }
// }
if(status != null && status == JobStatus.OPEN) if(status != null && status == JobStatus.OPEN)
{ {
if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
BusinessObjectParser.assertFieldCondition(billingTeam.getTrialJobCount() < 1 , billingTeam, HiringTeam.FIELD_TrialJobCount, "cannotOpenJob", exceptions, true, request);
}
else
{
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);
if(!billingTeam.getIsPPJ()) if(!billingTeam.getIsPPJ())
...@@ -110,6 +137,7 @@ public class SaveJobFP extends SaveFP ...@@ -110,6 +137,7 @@ public class SaveJobFP extends SaveFP
BusinessObjectParser.assertFieldCondition(billingTeam.canCreateJob() , job, Job.FIELD_JobStatus, "insufficientCredit", exceptions, true, request); BusinessObjectParser.assertFieldCondition(billingTeam.canCreateJob() , job, Job.FIELD_JobStatus, "insufficientCredit", exceptions, true, request);
} }
} }
}
super.validate(process, submission, exceptions, params); super.validate(process, submission, exceptions, params);
} }
......
...@@ -140,6 +140,8 @@ public class SavePaymentPlanFP extends SaveFP ...@@ -140,6 +140,8 @@ public class SavePaymentPlanFP extends SaveFP
} }
} }
hiringTeam.setOnTrial(false);
return super.processForm(process, submission, params); return super.processForm(process, submission, params);
} }
......
...@@ -144,6 +144,12 @@ public class SendVerificationMailFP extends SaveFP ...@@ -144,6 +144,12 @@ public class SendVerificationMailFP extends SaveFP
candidate.setIsPasswordChanged(true); candidate.setIsPasswordChanged(true);
} }
// job has no requirements, and candidate has already done the culture and role fit. Submit application automatically.
if(!job.getIncludeAssessmentCriteria() && (candidate.cultureCompleted(job) || !job.getIncludeCulture()) && candidate.assessmentCompleted(job))
{
jobApplication.setApplicationStatus(ApplicationStatus.SUBMITTED);
}
// storing candidate location in application for distance calculation to be accurate even if user edits // storing candidate location in application for distance calculation to be accurate even if user edits
// location in the next application // location in the next application
jobApplication.setGoogleAddressText(candidate.getGoogleAddressText()); jobApplication.setGoogleAddressText(candidate.getGoogleAddressText());
......
...@@ -852,7 +852,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -852,7 +852,7 @@ public abstract class BaseJob extends BaseBusinessClass
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "job_title"); metaInfo.put ("dbcol", "job_title");
metaInfo.put ("length", "30"); metaInfo.put ("length", "60");
metaInfo.put ("mandatory", "true"); metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "JobTitle"); metaInfo.put ("name", "JobTitle");
metaInfo.put ("type", "String"); metaInfo.put ("type", "String");
......
...@@ -9,10 +9,12 @@ import oneit.objstore.FieldWriteability; ...@@ -9,10 +9,12 @@ import oneit.objstore.FieldWriteability;
import oneit.objstore.ValidationContext; import oneit.objstore.ValidationContext;
import oneit.objstore.rdbms.filters.EqualsFilter; import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.security.SecUser; import oneit.security.SecUser;
import oneit.utils.BusinessException;
import oneit.utils.CollectionUtils; import oneit.utils.CollectionUtils;
import oneit.utils.DateDiff; import oneit.utils.DateDiff;
import oneit.utils.StringUtils; import oneit.utils.StringUtils;
import oneit.utils.filter.Filter; import oneit.utils.filter.Filter;
import oneit.utils.math.NullArith;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
import performa.orm.types.CurrencyType; import performa.orm.types.CurrencyType;
import performa.orm.types.RoleType; import performa.orm.types.RoleType;
...@@ -114,6 +116,13 @@ public class HiringTeam extends BaseHiringTeam ...@@ -114,6 +116,13 @@ public class HiringTeam extends BaseHiringTeam
@Override @Override
public Integer getPPJCredits()
{
return super.getPPJCredits() != null ? super.getPPJCredits() : 0;
}
@Override
public Integer getAvailableCredits() public Integer getAvailableCredits()
{ {
return super.getAvailableCredits()!= null ? super.getAvailableCredits() : 0; return super.getAvailableCredits()!= null ? super.getAvailableCredits() : 0;
...@@ -164,6 +173,11 @@ public class HiringTeam extends BaseHiringTeam ...@@ -164,6 +173,11 @@ public class HiringTeam extends BaseHiringTeam
{ {
if(getManageOwnBilling()) if(getManageOwnBilling())
{ {
if(isTrue(getOnTrial()))
{
return getTrialJobCount() == 0;
}
return getPaymentPlan() != null && getStripeSubscription() != null && (getAvailableCredits() > getUsedCredits() || !getHasCap() || (getHasCap() && getMaxCap() > getUsedCredits())); return getPaymentPlan() != null && getStripeSubscription() != null && (getAvailableCredits() > getUsedCredits() || !getHasCap() || (getHasCap() && getMaxCap() > getUsedCredits()));
} }
...@@ -265,6 +279,11 @@ public class HiringTeam extends BaseHiringTeam ...@@ -265,6 +279,11 @@ public class HiringTeam extends BaseHiringTeam
{ {
if(getManageOwnBilling()) if(getManageOwnBilling())
{ {
if(isTrue(getOnTrial()))
{
return true;
}
return getCardID() != null && getIsPPJ() != null && (getIsPPJ() || (!getIsPPJ() && getPaymentPlan() != null && getStripeSubscription() != null)); return getCardID() != null && getIsPPJ() != null && (getIsPPJ() || (!getIsPPJ() && getPaymentPlan() != null && getStripeSubscription() != null));
} }
...@@ -276,9 +295,37 @@ public class HiringTeam extends BaseHiringTeam ...@@ -276,9 +295,37 @@ public class HiringTeam extends BaseHiringTeam
{ {
if(getManageOwnBilling()) if(getManageOwnBilling())
{ {
if(isTrue(getOnTrial()))
{
return getTrialJobCount() == 0;
}
return isTrue(isPPJ()) || ( isFalse(isPPJ()) && getPaymentPlan() != null && getStripeSubscription() != 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();
} }
public boolean trialJobNotAllowed()
{
return isTrue(getOnTrial()) && getTrialJobCount() == 1;
}
@Override
public Integer getTrialJobCount()
{
return super.getTrialJobCount() != null ? super.getTrialJobCount() : 0;
}
public void makePayment(Job job) throws BusinessException
{
if(getPPJCredits() > 0)
{
setPPJCredits(NullArith.subtract(getPPJCredits(), 1).intValue());
}
else
{
StripeUtils.makePayment(this, job);
}
}
} }
\ No newline at end of file
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<ATTRIB name="CardPostCode" type="String" dbcol="card_post_code" length="10" /> <ATTRIB name="CardPostCode" type="String" dbcol="card_post_code" length="10" />
<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="PPJCredits" type="Integer" dbcol="ppj_credits" />
<ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" /> <ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" />
<ATTRIB name="AvailableCredits" type="Integer" dbcol="available_credits" /> <ATTRIB name="AvailableCredits" type="Integer" dbcol="available_credits" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" /> <ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" />
...@@ -46,6 +47,8 @@ ...@@ -46,6 +47,8 @@
<ATTRIB name="LastPlanAmount" type="Double" dbcol="last_plan_amount" /> <ATTRIB name="LastPlanAmount" type="Double" dbcol="last_plan_amount" />
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" /> <ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" />
<ATTRIB name="PlanCancelled" type="Boolean" dbcol="plan_cancelled" defaultValue="Boolean.FALSE"/> <ATTRIB name="PlanCancelled" type="Boolean" dbcol="plan_cancelled" defaultValue="Boolean.FALSE"/>
<ATTRIB name="OnTrial" type="Boolean" dbcol="on_trial" defaultValue="Boolean.FALSE"/>
<ATTRIB name="TrialJobCount" type="Integer" dbcol="trial_job_count" defaultValue="0"/>
<ATTRIB name="MessageID" type="Integer" dbcol="message_id" /> <ATTRIB name="MessageID" type="Integer" dbcol="message_id" />
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" /> <SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" />
......
...@@ -593,6 +593,11 @@ public class Job extends BaseJob ...@@ -593,6 +593,11 @@ public class Job extends BaseJob
if(roleType != RoleType.STANDARD) if(roleType != RoleType.STANDARD)
{ {
statusList.add(JobStatus.COMPLETE); statusList.add(JobStatus.COMPLETE);
if(getJobApplicationsCount() == 0)
{
statusList.add(JobStatus.CANCELLED);
}
} }
} }
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<TABLE name="tl_job" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_job" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="JobTitle" type="String" dbcol="job_title" length="30" mandatory="true"/> <ATTRIB name="JobTitle" type="String" dbcol="job_title" length="60" mandatory="true"/>
<ATTRIB name="JobDescription" type="String" dbcol="job_description" mandatory="true"/> <ATTRIB name="JobDescription" type="String" dbcol="job_description" mandatory="true"/>
<ATTRIB name="JobStatus" type="JobStatus" dbcol="job_status" attribHelper="EnumeratedAttributeHelper" mandatory="true"/> <ATTRIB name="JobStatus" type="JobStatus" dbcol="job_status" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="OpenDate" type="Date" dbcol="open_date"/> <ATTRIB name="OpenDate" type="Date" dbcol="open_date"/>
......
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.utils.*;
import performa.orm.types.*;
import performa.orm.*;
public class NotificationTemplate extends BaseNotificationTemplate
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public NotificationTemplate ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<BUSINESSCLASS name="NotificationTemplate" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<IMPORT value="performa.orm.*"/>
<TABLE name="tl_notification_template" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="NotificationType" type="NotificationType" dbcol="notification_type" mandatory="true" defaultValue="NotificationType.TRIAL" attribHelper="EnumeratedAttributeHelper" />
<ATTRIB name="DaysAfter" type="Integer" dbcol="days_after" mandatory="true" defaultValue="0" />
<ATTRIB name="NotificationContent" type="String" dbcol="notification_content" mandatory="true" />
</TABLE>
<SEARCH type="All" paramFilter="tl_notification_template.object_id is not null" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
...@@ -28,8 +28,10 @@ public class JobStatus extends AbstractEnumerated ...@@ -28,8 +28,10 @@ public class JobStatus extends AbstractEnumerated
public static final JobStatus FILLED = new JobStatus ("FILLED", "FILLED", "Filled", false); public static final JobStatus FILLED = new JobStatus ("FILLED", "FILLED", "Filled", false);
public static final JobStatus CANCELLED = new JobStatus ("CANCELLED", "CANCELLED", "Cancelled", false);
private static final JobStatus[] allJobStatuss = private static final JobStatus[] allJobStatuss =
new JobStatus[] { OPEN,COMPLETE,DRAFT,FILLED}; new JobStatus[] { OPEN,COMPLETE,DRAFT,FILLED,CANCELLED};
private static JobStatus[] getAllJobStatuss () private static JobStatus[] getAllJobStatuss ()
...@@ -120,6 +122,7 @@ public class JobStatus extends AbstractEnumerated ...@@ -120,6 +122,7 @@ public class JobStatus extends AbstractEnumerated
COMPLETE.ClientSortOrder = 2; COMPLETE.ClientSortOrder = 2;
DRAFT.ClientSortOrder = 4; DRAFT.ClientSortOrder = 4;
FILLED.ClientSortOrder = 3; FILLED.ClientSortOrder = 3;
CANCELLED.ClientSortOrder = 5;
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<VALUE name="COMPLETE" value="COMPLETE" description="Closed" ClientSortOrder="2"/> <VALUE name="COMPLETE" value="COMPLETE" description="Closed" ClientSortOrder="2"/>
<VALUE name="DRAFT" value="DRAFT" description="Draft" ClientSortOrder="4"/> <VALUE name="DRAFT" value="DRAFT" description="Draft" ClientSortOrder="4"/>
<VALUE name="FILLED" value="FILLED" description="Filled" ClientSortOrder="3"/> <VALUE name="FILLED" value="FILLED" description="Filled" ClientSortOrder="3"/>
<VALUE name="CANCELLED" value="CANCELLED" description="Cancelled" ClientSortOrder="5"/>
</CONSTANT> </CONSTANT>
</ROOT> </ROOT>
\ No newline at end of file
package performa.orm.types;
import java.util.*;
import oneit.utils.*;
/**
* This class was generated using constGen.bat.
* DO NOT MODIFY THIS CODE.
* Edit the associated .xml file, and regenerate this file
* constGen (directory) (file minus extension)
* e.g. constGen C:\...\sql FieldType
*/
public class NotificationType extends AbstractEnumerated
{
public static final EnumeratedFactory FACTORY_NotificationType = new NotificationTypeFactory();
public static final NotificationType CLOSED_JOB = new NotificationType ("CLOSED_JOB", "CLOSED_JOB", "Closed Job", false);
public static final NotificationType TRIAL = new NotificationType ("TRIAL", "TRIAL", "Trial", false);
private static final NotificationType[] allNotificationTypes =
new NotificationType[] { CLOSED_JOB,TRIAL};
private static NotificationType[] getAllNotificationTypes ()
{
return allNotificationTypes;
}
private NotificationType (String name, String value, String description, boolean disabled)
{
super (name, value, description, disabled);
}
public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allNotificationTypes);
static
{
defineAdditionalData ();
}
public boolean isEqual (NotificationType other)
{
return this.name.equals (other.name);
}
public Enumeration getAllInstances ()
{
return NotificationType.getAll ();
}
private Object readResolve() throws java.io.ObjectStreamException
{
return NotificationType.forName (this.name);
}
public EnumeratedFactory getFactory ()
{
return FACTORY_NotificationType;
}
public static NotificationType forName (String name)
{
if (name == null) { return null; }
NotificationType[] all = getAllNotificationTypes();
int enumIndex = AbstractEnumerated.getIndexForName (all, name);
return all[enumIndex];
}
public static NotificationType forValue (String value)
{
if (value == null) { return null; }
NotificationType[] all = getAllNotificationTypes();
int enumIndex = AbstractEnumerated.getIndexForValue (getAllNotificationTypes (), value);
return all[enumIndex];
}
public static java.util.Enumeration getAll ()
{
return AbstractEnumerated.getAll (getAllNotificationTypes());
}
public static NotificationType[] getNotificationTypeArray ()
{
return (NotificationType[])getAllNotificationTypes().clone ();
}
public static void defineAdditionalData ()
{
}
static class NotificationTypeFactory implements EnumeratedFactory
{
public AbstractEnumerated getForName (String name)
{
return NotificationType.forName (name);
}
public AbstractEnumerated getForValue (String name)
{
return NotificationType.forValue (name);
}
public Enumeration getAll ()
{
return NotificationType.getAll ();
}
}
public Map getAdditionalAttributes ()
{
Map attribs = new HashMap ();
return attribs;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<CONSTANT package="performa.orm.types" name="NotificationType">
<VALUE name="CLOSED_JOB" value="CLOSED_JOB" description="Closed Job"/>
<VALUE name="TRIAL" value="TRIAL" description="Trial" />
</CONSTANT>
</ROOT>
...@@ -490,8 +490,6 @@ public class StripeUtils ...@@ -490,8 +490,6 @@ public class StripeUtils
LogMgr.log(LoggingArea.ALL, LogLevel.PROCESSING1, "Setting hiring team with reset plan details : ", hiringTeam); LogMgr.log(LoggingArea.ALL, LogLevel.PROCESSING1, "Setting hiring team with reset plan details : ", hiringTeam);
} }
} }
} }
} }
......
...@@ -3120,6 +3120,10 @@ a.forgot-pass { ...@@ -3120,6 +3120,10 @@ a.forgot-pass {
background: url('../images/closed.png') no-repeat top left; background: url('../images/closed.png') no-repeat top left;
} }
.select2type-results .icontype_cancelled:before{
background: url('../images/cancelled.png') no-repeat top left;
}
.select2type-results .icontype_filled:before{ .select2type-results .icontype_filled:before{
background: url('../images/filled.png') no-repeat top left; background: url('../images/filled.png') no-repeat top left;
} }
...@@ -3431,6 +3435,21 @@ span.export-candidate,span.appli-status-short{ ...@@ -3431,6 +3435,21 @@ span.export-candidate,span.appli-status-short{
} }
.culture-detail-row {position: relative; margin-top: 0 ;margin-bottom: 0}
.culture-dot{position: absolute;top: 16px;}
.culture-text{
padding-left: 20px;
position: absolute;
top: 0;
width: 75%;
display: table;
height: 45px;
}
.culture-text .calcField{
display: table-cell;
vertical-align: middle;
}
.culture-fit .text-dot-dot{white-space: normal;overflow: visible;} .culture-fit .text-dot-dot{white-space: normal;overflow: visible;}
.r-y-label{ .r-y-label{
font-size: 10px; font-size: 10px;
......
...@@ -165,6 +165,19 @@ ...@@ -165,6 +165,19 @@
<TASK factory="Participant" class="oneit.appservices.batch.DefaultTask" lockName="performa"> <TASK factory="Participant" class="oneit.appservices.batch.DefaultTask" lockName="performa">
<RUN class="performa.batch.NotificationBatch" factory="Participant"/>
<WHEN factory="MetaComponent" component="BatchSchedule" selector="performa.runbatch">
<NODE name="schedule" class="oneit.appservices.batch.DailySchedule">
<NODE name="hourOfDay" factory="Integer" value="0"/>
<NODE name="minuteOfHour" factory="Integer" value="10"/>
</NODE>
</WHEN>
</TASK>
<TASK factory="Participant" class="oneit.appservices.batch.DefaultTask" lockName="performa">
<RUN class="performa.batch.PullStripeDataBatch" factory="Participant"/> <RUN class="performa.batch.PullStripeDataBatch" factory="Participant"/>
<WHEN factory="MetaComponent" component="BatchSchedule" selector="performa.runbatch"> <WHEN factory="MetaComponent" component="BatchSchedule" selector="performa.runbatch">
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus(); $('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
} }
recalcFunction(); //recalcFunction();
}); });
}); });
...@@ -51,9 +51,9 @@ ...@@ -51,9 +51,9 @@
}); });
} }
function deleteCriteria(deleteVarKey) function deleteCriteria(deleteVarKey, criteriaID)
{ {
ajaxProcessDeleteJQ("<%= request.getContextPath() %>/genericDelete_AJAX.jsp", "#assessmentCriteriaSection" , { varKey: deleteVarKey }); ajaxProcessDeleteJQ("<%= request.getContextPath() %>/genericDelete_AJAX.jsp", "#" + criteriaID , { varKey: deleteVarKey });
return false; return false;
} }
</script> </script>
......
...@@ -330,7 +330,7 @@ ...@@ -330,7 +330,7 @@
line-height: 1.2em; line-height: 1.2em;
padding-left: 55px; padding-left: 55px;
width: 223px; width: 223px;
padding: 7px 0 7px 56px; padding: 7px 0 7px 50px;
} }
.culture .text-dot-dot{white-space: normal;overflow: visible;} .culture .text-dot-dot{white-space: normal;overflow: visible;}
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getApplicantWFs(), List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()}, new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST}); new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
HiringTeam hiringTeam = job.getHiringTeam();
%> %>
<oneit:dynIncluded> <oneit:dynIncluded>
...@@ -69,6 +70,10 @@ ...@@ -69,6 +70,10 @@
.mapEntry("Job", job) .mapEntry("Job", job)
.toMap() %>" /> .toMap() %>" />
</div> </div>
<%
if(!(CollectionUtils.equals(workflowStatus,ApplicationStatus.DRAFT) && hiringTeam.isTrue(hiringTeam.getOnTrial())))
{
%>
<div class="appli-filter"> <div class="appli-filter">
<% <%
if(!CollectionUtils.equals(workflowStatus,ApplicationStatus.DRAFT)) if(!CollectionUtils.equals(workflowStatus,ApplicationStatus.DRAFT))
...@@ -142,6 +147,9 @@ ...@@ -142,6 +147,9 @@
%> %>
</select> </select>
</div> </div>
<%
}
%>
</div> </div>
<div class="checkbox-list select-all"> <div class="checkbox-list select-all">
<input type='checkbox' id='select_all' value='select_all' class='norecalc'> <input type='checkbox' id='select_all' value='select_all' class='norecalc'>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
showError = false; showError = false;
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus(); $('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
} }
recalcFunction(); //recalcFunction();
}); });
}); });
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
} }
Article home = WebUtils.getArticleByShortCut(objTran, WebUtils.ADMIN_HOME); Article home = WebUtils.getArticleByShortCut(objTran, WebUtils.ADMIN_HOME);
Article companyArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.MY_COMPANY);
String homeUrl = home.getLink(request); String homeUrl = home.getLink(request);
String signoutUrl = "logout.jsp?nextURL=" + homeUrl; String signoutUrl = "logout.jsp?nextURL=" + homeUrl;
...@@ -140,6 +141,10 @@ ...@@ -140,6 +141,10 @@
function showReachedCap(){ function showReachedCap(){
$('#reachedCap').modal('show'); $('#reachedCap').modal('show');
} }
function trialNotAllowed(){
$('#trialNotAllowed').modal('show');
}
</script> </script>
<div class="container-fluid"> <div class="container-fluid">
...@@ -214,8 +219,9 @@ ...@@ -214,8 +219,9 @@
boolean onJob = WebUtils.onJobPages(renderMode); boolean onJob = WebUtils.onJobPages(renderMode);
boolean hasBillingSetup = selectedTeam.hasBillingSetup(); boolean hasBillingSetup = selectedTeam.hasBillingSetup();
boolean canCreateJob = selectedTeam.allowJobCreation(); boolean canCreateJob = selectedTeam.allowJobCreation();
boolean trialNotAllowed = selectedTeam.trialJobNotAllowed();
%> %>
<a href="<%= onJob || !canCreateJob ? "javascript:void(0);": jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>" class="<%= onJob || !hasBillingSetup ? "disabled" : ""%>" onclick="<%= canCreateJob ? "" : "showReachedCap()"%>">Create Job</a> <a href="<%= onJob || !canCreateJob ? "javascript:void(0);": jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>" class="<%= onJob || !hasBillingSetup ? "disabled" : ""%>" onclick="<%= canCreateJob ? "" : trialNotAllowed ? "trialNotAllowed()" : "showReachedCap()"%>">Create Job</a>
<% <%
} }
%> %>
...@@ -253,6 +259,37 @@ ...@@ -253,6 +259,37 @@
</div> </div>
</div> </div>
</div> </div>
<oneit:form name="popupForm" method="post" enctype="multipart/form-data">
<div class="modal fade" id="trialNotAllowed" role="dialog">
<div class="modal-dialog welcome-pop-top">
<div class="modal-body main-welcome-popup">
<h2>Your account is on trial!</h2>
<%
if(companyUser.getRoleForHiringTeam(selectedTeam) == RoleType.STANDARD)
{
%>
<p>Only one Job can be created during the Trial. Please contact your Administrator to set up billing</p>
<%
}
else
{
%>
<p>Only one Job can be created during the Trial. <%= selectedTeam.getCardID() == null ? "Enter Billing Method and" : "" %> Select Plan to enable creation of additional 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", selectedTeam.getCardID() == null ? "Billing" : "ManagePlan").toMap()))
.mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", selectedTeam).toMap())
.toMap() %>">
Setup <%= selectedTeam.getCardID() == null ? "Billing" : "Payment Plan" %>
</oneit:button>
</div>
<%
}
%>
</div>
</div>
</div>
</oneit:form>
<% <%
} }
%> %>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getIncompleteApplicantWFs(), List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getIncompleteApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()}, new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST}); new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
HiringTeam hiringTeam = job.getHiringTeam();
%> %>
<oneit:dynIncluded> <oneit:dynIncluded>
...@@ -75,7 +76,11 @@ ...@@ -75,7 +76,11 @@
</div> </div>
</div> </div>
<div class="appli-list-name appli-l eq-second-height wider-box"> <div class="appli-list-name appli-l eq-second-height wider-box">
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link" <%
if(!hiringTeam.isTrue(hiringTeam.getOnTrial()) || j < 2)
{
%>
<oneit:button value=" " name="<%= hiringTeam.isTrue(hiringTeam.getOnTrial()) ? "" : "gotoPage"%>" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>"> .toMap() %>">
...@@ -139,6 +144,9 @@ ...@@ -139,6 +144,9 @@
} }
%> %>
</div> </div>
<%
}
%>
</div> </div>
<% <%
String widthClass = (job.showAssessmentCriteriaSection() && job.showCultureCriteriaSection()) ? "appli-jcs" : String widthClass = (job.showAssessmentCriteriaSection() && job.showCultureCriteriaSection()) ? "appli-jcs" :
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div class="main-qualification" id="<%= criteria.getID() %>"> <div class="main-qualification" id="<%= criteria.getID() %>">
<span class="delete-qualification" onclick="return deleteCriteria (<%= deleteVarKey %>)"><span></span></span> <span class="delete-qualification" onclick="return deleteCriteria (<%= deleteVarKey %> , <%= criteria.getID() %>)"><span></span></span>
<oneit:ormInput obj="<%= criteria %>" type="text" attributeName="Name" cssClass="form-control" /> <oneit:ormInput obj="<%= criteria %>" type="text" attributeName="Name" cssClass="form-control" />
<% <%
......
...@@ -61,6 +61,14 @@ ...@@ -61,6 +61,14 @@
$(".change-plan-no-button").on("click",function(){ $(".change-plan-no-button").on("click",function(){
ExtendPopup.close(); ExtendPopup.close();
}); });
$(".first-confirm-no-button").on("click",function(){
StatusPopup.close();
});
$(".second-confirm-no-button").on("click",function(){
ConfirmPopup.close();
});
}); });
function showExtendPopup(elem) function showExtendPopup(elem)
...@@ -304,7 +312,7 @@ ...@@ -304,7 +312,7 @@
</h3> </h3>
</div> </div>
<div class="change-plan-button extend-job-button"> <div class="change-plan-button extend-job-button">
<a class="change-plan-no-button popup-no-button">No</a> <a class="first-confirm-no-button popup-no-button">No</a>
<% <%
if(jStatus == JobStatus.OPEN) if(jStatus == JobStatus.OPEN)
{ {
...@@ -335,7 +343,7 @@ ...@@ -335,7 +343,7 @@
</div> </div>
</div> </div>
<div class="change-plan-button extend-job-button"> <div class="change-plan-button extend-job-button">
<a class="change-plan-no-button popup-no-button">No</a> <a class="second-confirm-no-button popup-no-button">No</a>
<oneit:button skin="link" value="Yes" name="saveJob" cssClass="change-plan-yes-button" <oneit:button skin="link" value="Yes" name="saveJob" cssClass="change-plan-yes-button"
requestAttribs="<%= CollectionUtils.mapEntry("Job", job) requestAttribs="<%= CollectionUtils.mapEntry("Job", job)
.mapEntry("nextPage", homePage + "&JobStatus=" + (jobStatus != null ? jobStatus : "") + "&JobSortOption=" + jobSortOption) .mapEntry("nextPage", homePage + "&JobStatus=" + (jobStatus != null ? jobStatus : "") + "&JobSortOption=" + jobSortOption)
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications"); List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION); String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
...@@ -69,6 +70,8 @@ ...@@ -69,6 +70,8 @@
Integer overallRank = jobApplication.getOverallRank(); Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1); Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
boolean missingReq = jobApplication.hasFailedEssentialRequirements(); boolean missingReq = jobApplication.hasFailedEssentialRequirements();
Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank;
Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
%> %>
<div class="appl-c-box application-row"> <div class="appl-c-box application-row">
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this--> <!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
...@@ -77,12 +80,12 @@ ...@@ -77,12 +80,12 @@
<div class="checkbox-list"> <div class="checkbox-list">
<input type="checkbox" name="IsSelected" value="<%= jobApplication.getObjectID().toString() %>" id="<%= appID %>" class="applicant" > <input type="checkbox" name="IsSelected" value="<%= jobApplication.getObjectID().toString() %>" id="<%= appID %>" class="applicant" >
<label for="<%= appID %>"> <label for="<%= appID %>">
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" /> <oneit:toString value="<%= onTrial && !isVisible ? "" : jobApplication.getCandidate() %>" mode="EscapeHTML" />
</label> </label>
</div> </div>
</div> </div>
</div> </div>
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link" <oneit:button value=" " name="<%= onTrial && !isVisible ? "" : "gotoPage"%>" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>"> .toMap() %>">
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<% <%
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications"); List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
String currentPage = (String) getData(request, "currentPage"); String currentPage = (String) getData(request, "currentPage");
ApplicationStatus appStatus = (ApplicationStatus) getData(request, "WorkFlowStatus"); ApplicationStatus appStatus = (ApplicationStatus) getData(request, "WorkFlowStatus");
...@@ -42,6 +43,8 @@ ...@@ -42,6 +43,8 @@
String appID = "app-id-" + jobApplication.getID().toString(); String appID = "app-id-" + jobApplication.getID().toString();
Integer overallRank = jobApplication.getOverallRank(); Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1); Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank;
Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
WorkFlow workflow = job.getWorkFlowByStatus(jobApplication.getApplicationStatus()); WorkFlow workflow = job.getWorkFlowByStatus(jobApplication.getApplicationStatus());
boolean missingReq = jobApplication.hasFailedEssentialRequirements(); boolean missingReq = jobApplication.hasFailedEssentialRequirements();
...@@ -55,6 +58,10 @@ ...@@ -55,6 +58,10 @@
</div> </div>
</div> </div>
<div class="appli-list-name appli-l eq-second-height"> <div class="appli-list-name appli-l eq-second-height">
<%
if(!onTrial || (onTrial && isVisible))
{
%>
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link" <oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
...@@ -64,6 +71,9 @@ ...@@ -64,6 +71,9 @@
<oneit:toString value="<%= jobApplication.getApplicantStatusStr() %>" mode="EscapeHTML" /> <oneit:toString value="<%= jobApplication.getApplicantStatusStr() %>" mode="EscapeHTML" />
</div> </div>
</oneit:button> </oneit:button>
<%
}
%>
</div> </div>
<div class="appli-overall appli-l eq-second-height"> <div class="appli-overall appli-l eq-second-height">
<div class="rank"> <div class="rank">
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications"); List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION); String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
...@@ -67,6 +68,8 @@ ...@@ -67,6 +68,8 @@
String appID = "app-id-" + jobApplication.getID().toString(); String appID = "app-id-" + jobApplication.getID().toString();
Integer overallRank = jobApplication.getOverallRank(); Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1); Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank;
Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
%> %>
<div class="<%= "appl-c-box " + (i == 0 ? " cb-one" : "")%> "> <div class="<%= "appl-c-box " + (i == 0 ? " cb-one" : "")%> ">
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this--> <!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
...@@ -75,12 +78,12 @@ ...@@ -75,12 +78,12 @@
<div class="checkbox-list"> <div class="checkbox-list">
<input type="checkbox" name="IsSelected" value="<%= jobApplication.getObjectID().toString() %>" id="<%= appID %>" class="applicant" > <input type="checkbox" name="IsSelected" value="<%= jobApplication.getObjectID().toString() %>" id="<%= appID %>" class="applicant" >
<label for="<%= appID %>"> <label for="<%= appID %>">
<oneit:toString value="<%= candidate %>" mode="EscapeHTML" /> <oneit:toString value="<%= onTrial && !isVisible ? "" : candidate %>" mode="EscapeHTML" />
</label> </label>
</div> </div>
</div> </div>
</div> </div>
<oneit:button value=" " name="gotoPage" skin="link" <oneit:button value=" " name="<%= onTrial && !isVisible ? "" : "gotoPage"%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>"> .toMap() %>">
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
JobApplication prevApp = (JobApplication) getData(request, "prevApp"); JobApplication prevApp = (JobApplication) getData(request, "prevApp");
JobApplication nextApp = (JobApplication) getData(request, "nextApp"); JobApplication nextApp = (JobApplication) getData(request, "nextApp");
Job job = jobApplication.getJob(); Job job = jobApplication.getJob();
HiringTeam hiringTeam = job.getHiringTeam();
Candidate candidate = jobApplication.getCandidate(); Candidate candidate = jobApplication.getCandidate();
String tabText = candidate.getToString(); String tabText = candidate.getToString();
String currentPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION); String currentPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
...@@ -20,6 +21,9 @@ ...@@ -20,6 +21,9 @@
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT ? job.getIncompleteApplicantWFs() : job.getApplicantWFs(), List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT ? job.getIncompleteApplicantWFs() : job.getApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()}, new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST}); new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
Integer overallRank = jobApplication.getOverallRank();
boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
boolean isVisible = CollectionUtils.equals(overallRank, 2) || CollectionUtils.equals(overallRank, 1);
jobApplication.setWorkFlow(workflow); jobApplication.setWorkFlow(workflow);
...@@ -101,13 +105,15 @@ ...@@ -101,13 +105,15 @@
<img src="images/arrow-left-prev.svg" /> <img src="images/arrow-left-prev.svg" />
</oneit:button> </oneit:button>
<div class="main-appli-name"> <div class="main-appli-name">
<div class="appli-name"><oneit:toString value="<%= candidate.getToString() %>" mode="EscapeHTML"/></div> <div class="appli-name"><oneit:toString value="<%= onTrial && !isVisible ? "" : candidate.getToString() %>" mode="EscapeHTML"/></div>
<div class="appli-applied"> <div class="appli-applied">
Applied <oneit:toString value="<%= jobApplication.getSubmittedDate() %>" mode="MidDate"/> Applied <oneit:toString value="<%= jobApplication.getSubmittedDate() %>" mode="MidDate"/>
</div> </div>
</div> </div>
<div class="main-export"> <div class="main-export">
<% <%
if((onTrial && isVisible) || !onTrial)
{
if(jobApplication.getCV() != null && jobApplication.getCoverLetter() != null) if(jobApplication.getCV() != null && jobApplication.getCoverLetter() != null)
{ {
%> %>
...@@ -124,6 +130,9 @@ ...@@ -124,6 +130,9 @@
<option>Excel</option> <option>Excel</option>
</select> </select>
</span> </span>
<%
}
%>
<span class="appli-status-short"> <span class="appli-status-short">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process" <tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process"
...@@ -445,9 +454,9 @@ ...@@ -445,9 +454,9 @@
String dotClass = cultureNarrative != null && cultureNarrative.getColorCode() != null ? cultureNarrative.getColorCode().getDotCSSClass() : ""; String dotClass = cultureNarrative != null && cultureNarrative.getColorCode() != null ? cultureNarrative.getColorCode().getDotCSSClass() : "";
%> %>
<div class="detail-tab-row" id="<%= ((CultureElement)tuple.get1()).getObjectID() %>"> <div class="detail-tab-row" id="<%= ((CultureElement)tuple.get1()).getObjectID() %>">
<div class="detail-tab-row-title col-md-4 col-sm-4 col-xs-4"> <div class="detail-tab-row-title col-md-4 col-sm-4 col-xs-4 culture-detail-row">
<span class="common-dot <%= dotClass %>"></span> &nbsp; <span class="common-dot <%= dotClass %> culture-dot"></span> &nbsp;
<oneit:toString value="<%= tuple.get1() %>" mode="EscapeHTML"/> <span class="culture-text"><oneit:toString value="<%= tuple.get1() %>" mode="EscapeHTML"/></span>
</div> </div>
<div class="detail-tab-row-text col-md-8 col-sm-8 col-xs-8"> <div class="detail-tab-row-text col-md-8 col-sm-8 col-xs-8">
<oneit:toString value="<%= cultureNarrative %>" mode="EscapeHTML"/> <oneit:toString value="<%= cultureNarrative %>" mode="EscapeHTML"/>
...@@ -585,23 +594,39 @@ ...@@ -585,23 +594,39 @@
<div class="contact-title">Contact</div> <div class="contact-title">Contact</div>
<div class="contact-row"> <div class="contact-row">
<div class="contact-label">E</div> <div class="contact-label">E</div>
<%
if((onTrial && isVisible) || !onTrial)
{
%>
<div class="contact-value"> <div class="contact-value">
<a href="<%= "mailto:" + candidate.getUser().getEmail() %>"> <a href="<%= "mailto:" + candidate.getUser().getEmail() %>">
<oneit:toString value="<%= candidate.getUser().getEmail() %>" mode="EscapeHTML" /> <oneit:toString value="<%= candidate.getUser().getEmail() %>" mode="EscapeHTML" />
</a> </a>
</div> </div>
<%
}
%>
</div> </div>
<div class="contact-row"> <div class="contact-row">
<div class="contact-label">P</div> <div class="contact-label">P</div>
<%
if((onTrial && isVisible) || !onTrial)
{
%>
<div class="contact-value"> <div class="contact-value">
<oneit:toString value="<%= candidate.getPhone() %>" mode="EscapeHTML" /> <oneit:toString value="<%= candidate.getPhone() %>" mode="EscapeHTML" />
</div> </div>
<%
}
%>
</div> </div>
<div class="contact-row" style="display:none;"> <div class="contact-row" style="display:none;">
<div class="contact-label"><img src="images/linkdin-icon.png" /></div> <div class="contact-label"><img src="images/linkdin-icon.png" /></div>
<div class="contact-value"><a href="#">View LinkedIn profile</a></div> <div class="contact-value"><a href="#">View LinkedIn profile</a></div>
</div> </div>
<% <%
if((onTrial && isVisible) || !onTrial)
{
if(jobApplication.getCV() != null) if(jobApplication.getCV() != null)
{ {
%> %>
...@@ -615,8 +640,7 @@ ...@@ -615,8 +640,7 @@
</div> </div>
<% <%
} }
%>
<%
if(jobApplication.getCoverLetter() != null) if(jobApplication.getCoverLetter() != null)
{ {
%> %>
...@@ -630,6 +654,7 @@ ...@@ -630,6 +654,7 @@
</div> </div>
<% <%
} }
}
%> %>
</div> </div>
<div class="applicant-location-info"> <div class="applicant-location-info">
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("CompanyUser", companyUser) .mapEntry("CompanyUser", companyUser)
.mapEntry("Skip", Boolean.FALSE) .mapEntry("Skip", Boolean.FALSE)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap())
.toMap() %>"/> .toMap() %>"/>
...@@ -89,6 +90,7 @@ ...@@ -89,6 +90,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("CompanyUser", companyUser) .mapEntry("CompanyUser", companyUser)
.mapEntry("Skip", Boolean.TRUE) .mapEntry("Skip", Boolean.TRUE)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap())
.toMap() %>"/> .toMap() %>"/>
</div> </div>
......
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
.toMap() %>" /> .toMap() %>" />
<% <%
if(billingTeam.getCardID() == null) if(!billingTeam.isTrue(billingTeam.getOnTrial()) && billingTeam.getCardID() == null)
{ {
%> %>
<oneit:button value="Open this Job" name="saveJob" cssClass="btn btn-primary btn-green top-margin-25 largeBtn" <oneit:button value="Open this Job" name="saveJob" cssClass="btn btn-primary btn-green top-margin-25 largeBtn"
......
...@@ -10,3 +10,4 @@ ...@@ -10,3 +10,4 @@
#agreeTerms = Please agree to the Terms & Conditions #agreeTerms = Please agree to the Terms & Conditions
#agreePrivacy = Please agree to the Privacy Policy #agreePrivacy = Please agree to the Privacy Policy
#atLeastOneOwner = There has to be at least one owner for team. #atLeastOneOwner = There has to be at least one owner for team.
#cannotOpenJob = Free Trial only allows you to open one job.
\ No newline at end of file
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
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 hasBillingSetup = hiringTeam.hasBillingSetup(); boolean hasBillingSetup = hiringTeam.hasBillingSetup();
boolean canCreateJob = hiringTeam.allowJobCreation(); boolean canCreateJob = hiringTeam.allowJobCreation();
boolean trialNotAllowed = hiringTeam.trialJobNotAllowed();
%> %>
...@@ -118,7 +119,7 @@ ...@@ -118,7 +119,7 @@
<div class="welcome-box"> <div class="welcome-box">
<div class="dashboard-welcome"> <div class="dashboard-welcome">
<div class="welcome-text"> Welcome <br/> <%= firstTime ? "" : "back"%> <oneit:toString value="<%= secUser.getFirstName()!=null ? secUser.getFirstName() : secUser.getUserName()%>" mode="EscapeHTML"/>!</div> <div class="welcome-text"> Welcome <br/> <%= firstTime ? "" : "back"%> <oneit:toString value="<%= secUser.getFirstName()!=null ? secUser.getFirstName() : secUser.getUserName()%>" mode="EscapeHTML"/>!</div>
<a class="d-create-job-btn <%= hasBillingSetup ? "" : "disabled"%>" href="<%= canCreateJob ? jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) : "javascript:void(0);" %>" onclick="<%= canCreateJob ? "" : "showReachedCap()"%>">Create a Job</a> <a class="d-create-job-btn <%= hasBillingSetup ? "" : "disabled"%>" href="<%= canCreateJob ? jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) : "javascript:void(0);" %>" onclick="<%= canCreateJob ? "" : trialNotAllowed ? "trialNotAllowed()" : "showReachedCap()"%>">Create a Job</a>
</div> </div>
<div class="col-sm-3 col-xs-12 d-three-box green-light"> <div class="col-sm-3 col-xs-12 d-three-box green-light">
<div class="d-fl-left eq-height"> <div class="d-fl-left eq-height">
...@@ -222,7 +223,7 @@ ...@@ -222,7 +223,7 @@
</div> </div>
</oneit:form> </oneit:form>
<% <%
if(billingTeam.getCardID() == null) if(!billingTeam.isTrue(billingTeam.getOnTrial()) && billingTeam.getCardID() == null)
{ {
%> %>
<oneit:form name="setupBilling" method="post" enctype="multipart/form-data"> <oneit:form name="setupBilling" method="post" enctype="multipart/form-data">
...@@ -259,7 +260,7 @@ ...@@ -259,7 +260,7 @@
<% <%
} }
else if(billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getStripeSubscription() == null)) else if(!billingTeam.isTrue(billingTeam.getOnTrial()) && (billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getStripeSubscription() == null)))
{ {
%> %>
......
<?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="on_trial" 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="trial_job_count" type="Long" 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="ppj_credits" type="Long" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
...@@ -28,6 +28,14 @@ ...@@ -28,6 +28,14 @@
<INHERITS factory="Named" nodename="CoreORMAdmin"/> <INHERITS factory="Named" nodename="CoreORMAdmin"/>
</NODE> </NODE>
<NODE name="editNotificationTemplate_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
</NODE>
<NODE name="listNotificationTemplates_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
</NODE>
<NODE name="test_imap_jsp" factory="Participant"> <NODE name="test_imap_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/> <INHERITS factory="Named" nodename="CoreORMAdmin"/>
<FORM name="*.runEmailFetcher" factory="Participant" class="performa.form.RunEmailFetcherFP"/> <FORM name="*.runEmailFetcher" factory="Participant" class="performa.form.RunEmailFetcherFP"/>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
link="/extensions/performa/testAnalysis.jsp"/> --> link="/extensions/performa/testAnalysis.jsp"/> -->
<CHILD name="Performa.SetupPlans" desc="Setup Plans" sortOrder="10" toplevel="ADMIN" priv="admin" link="/extensions/performa/setupPlans.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" /> <CHILD name="Performa.SetupPlans" desc="Setup Plans" sortOrder="10" toplevel="ADMIN" priv="admin" link="/extensions/performa/setupPlans.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.MessageTemplate" desc="Message Template" sortOrder="20" toplevel="ADMIN" priv="admin" link="/extensions/performa/listMessageTemplate.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" /> <CHILD name="Performa.MessageTemplate" desc="Message Template" sortOrder="20" toplevel="ADMIN" priv="admin" link="/extensions/performa/listMessageTemplate.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.NotificationTemplate" desc="Notification Template" sortOrder="30" toplevel="ADMIN" priv="admin" link="/extensions/performa/listNotificationTemplates.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
</NODE> </NODE>
</NODE> </NODE>
......
...@@ -18,11 +18,6 @@ ...@@ -18,11 +18,6 @@
%><%@include file="/saferedirect.jsp"%><% %><%@include file="/saferedirect.jsp"%><%
} }
if (toRedirect)
{
%><%@include file="/saferedirect.jsp"%><%
}
Debug.assertion(messageTemplate != null, "MessageTemplate is null in Edit Message Template", "404"); Debug.assertion(messageTemplate != null, "MessageTemplate is null in Edit Message Template", "404");
String continuePage = "editMessageTemplate.jsp?MessageTemplateID=" + messageTemplate.getObjectID(); String continuePage = "editMessageTemplate.jsp?MessageTemplateID=" + messageTemplate.getObjectID();
......
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="inc/stdimports.jsp" %>
<%@ include file="/editor/stdimports.jsp" %>
<%@ page import="oneit.business.content.editor.gui.*" %>
<%! protected String getName (ServletConfig config) { return "editNotificationTemplate_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "NotificationTemplate", NotificationTemplate.REFERENCE_NotificationTemplate);
NotificationTemplate notificationTemplate = (NotificationTemplate) process.getAttribute("NotificationTemplate");
if (toRedirect)
{
%><%@include file="/saferedirect.jsp"%><%
}
Debug.assertion(notificationTemplate != null, "NotificationTemplate is null in Edit Notification Template", "404");
String continuePage = "editNotificationTemplate.jsp?NotificationTemplateID=" + notificationTemplate.getObjectID();
request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "NotificationTemplate").mapEntry("enctype", "multipart/form-data").toMap());
request.setAttribute("oneit.pageHeaderTitle", "Notification Template");
%>
<%@include file="/editor/header.jsp" %>
<oneit:layout_total widths="<%= new double[] {2, 6, 4} %>" skin="bootstrap">
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1">
<oneit:ormlabel obj="<%= notificationTemplate %>" field="DaysAfter"/>
</oneit:layout_label>
<oneit:layout_field width="1">
<oneit:ormInput obj="<%= notificationTemplate %>" attributeName="DaysAfter"/>
</oneit:layout_field>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1">
<oneit:ormlabel obj="<%= notificationTemplate %>" field="NotificationContent"/>
</oneit:layout_label>
<oneit:layout_field width="1">
<tagfile:htmleditor obj="<%= notificationTemplate %>" attribName="NotificationContent" id="texteditor"
toolbarSet="<%= EditorGUIOptions.Default %>"/>
</oneit:layout_field>
</oneit:skin>
</oneit:layout_total>
<div class="bottomButtons" hidden="true">
<oneit:button value="Save" name="save" cssClass="BUTTON_PRIMARY"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "listNotificationTemplates.jsp").toMap() %>"/>
<oneit:button value="Cancel" name="cancel" cssClass="BUTTON_SECONDARY" showIfReadOnly="true"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "listNotificationTemplates.jsp")
.mapEntry (UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>"/>
</div>
<%@include file="/editor/footer.jsp" %>
\ No newline at end of file
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="inc/stdimports.jsp" %>
<%@ include file="/editor/stdimports.jsp" %>
<%@ page import="oneit.utils.filter.CollectionFilter"%>
<%! protected String getName (ServletConfig config) { return "listNotificationTemplates_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
NotificationTemplate[] notificationTemplates = NotificationTemplate.SearchByAll().search(objTran);
process.setAttribute ("NotificationTemplates", notificationTemplates);
request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "listNotificationTemplate").mapEntry("enctype", "multipart/form-data").toMap());
request.setAttribute("oneit.pageHeaderTitle", "List Notification Template");
%>
<%@include file="/editor/header.jsp" %>
<style>
.tbl-width{width:50%}
</style>
<%
if (notificationTemplates != null && notificationTemplates.length > 0)
{
List<NotificationTemplate> closedJob = (List<NotificationTemplate>) CollectionFilter.filter(Arrays.asList(notificationTemplates), NotificationTemplate.SearchByAll().andNotificationType(new EqualsFilter<>(NotificationType.CLOSED_JOB)));
if(closedJob != null && !closedJob.isEmpty())
{
%>
<oneit:skin tagName="layout_fieldset" legend="Closed Job Notification Settings">
<oneit:skin tagName="layout_search_results">
<oneit:table name="NotificationTemplateTable" sortable="true" cssClass="cougartable tbl-width" notgrid="true">
<oneit:colheader label="Days After" width="16" />
<oneit:colheader label="Notification Content" width="80" />
<oneit:colheader label="" width="4" cssClass="nosort nofilter" />
<%
for (NotificationTemplate notTemp : closedJob)
{
%>
<oneit:row rowObj="<%= notTemp %>">
<oneit:col><oneit:toString value="<%= notTemp.getDaysAfter() %>" mode="Integer" /></oneit:col>
<oneit:col><oneit:toString value="<%= notTemp.getNotificationContent() %>" mode="TidyHTML" /></oneit:col>
<oneit:col><a class="data-link " href="editNotificationTemplate.jsp?NotificationTemplateID=<%= notTemp.getObjectID() %>">>></a></oneit:col>
</oneit:row>
<%
}
%>
</oneit:table>
</oneit:skin>
</oneit:skin>
<%
}
List<NotificationTemplate> trial = (List<NotificationTemplate>) CollectionFilter.filter(Arrays.asList(notificationTemplates), NotificationTemplate.SearchByAll().andNotificationType(new EqualsFilter<>(NotificationType.TRIAL)));
if(trial != null && !trial.isEmpty())
{
%>
<oneit:skin tagName="layout_fieldset" legend="Trial Notification Settings">
<oneit:skin tagName="layout_search_results">
<oneit:table name="NotificationTemplateTable" sortable="true" cssClass="cougartable tbl-width" notgrid="true">
<oneit:colheader label="Days After" width="16" />
<oneit:colheader label="Notification Content" width="80" />
<oneit:colheader label="" width="4" cssClass="nosort nofilter" />
<%
for (NotificationTemplate notTemp : trial)
{
%>
<oneit:row rowObj="<%= notTemp %>">
<oneit:col><oneit:toString value="<%= notTemp.getDaysAfter() %>" mode="Integer" /></oneit:col>
<oneit:col><oneit:toString value="<%= notTemp.getNotificationContent() %>" mode="TidyHTML" /></oneit:col>
<oneit:col><a class="data-link " href="editNotificationTemplate.jsp?NotificationTemplateID=<%= notTemp.getObjectID() %>">>></a></oneit:col>
</oneit:row>
<%
}
%>
</oneit:table>
<oneit:button value="Add Trial Notification Template" cssClass="btn-primary" name="gotoPage"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "editNotificationTemplate.jsp")
.mapEntry("ignoreProcess", Boolean.TRUE)
.toMap() %>" />
</oneit:skin>
</oneit:skin>
<%
}
}
%>
<%@include file="/editor/footer.jsp" %>
\ 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.DefineTableOperation">
<tableName factory="String">tl_notification_template</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="notification_type" type="String" nullable="false" length="200"/>
<column name="days_after" type="Long" nullable="false"/>
<column name="notification_content" type="CLOB" nullable="false"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0"?>
<!-- @AutoRun -->
<OBJECTS name="">
<NODE name="Script" factory="Vector">
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_notification_template</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='notification_type' factory='String'>CLOSED_JOB</value>
<value name='days_after' factory='Integer'>14</value>
<value name='notification_content' factory='String'>Please shortlist job applications</value>
</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