Commit 30518306 by Harsh Shah

Finish Feature-Phase-3.2

parents 040a5d22 5d463d85
<?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_note</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="comment" type="String" nullable="false" length="1000"/>
<column name="created_user_id" type="Long" length="11" nullable="false"/>
<column name="job_application_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_note" indexName="idx_tl_note_job_application_id" isUnique="false"><column name="job_application_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -11,6 +11,8 @@
<column name="code" type="String" nullable="false" length="4"/>
<column name="name" type="String" nullable="false" length="250"/>
<column name="level" type="String" nullable="false" length="200"/>
<column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="assessment_level_id" type="Long" length="11" nullable="true"/>
<column name="parent_occupation_id" type="Long" length="11" nullable="true"/>
</NODE>
......
-- DROP TABLE tl_note;
CREATE TABLE tl_note (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
comment varchar(1000) NOT NULL,
created_user_id numeric(12) NOT NULL,
job_application_id numeric(12) NOT NULL
);
ALTER TABLE tl_note ADD
CONSTRAINT PK_tl_note PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_note_job_application_id
ON tl_note (job_application_id);
......@@ -11,6 +11,8 @@ CREATE TABLE tl_occupation (
code varchar(4) NOT NULL,
name varchar(250) NOT NULL,
level varchar(200) NOT NULL,
assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL
);
......
-- DROP TABLE tl_note;
CREATE TABLE tl_note (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
comment varchar2(1000) NOT NULL,
created_user_id number(12) NOT NULL,
job_application_id number(12) NOT NULL
);
ALTER TABLE tl_note ADD
CONSTRAINT PK_tl_note PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_note_job_application_id
ON tl_note (job_application_id);
......@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation (
code varchar2(4) NOT NULL,
name varchar2(250) NOT NULL,
level varchar2(200) NOT NULL,
assessment_type varchar2(200) NULL,
assessment_level_id number(12) NULL,
parent_occupation_id number(12) NULL
);
......
-- @AutoRun
-- drop table tl_note;
CREATE TABLE tl_note (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
comment varchar(1000) NOT NULL,
created_user_id numeric(12) NOT NULL,
job_application_id numeric(12) NOT NULL
);
ALTER TABLE tl_note ADD
CONSTRAINT pk_tl_note PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_note_job_application_id
ON tl_note (job_application_id);
......@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation (
code varchar(4) NOT NULL,
name varchar(250) NOT NULL,
level varchar(200) NOT NULL,
assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL
);
......
package performa.form;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.security.SecUser;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.utils.MultiException;
import performa.orm.CompanyUser;
import performa.orm.JobApplication;
import performa.orm.Note;
public class AddNoteFP extends SaveFP
{
private static final LoggingArea LOG = LoggingArea.createLoggingArea("AddNoteFP");
@Override
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
BusinessObjectParser.assertFieldCondition(jobApplication.getNote()!= null, jobApplication, JobApplication.FIELD_Note, "mandatory", exceptions, true, request);
super.validate(process, submission, exceptions, params);
}
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
ObjectTransaction objTran = process.getTransaction();
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
LogMgr.log(LOG, LogLevel.PROCESSING1, "Adding note to job application : ", jobApplication);
Note note = Note.createNote(objTran);
SecUser secUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
note.setComment(jobApplication.getNote());
note.setCreatedUser(companyUser);
note.setJobApplication(jobApplication);
LogMgr.log(LOG, LogLevel.PROCESSING1, "New note added : ", note);
return super.processForm(process, submission, params);
}
}
\ No newline at end of file
......@@ -2,7 +2,6 @@ package performa.form;
import com.stripe.Stripe;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.objstore.StorageException;
......
package performa.form;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.StorageException;
import oneit.security.SecUser;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.utils.DateDiff;
import oneit.utils.math.NullArith;
import performa.orm.CompanyUser;
import performa.orm.HiringTeam;
import performa.orm.Job;
import performa.utils.StripeUtils;
public class ExtendJobFP extends SaveFP
{
private static final LoggingArea LOG = LoggingArea.createLoggingArea("ExtendJobFP");
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
SecUser secUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Start of Extend job : ", job);
job.setApplyBy(DateDiff.add(job.getApplyBy(), Calendar.DATE, 30));
job.setLastEdited(new Date());
if (billingTeam.canCreateJob())
{
billingTeam.setUsedCredits(NullArith.add(billingTeam.getUsedCredits(), 1).intValue());
if(billingTeam.getUsedCredits() > billingTeam.getAvailableCredits())
{
StripeUtils.recordUsage(billingTeam);
}
}
else if(billingTeam.getIsPPJ())
{
StripeUtils.makePayment(hiringTeam, job);
}
LogMgr.log(LOG, LogLevel.PROCESSING1, "Job Extended. Apply by date : ", job.getApplyBy());
return super.processForm(process, submission, params);
}
}
\ No newline at end of file
......@@ -27,6 +27,11 @@ public class NavigateToCreateJobFP extends ORMProcessFormProcessor
if(job != null && job.isTrue(job.getFromTemplate()))
{
if(job.getHiringTeam().showHasClientSupport())
{
BusinessObjectParser.assertFieldCondition(job.getClient() != null , job, Job.SINGLEREFERENCE_Client, "mandatory", exceptions, true, request);
}
BusinessObjectParser.assertFieldCondition(job.getAssessmentTemplate() != null , job, Job.SINGLEREFERENCE_AssessmentTemplate, "mandatory", exceptions, true, request);
}
......
......@@ -24,7 +24,11 @@ public class ProcessCultureFP extends SaveFP
if(job.getOccupationId() != null)
{
job.setOccupation(Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId())));
Occupation occupation = Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()));
job.setOccupation(occupation);
job.setLevel(occupation.getAssessmentLevel());
job.setAssessmentType(occupation.getAssessmentType());
}
return new ProcessRedirectResult((String) submission.getRequest().getAttribute("nextPage"), new String[0]);
......@@ -52,12 +56,12 @@ public class ProcessCultureFP extends SaveFP
BusinessObjectParser.assertFieldCondition(job.getOccupation() != null, job , Job.SINGLEREFERENCE_Occupation, "mandatory", exceptions, true, request);
}
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);
}
// 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(fromCulture)
......
......@@ -83,7 +83,11 @@ public class SaveJobFP extends SaveFP
if(job.getOccupationId() != null)
{
job.setOccupation(Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId())));
Occupation occupation = Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()));
job.setOccupation(occupation);
job.setLevel(occupation.getAssessmentLevel());
job.setAssessmentType(occupation.getAssessmentType());
}
// restarting process as custom attributes needs to be updated to intercom
......@@ -106,20 +110,19 @@ public class SaveJobFP extends SaveFP
{
HttpServletRequest request = submission.getRequest();
Job job = process.getAttribute("Job") != null ? (Job) process.getAttribute("Job") : (Job) request.getAttribute("Job");
Boolean openJob = (Boolean) request.getAttribute("openJob");
JobStatus status = (JobStatus) request.getAttribute("JobStatus");
HiringTeam hiringTeam = job.getHiringTeam();
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(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)
{
......
......@@ -71,6 +71,10 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
newTemplate.addToWorkFlows(workflowCopy);
}
newTemplate.setIncludeAssessmentCriteria(job.getIncludeAssessmentCriteria());
if(job.getIncludeAssessmentCriteria())
{
for (AssessmentCriteria criteria : job.getAssessmentCriteriasSet())
{
AssessmentCriteria criteriaCopy = AssessmentCriteria.createAssessmentCriteria(newObjTran);
......@@ -79,6 +83,7 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
newTemplate.addToAssessmentCriterias(criteriaCopy);
}
}
});
job.setAssessmentTemplateName(null);
......
......@@ -1159,7 +1159,7 @@ public abstract class BaseJob extends BaseBusinessClass
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "require_cv");
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("defaultValue", "Boolean.TRUE");
metaInfo.put ("name", "RequireCV");
metaInfo.put ("type", "Boolean");
......@@ -1348,7 +1348,7 @@ public abstract class BaseJob extends BaseBusinessClass
_ExpectedCandidateRadius = (LocationRadius)(LocationRadius.KM100);
_State = (State)(State.WA);
_Country = (Countries)(Countries.AU);
_RequireCV = (Boolean)(Boolean.FALSE);
_RequireCV = (Boolean)(Boolean.TRUE);
_IsManuallyClosed = (Boolean)(Boolean.FALSE);
_LastEdited = (Date)(HELPER_LastEdited.initialise (_LastEdited));
_IsPPJ = (Boolean)(Boolean.FALSE);
......
......@@ -313,10 +313,19 @@ public class Job extends BaseJob
{
CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser);
return AssessmentCriteriaTemplate.SearchByAll()
AssessmentCriteriaTemplate.SearchAll search = AssessmentCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(getHiringTeam()))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(getTransaction());
.andCompanyUser(new EqualsFilter<>(companyUser));
if(getHiringTeam().showHasClientSupport() && getClient() != null)
{
search = search.andClient(new EqualsFilter<>(getClient()));
}
else
{
search = search.andClient(new IsNullFilter<>());
}
return search.search(getTransaction());
}
......@@ -324,10 +333,20 @@ public class Job extends BaseJob
{
CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser);
return CultureCriteriaTemplate.SearchByAll()
CultureCriteriaTemplate.SearchAll search = CultureCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(getHiringTeam()))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(getTransaction());
.andCompanyUser(new EqualsFilter<>(companyUser));
if(getHiringTeam().showHasClientSupport() && getClient() != null)
{
search = search.andClient(new EqualsFilter<>(getClient()));
}
else
{
search = search.andClient(new IsNullFilter<>());
}
return search.search(getTransaction());
}
......@@ -686,10 +705,13 @@ public class Job extends BaseJob
return filteredList;
}
// templates disabled for sprint 1
@Override
public FieldWriteability getWriteability_JobTemplate()
public String getTemplateClass(boolean isTeamplate)
{
return FieldWriteability.NOT_IN_GUI;
StringBuilder sb = new StringBuilder("create-job-selector rectangle-4");
sb.append(getHiringTeam().showHasClientSupport() ? " special" : "");
sb.append((isTeamplate && isTrue(getFromTemplate())) || (!isTeamplate && isFalse(getFromTemplate())) ? " checked" : "");
return sb.toString();
}
}
\ No newline at end of file
......@@ -50,7 +50,7 @@
<ATTRIB name="ExpectedCandidateRadius" type="LocationRadius" dbcol="location_radius" defaultValue="LocationRadius.KM100" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="State" type="State" dbcol="state" defaultValue="State.WA" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Country" type="Countries" dbcol="country" defaultValue="Countries.AU" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="RequireCV" type="Boolean" dbcol="require_cv" defaultValue="Boolean.FALSE"/>
<ATTRIB name="RequireCV" type="Boolean" dbcol="require_cv" defaultValue="Boolean.TRUE"/>
<ATTRIB name="IsManuallyClosed" type="Boolean" dbcol="manually_closed" defaultValue="Boolean.FALSE"/>
<ATTRIB name="LastEdited" type="Date" dbcol="last_edited" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.FALSE"/>
......
......@@ -6,6 +6,7 @@
<IMPORT value="performa.orm.types.*"/>
<MULTIPLEREFERENCE name="AssessmentCriteriaAnswers" type="AssessmentCriteriaAnswer" backreferenceName="JobApplication" />
<MULTIPLEREFERENCE name="Notes" type="Note" backreferenceName="JobApplication" />
<TRANSIENT name="AppProcessOption" type="AppProcessOption" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="OverallRank" type="Integer" />
......@@ -13,6 +14,7 @@
<TRANSIENT name="RequirementFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="CultureFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="FactorScoreDetails" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="Note" type="String" />
<TRANSIENTSINGLE name="WorkFlow" type="WorkFlow" />
......
package performa.orm;
public class Note extends BaseNote
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public Note ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
\ No newline at end of file
<?xml version="1.0"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="Note" package="performa.orm">
<IMPORT value="oneit.security.*"/>
<TABLE name="tl_note" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Comment" type="String" dbcol="comment" length="1000" mandatory="true"/>
<SINGLEREFERENCE name="CreatedUser" type="CompanyUser" dbcol="created_user_id" mandatory="true" />
<SINGLEREFERENCE name="JobApplication" type="JobApplication" dbcol="job_application_id" mandatory="true" backreferenceName="Notes"/>
</TABLE>
<SEARCH type="All" paramFilter="object_id is not null"/>
</BUSINESSCLASS>
</ROOT>
......@@ -12,7 +12,9 @@
<ATTRIB name="Code" type="String" dbcol="code" length="4" mandatory="true" isUnique="true"/>
<ATTRIB name="Name" type="String" dbcol="name" length="250" mandatory="true"/>
<ATTRIB name="Level" type="OccupationLevel" dbcol="level" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" />
<SINGLEREFERENCE name="AssessmentLevel" type="Level" dbcol="assessment_level_id" />
<SINGLEREFERENCE name="ParentOccupation" type="Occupation" dbcol="parent_occupation_id" backreferenceName="ChildOccupations"/>
</TABLE>
......
......@@ -30,12 +30,14 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
private String dummyCode;
private String dummyName;
private OccupationLevel dummyLevel;
private AssessmentType dummyAssessmentType;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_Level = new EnumeratedAttributeHelper (OccupationLevel.FACTORY_OccupationLevel);
private static final EnumeratedAttributeHelper HELPER_AssessmentType = new EnumeratedAttributeHelper (AssessmentType.FACTORY_AssessmentType);
......@@ -45,10 +47,11 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
dummyCode = (String)(HELPER_Code.initialise (dummyCode));
dummyName = (String)(HELPER_Name.initialise (dummyName));
dummyLevel = (OccupationLevel)(HELPER_Level.initialise (dummyLevel));
dummyAssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (dummyAssessmentType));
}
private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.assessment_type, {PREFIX}tl_occupation.assessment_level_id, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -102,6 +105,8 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Code)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Name)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Level)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_AssessmentType)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ParentOccupation))
{
// We will need to retrieve it
......@@ -182,10 +187,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_occupation " +
"SET code = ?, name = ?, level = ?, parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET code = ?, name = ?, level = ?, assessment_type = ?, assessment_level_id = ? , parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_occupation.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -444,7 +449,9 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
tl_occupationPSet.setAttrib(Occupation.FIELD_Code, HELPER_Code.getFromRS(dummyCode, r, "code"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Name, HELPER_Name.getFromRS(dummyName, r, "name"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Level, HELPER_Level.getFromRS(dummyLevel, r, "level"));
tl_occupationPSet.setAttrib(Occupation.FIELD_AssessmentType, HELPER_AssessmentType.getFromRS(dummyAssessmentType, r, "assessment_type"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel, r.getObject ("assessment_level_id"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ParentOccupation, r.getObject ("parent_occupation_id"));
}
......@@ -462,10 +469,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_occupation " +
" (code, name, level, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (code, name, level, assessment_type, assessment_level_id, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray());
tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -3695,7 +3695,7 @@ span.appli-progress-bar {
margin-bottom: 10px;
text-align: left;
}
input.add-note-btn {
button.add-note-btn {
display: inline-block;
height: 30px;
border-radius: 100px;
......@@ -3710,7 +3710,7 @@ input.add-note-btn {
padding: 0;
width: 100px;
}
input.add-note-btn:hover{
button.add-note-btn:hover{
background-color: #434c58;
}
.note-txt-box {
......@@ -6073,9 +6073,12 @@ label, label .label-title span {
.job-template-left.job-template-cl4 {
width: 25%;
}
.job-template-left.job-template-cl1.culture {
.job-template-left.job-template-cl1.culture, .job-template-left.job-template-cl1.no-client {
width: 49%;
}
.job-template-left.job-template-cl1.culture.no-client{
width: 75%;
}
.job-template-left.job-template-cl4 .m-user-right-padlock {
float: right;
padding: 17px 0;
......@@ -7642,3 +7645,83 @@ input{
margin-bottom: 40px;
padding-left: 10px;
}
/*
Start of CV Cover Letter Popup
*/
.cv-cover-letter{
border: 1px solid #E5E8EB;
border-radius: 2px;
background-color: #FFFFFF;
padding: 14px 18px;
color: #4E5258;
font-size: 12px;
}
.cv-cover-letter img{
height: 18px;
padding-right: 18px;
}
.cv-popup{
border-radius: 4px;
background-color: #ffffff;
box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.2);
/*border: 1px solid #e8e8eb;*/
width: 65%;
height:1000px;
margin: 0 auto;
text-align: center;
padding: 0;
margin-top: 150px;
}
.cv-popup .nav-tabs{
background: #4E5258;
}
.cv-popup .nav-tabs>li.active>a{
color: #4A4A4A;
opacity: 1;
}
.cv-popup .nav-tabs>li>a{
color: #FFFFFF;
opacity: 0.5;
font-size: 20px;
line-height: 30px;
text-align: center;
}
.cv-popup .nav-tabs>li>a:focus, .cv-popup .nav-tabs>li>a:hover{
color: #4A4A4A;
}
.cv-popup .nav-tabs>li.active>a, .cv-popup .nav-tabs>li.active>a:focus, .cv-popup .nav-tabs>li.active>a:hover{
background: #F5F7F8;
}
.cv-popup .tab-pane{
background: #F5F7F8;
}
.cv-popup button.close{
color: #F5F7F8;
padding: 10px 20px;
opacity: 1;
}
.cv-popup .no-preview{
padding-top: 100px;
}
.cv-popup .download-btn{
border: 1px solid #E5E8EB;
border-radius: 2px;
background-color: #4E5258;
padding: 14px 18px;
color: #FFFFFF;
font-size: 18px;
margin-top: 20px;
}
.cv-popup .download-btn img{
height: 30px;
padding-right: 18px;
}
.modal-dialog.cv{
width:100%;
}
/*
End of CV Cover Letter Popup
*/
......@@ -34,6 +34,8 @@
<FORM name="*.loadRequirementsFromTemplate" factory="Participant" class="performa.form.LoadRequirementsFromTemplateFP"/>
<FORM name="*.loadCultureFromTemplate" factory="Participant" class="performa.form.LoadCultureFromTemplateFP"/>
<FORM name="*.changeApplicationStatus" factory="Participant" class="performa.form.ChangeApplicationStatusFP"/>
<FORM name="*.addNote" factory="Participant" class="performa.form.AddNoteFP"/>
<FORM name="*.extendJob" factory="Participant" class="performa.form.ExtendJobFP"/>
<FORM name="*.bulkupdate" factory="Participant" class="performa.form.BulkUpdateFP"/>
<FORM name="*.navigateBetweenStatus" factory="Participant" class="performa.form.NavigateBetweenStatusFP"/>
<FORM name="*.sendCompanyUserInvites" factory="Participant" class="performa.form.SendCompanyUserInvitesFP">
......
......@@ -158,6 +158,7 @@
<%
}
%>
</oneit:recalcClass>
<div class="form-group">
<div class="styled_checkboxes">
......@@ -184,7 +185,6 @@
</span>
</div>
</oneit:recalcClass>
</oneit:recalcClass>
<div class="text-center">
<oneit:button value="Save as draft" name="saveJob" cssClass="btn btn-primary top-margin-25 largeBtn greyBtn"
......
......@@ -21,18 +21,11 @@
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
CultureCriteriaTemplate[] templates = (CultureCriteriaTemplate[]) process.getAttribute("CultureCriteriaTemplates");
if(templates == null)
{
templates = CultureCriteriaTemplate.SearchByAll()
CultureCriteriaTemplate[] templates = CultureCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(hiringTeam))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(transaction);
process.setAttribute("CultureCriteriaTemplates", templates);
}
// handle client
if( parameterMap.containsKey("Client"))
{
......@@ -94,17 +87,24 @@
%>
<div class="template-list" id="<%= template.getID() %>">
<div class="template-row">
<div class="job-template-left job-template-cl1 culture">
<div class="job-template-left job-template-cl1 culture <%= hiringTeam.showHasClientSupport() ? "" : "no-client"%>">
<div class="template-name heading">
<oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" />
</div>
</div>
<%
if(hiringTeam.showHasClientSupport())
{
%>
<div class="job-template-left job-template-cl2">
<span class="grey-span">CLIENT</span>
<div class="template-name">
<oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" />
</div>
</div>
<%
}
%>
<div class="job-template-left job-template-cl4">
<span class="grey-span">LAST UPDATED</span>
<div class="template-name">
......
......@@ -12,6 +12,15 @@
Debug.assertion(template != null && !toRedirect, "Invalid template in culture templates");
SecUser secUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
if(hiringTeam != template.getHiringTeam())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
template.pipelineCultureCriteriaTemplate().toCultureCriterias().toCultureElement().toRatings().uniqueVals(); //preloading data
%>
<script type="text/javascript">
......
......@@ -13,9 +13,23 @@
Debug.assertion(template != null && !toRedirect, "Invalid template in job templates");
SecUser secUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
if(hiringTeam != template.getHiringTeam())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
%>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<script type="text/javascript">
var lastclickedOccid = 0 , lastclickedOcc = "" ;
var lastclickedOccid = 0 , lastclickedOcc = "" , levelClicked = "";
var occPopup;
var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null };
var scrolldiv = null ;
......@@ -152,9 +166,17 @@
lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ');
levelClicked = thisEle.data('level');
if(levelClicked === "fourth"){
$('.btn-save-occ').removeAttr('disabled');
$(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid);
} else {
$(".select-occupation").val("");
$("#select-occupation-id").val(0);
$('.btn-save-occ').attr('disabled', 'disabled');
}
thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked");
......@@ -369,64 +391,6 @@
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Select your assessment type</label>
</div>
</div>
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String assessmentTypeKey = WebUtils.getInputKey(request, template, AssessmentCriteriaTemplate.FIELD_AssessmentType);
String assessmentTypeValue = formBuilder.fieldValue (assessmentTypeKey, template.getAssessmentType() == null ? "" : template.getAssessmentType().getName());
for(AssessmentType assessmentType : AssessmentType.getAssessmentTypeArray())
{
String assessmentTypeId = assessmentType.getName();
String selectedStr = CollectionUtils.equals(assessmentTypeValue, assessmentTypeId) ? "checked" : "";
String levelKey = WebUtils.getRadioSingleAssocKey(request, template, AssessmentCriteriaTemplate.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, template.getLevel() == null ? "" : String.valueOf(template.getLevelID()));
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" class="type_radio" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<span class="label-title"><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></span>
<oneit:toString value="<%= assessmentType.getQuestionDetails() %>" mode="EscapeHTML"/><br />
</label>
</div>
<oneit:recalcClass htmlTag="div" classScript="template.getAssessmentType() == assessmentType ? 'main-pack-type' : '' " template="<%= template %>" assessmentType="<%= assessmentType %>">
<ul>
<%
for(Level level : Level.getAllLevelsforAssessmentType(transaction, assessmentType))
{
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
%>
<oneit:recalcClass htmlTag="li" classScript="template.getLevelClass(level)" template="<%= template %>" level="<%= level %>">
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= level %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= level.getCSSClass() %>"></span>
</label>
</a>
</oneit:recalcClass>
<%
}
%>
</ul>
</oneit:recalcClass>
<div class="clearfix"></div>
<%
}
String levelKey = WebUtils.getRadioSingleAssocKey(request, template, AssessmentCriteriaTemplate.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, template.getLevel() == null ? "" : String.valueOf(template.getLevelID()));
%>
</div>
<div class="form-page-section darkbg">
<div class="form-group row">
......@@ -521,28 +485,28 @@
for (Occupation firstLevel : firstLevelOccupations)
{
%>
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>">
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>" data-level="first">
<span> <%= firstLevel%> </span>
<ul class="level1">
<%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>">
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>" data-level="second">
<span> <%= secondLevel%></span>
<ul class="level2">
<%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>">
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>" data-level="third">
<span> <%= thirdLevel%></span>
<ul class="level3">
<%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>">
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>" data-level="fourth">
<span> <%= fourthLevel%></span>
</li>
<%
......@@ -575,7 +539,7 @@
Select the most appropriate Category to help narrow down your Occupation
</div>
<div class="occupation_select_button">
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button>
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn btn-save-occ" style="" disabled>Save Job Occupation</button>
</div>
</div>
......
......@@ -10,6 +10,7 @@
CompanyUser companyUser = clientUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
User intercomUser = (User)session.getAttribute("IntercomUser");
HiringTeam selectedTeam = (HiringTeam) session.getAttribute("SelectedHiringTeam");
String gtmKey = oneit.appservices.config.ConfigMgr.getKeyfileString("gtm.key","GTM-M6M4SW6");
if(selectedTeam != null && companyUser != null)
{
......@@ -47,7 +48,7 @@
}];
</script>
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-WFZ4NVT');
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','<%= gtmKey %>');
</script>
<!-- End Google Tag Manager -->
</head>
......@@ -85,7 +86,7 @@
</script>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WFZ4NVT" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<%= gtmKey %>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<%
boolean isMobile = BrowserServices.isMobile(request);
......
......@@ -8,16 +8,19 @@
<%@include file="/inc/std_imports.jsp" %>
<%@include file="/heapAnalysis.jsp" %>
<%
String gtmKey = oneit.appservices.config.ConfigMgr.getKeyfileString("gtm.key","GTM-M6M4SW6");
%>
<!-- Google Tag Manager -->
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-WFZ4NVT');
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','<%= gtmKey %>');
</script>
<!-- End Google Tag Manager -->
</head>
<body class="bg-color">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WFZ4NVT" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<%= gtmKey %>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="container">
<div class="row">
......
......@@ -88,6 +88,10 @@
$('.save-application').click();
});
});
function previewCV(){
$('#pdfPreview').modal('show');
}
</script>
<div class="main-applicant-content dashboard-content-area v-applicant-area ">
<div class="applicant-header">
......@@ -103,6 +107,16 @@
</div>
</div>
<div class="main-export">
<%
if(jobApplication.getCV() != null && jobApplication.getCoverLetter() != null)
{
%>
<a href="#" class="btn cv-cover-letter" onclick="previewCV()">
<img src="images/icon-paper-clip.png" />CV & Cover Letter
</a>
<%
}
%>
<span class="export-candidate" style="display: none;">
<select class="form-control">
<option>Export Candidate Report</option>
......@@ -648,27 +662,88 @@
}
%>
</div>
<%--
<div class="applicant-note" >
<div class="applicant-note-title">Notes</div>
<div class="note-txt-box">
<textarea class="form-control"></textarea>
<input type="button" class="add-note-btn" value="ADD NOTE" />
<oneit:ormtextarea obj="<%= jobApplication %>" attributeName="Note" cssClass="form-control"/>
<oneit:button name="addNote" value="ADD NOTE" cssClass="add-note-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).mapEntry("Job", job).toMap())
.mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "JobApplication", "Applications"})))
.mapEntry("JobApplication", jobApplication)
.toMap() %>" />
</div>
</div>
<div class="admin-notes">
<div class="admin-name">Admin name</div>
<div class="date-value">TODAY</div>
<div class="admin-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent accumsan interdum nisi, sed laoreet dui rhoncus.</div>
<%
for (Note note : jobApplication.getNotesSet())
{
%>
<div class="admin-name"><oneit:toString value="<%= note.getCreatedUser() %>" mode="EscapeHTML"/></div>
<div class="date-value"><oneit:toString value="<%= note.getObjectCreated() %>" mode="MidDate"/></div>
<div class="admin-text"><oneit:toString value="<%= note.getComment() %>" mode="EscapeHTML"/></div>
<div class="admin-br-line"></div>
<div class="admin-name">Admin name</div>
<div class="date-value">2 days ago</div>
<div class="admin-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
<%
}
%>
</div>
--%>
</div>
</div>
</div>
</div>
<div class="modal fade" id="pdfPreview" role="dialog">
<div class="modal-dialog cv">
<div class="modal-body cv-popup">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<ul class="nav nav-tabs">
<li class="tab-heading active"><a data-toggle="tab" href="#cl">Cover Letter</a></li>
<li class="tab-heading"><a data-toggle="tab" href="#cv">Curriculum Vitae</a></li>
</ul>
<div class="tab-content">
<div id="cl" class="tab-pane fade in active" style="height:1200px; padding-top:40px;">
<%
if(jobApplication.getCoverLetter() != null && jobApplication.getCoverLetter().getContentType().contains("pdf"))
{
%>
<embed height="100%" width="80%" scrolling="yes" src="<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>#zoom=100"/>
<%
}
else
{
%>
<div class="no-preview">No preview available</div>
<a class="btn download-btn" href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>'>
<img src="images/icon-download-large.png" />Download
</a>
<%
}
%>
</div>
<div id="cv" class="tab-pane fade in" style="height:1200px; padding-top:40px;">
<%
if(jobApplication.getCV() != null && jobApplication.getCV().getContentType().contains("pdf"))
{
%>
<embed height="100%" width="80%" scrolling="yes" src="<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>#zoom=100"/>
<%
}
else
{
%>
<div class="no-preview">No preview available</div>
<a class="btn download-btn" href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>'>
<img src="images/icon-download-large.png" />Download
</a>
<%
}
%>
</div>
</div>
</div>
</div>
</div>
</oneit:dynIncluded>
\ No newline at end of file
......@@ -17,8 +17,14 @@
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
%>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<script type="text/javascript">
var lastclickedOccid = 0 , lastclickedOcc = "" ;
var lastclickedOccid = 0 , lastclickedOcc = "" , levelClicked = "";
var occPopup;
var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null };
var scrolldiv = null ;
......@@ -155,9 +161,17 @@
lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ');
levelClicked = thisEle.data('level');
if(levelClicked === "fourth"){
$('.btn-save-occ').removeAttr('disabled');
$(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid);
} else {
$(".select-occupation").val("");
$("#select-occupation-id").val(0);
$('.btn-save-occ').attr('disabled', 'disabled');
}
thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked");
......@@ -385,65 +399,6 @@
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Select your assessment type</label>
</div>
</div>
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String assessmentTypeKey = WebUtils.getInputKey(request, job, Job.FIELD_AssessmentType);
String assessmentTypeValue = formBuilder.fieldValue (assessmentTypeKey, job.getAssessmentType() == null ? "" : job.getAssessmentType().getName());
for(AssessmentType assessmentType : AssessmentType.getAssessmentTypeArray())
{
String assessmentTypeId = assessmentType.getName();
String selectedStr = CollectionUtils.equals(assessmentTypeValue, assessmentTypeId) ? "checked" : "";
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" class="type_radio" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<span class="label-title"><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></span>
<oneit:toString value="<%= assessmentType.getQuestionDetails() %>" mode="EscapeHTML"/><br />
</label>
</div>
<oneit:recalcClass htmlTag="div" classScript="job.getAssessmentType() == assessmentType ? 'main-pack-type' : '' " job="<%= job %>" assessmentType="<%= assessmentType %>">
<ul>
<%
for(Level level : Level.getAllLevelsforAssessmentType(transaction, assessmentType))
{
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
%>
<oneit:recalcClass htmlTag="li" classScript="job.getLevelClass(level)" job="<%= job %>" level="<%= level %>">
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= level %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= level.getCSSClass() %>"></span>
</label>
</a>
</oneit:recalcClass>
<%
}
%>
</ul>
</oneit:recalcClass>
<div class="clearfix"></div>
<%
}
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
</div>
<div class="form-page-section darkbg">
<div class="form-group row">
......@@ -567,28 +522,28 @@
for (Occupation firstLevel : firstLevelOccupations)
{
%>
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>">
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>" data-level="first">
<span> <%= firstLevel%> </span>
<ul class="level1">
<%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>">
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>" data-level="second">
<span> <%= secondLevel%></span>
<ul class="level2">
<%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>">
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>" data-level="third">
<span> <%= thirdLevel%></span>
<ul class="level3">
<%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>">
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>" data-level="fourth">
<span> <%= fourthLevel%></span>
</li>
<%
......@@ -621,7 +576,7 @@
Select the most appropriate Category to help narrow down your Occupation
</div>
<div class="occupation_select_button">
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button>
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn btn-save-occ" style="" disabled>Save Job Occupation</button>
</div>
</div>
<script>
......
......@@ -30,7 +30,11 @@
job.setIndustry(hiringTeam.getIndustry());
job.setGoogleAddressText(hiringTeam.getGoogleAddressText());
%>
<style>
.rectangle-4.special{
height: 260px;
}
</style>
<script type="text/javascript">
$(document).ready(function()
{
......@@ -81,21 +85,25 @@
<div class="form-group row">
<div class="col-md-6">
<div class="oneit-radio">
<label class="create-job-selector rectangle-4">
<oneit:recalcClass htmlTag="label" classScript="job.getTemplateClass(isTeamplate)" job="<%= job %>" isTeamplate="<%= true %>">
<span class="create-job-icon from-template"></span>
<!--<img src="images/create_from_template.png">-->
<h3>Create from template</h3>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/>
<div>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AssessmentTemplate" options="<%= job.getAssessmentTemplates() %>"
blankValue="Select your template" disabled='true'/>
<oneit:recalcClass htmlTag="div" classScript="hiringTeam.showHasClientSupport() ? 'show': 'hide'" hiringTeam="<%= hiringTeam %>">
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="Client" options="<%= Utils.getClientsByHiringTeam(transaction) %>"
blankValue="No Client"/>
</oneit:recalcClass>
<div style="padding-top:10px;">
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AssessmentTemplate" optionsScript="job.getAssessmentTemplates()" job="<%= job%>"
blankValue="Select your template"/>
</div>
</label>
</oneit:recalcClass>
</div>
</div>
<div class="col-md-6">
<div class="oneit-radio" >
<label class="create-job-selector rectangle-4">
<div class="oneit-radio">
<oneit:recalcClass htmlTag="label" classScript="job.getTemplateClass(isTeamplate)" job="<%= job %>" isTeamplate="<%= false %>">
<span class="create-job-icon new-job"></span>
<!--<img src="images/create_new_job.png">-->
<h3>Create a new job</h3>
......@@ -103,7 +111,7 @@
<div>
New jobs can be saved as a template to be used in future.
</div>
</label>
</oneit:recalcClass>
</div>
</div>
</div>
......
......@@ -21,18 +21,11 @@
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
AssessmentCriteriaTemplate[] templates = (AssessmentCriteriaTemplate[]) process.getAttribute("AssessmentCriteriaTemplates");
if(templates == null)
{
templates = AssessmentCriteriaTemplate.SearchByAll()
AssessmentCriteriaTemplate[] templates = AssessmentCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(hiringTeam))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(transaction);
process.setAttribute("AssessmentCriteriaTemplates", templates);
}
// handle client
if( parameterMap.containsKey("Client"))
{
......@@ -94,7 +87,7 @@
%>
<div class="template-list" id="<%= template.getID() %>">
<div class="template-row">
<div class="job-template-left job-template-cl1">
<div class="job-template-left job-template-cl1 <%= hiringTeam.showHasClientSupport() ? "" : "no-client"%>">
<div class="template-name heading">
<oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" />
</div>
......@@ -105,12 +98,19 @@
<oneit:toString value="<%= template.getJobTitle() %>" mode="EscapeHTML" />
</div>
</div>
<%
if(hiringTeam.showHasClientSupport())
{
%>
<div class="job-template-left job-template-cl3">
<span class="grey-span">CLIENT</span>
<div class="template-name">
<oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" />
</div>
</div>
<%
}
%>
<div class="job-template-left job-template-cl4">
<span class="grey-span">LAST UPDATED</span>
<div class="template-name">
......
......@@ -18,7 +18,7 @@
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
Client[] clients = (Client[]) process.getAttribute("Clients");
Client[] clients = Utils.getClientsByHiringTeam(transaction);;
if( request.getParameter("ClientSortOption") != null)
{
......@@ -30,13 +30,6 @@
clientSortOpt = ClientSortOption.ALPHA_A_Z;
}
if(clients == null)
{
clients = Utils.getClientsByHiringTeam(transaction);
process.setAttribute("Clients", clients);
}
List<Client> sortedClients = Utils.getClientsSorted(clients, clientSortOpt);
process.setAttribute("ClientSortOption", clientSortOpt);
......
......@@ -20,6 +20,7 @@
Map<String, String[]> parameterMap = request.getParameterMap();
SearchJob searchJob = (SearchJob) RunSearchExecutorFP.setupExecutor(request, SearchJob.REFERENCE_SearchJob, true);
Job[] jobs = (Job[])process.getAttribute("jobs");
boolean canCreateJob = hiringTeam.allowJobCreation();
if(!hiringTeam.hasBillingSetup())
{
......@@ -237,7 +238,7 @@
%>
<oneit:dynInclude page="/extensions/adminportal/inc/job_list.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" ShortlistPage="<%= shortlistPage %>"
NextPage="<%= nextPage%>" HomePage="<%= homePage%>" Jobs="<%= sortedJobs.toArray(new Job[0]) %>" JobStatus="<%= jobStatus %>"
JobSortOption="<%= jobSortOpt %>" />
JobSortOption="<%= jobSortOpt %>" CanCreateJob="<%= canCreateJob %>" CompanyUser="<%= companyUser %>"/>
<%
}
%>
......
......@@ -12,6 +12,7 @@ Job.State = State or Province
Job.JobTemplate = Job Template
Job.Occupation = Job Occupation Classification
Job.ExpectedCandidateRadius = Expected Candidate Radius
Job.AssessmentTemplate = Template
CultureCriteria.Importance = Rate Importance
CultureCriteria.CultureElementRating = Rating
......
......@@ -213,7 +213,7 @@
{
%>
<oneit:dynInclude page="/extensions/adminportal/inc/job_list.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" ShortlistPage="<%= shortlistPage %>"
NextPage="<%= nextPage%>" HomePage="<%= homePage%>"
NextPage="<%= nextPage%>" HomePage="<%= homePage%>" CanCreateJob="<%= canCreateJob %>" CompanyUser="<%= companyUser %>"
Jobs="<%= CollectionUtils.batch(recentJobs, 10).get(0).toArray(new Job[0]) %>"/>
<%
}
......
<?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_note</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="comment" type="String" nullable="false" length="1000"/>
<column name="created_user_id" type="Long" length="11" nullable="false"/>
<column name="job_application_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_note" indexName="idx_tl_note_job_application_id" isUnique="false">
<column name="job_application_id"/>
</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_occupation</tableName>
<column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="assessment_level_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
......@@ -108,9 +108,7 @@
<div class="client-row" >
<div class="client-name-cell jl-c" style="width:50%;">
<div class="client-name">
<a href="<%= "&ClientID="+hiringTeam.getObjectID() %>">
<oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML" />
</a>
</div>
</div>
</div>
......
Add GTM key to keyfile properties in production as follows
gtm.key=GTM-WFZ4NVT
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="17px" viewBox="0 0 20 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>AF0E9984-0C6C-4A1E-ADAB-1379B1E82F72</title>
<desc>Created with sketchtool.</desc>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="Job-Card---Active" transform="translate(-297.000000, -63.000000)" stroke="#03A0E7" stroke-width="0.5">
<g id="Job-Card">
<g id="Meta" transform="translate(39.000000, 26.000000)">
<g id="icon-extend" transform="translate(258.000000, 37.000000)">
<path d="M4.68181818,13.8501818 C1.75202485,11.1121736 1.38603787,6.59474971 3.83686531,3.42082111 C5.93222546,0.707238192 9.49847354,-0.26271468 12.6074471,0.851621824" id="Shape"></path>
<polyline id="Shape" points="15.3181818 7.13472727 15.3181818 2.45290909 20 2.45290909"></polyline>
<polyline id="Shape" points="4.68181818 9.22563636 4.68181818 13.9074545 0 13.9074545"></polyline>
<path d="M15.3181818,2.51263636 C18.2524379,5.25843462 18.6098632,9.78822684 16.1425546,12.960238 C13.9801154,15.7403043 10.2728343,16.6739556 7.11186564,15.4024604" id="Shape"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ 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