Commit 40c54750 by Harsh Shah

J004 Profile Assessment screen

parent dfe5735b
......@@ -15,7 +15,7 @@
<column name="include_assessment_criteria" type="Boolean" nullable="false"/>
<column name="assessment_type" type="String" nullable="false" length="200"/>
<column name="random_key" type="String" nullable="true" length="10"/>
<column name="level_id" type="Long" length="11" nullable="true"/>
<column name="level_id" type="Long" length="11" nullable="false"/>
<column name="secuser_id" type="Long" length="11" nullable="true"/>
</NODE>
......
......@@ -15,7 +15,7 @@ CREATE TABLE tl_job (
include_assessment_criteria char(1) NOT NULL,
assessment_type varchar(200) NOT NULL,
random_key varchar(10) NULL,
level_id numeric(12) NULL,
level_id numeric(12) NOT NULL,
secuser_id numeric(12) NULL
);
......
......@@ -16,7 +16,7 @@ CREATE TABLE tl_job (
include_assessment_criteria char(1) NOT NULL,
assessment_type varchar2(200) NOT NULL,
random_key varchar2(10) NULL,
level_id number(12) NULL,
level_id number(12) NOT NULL,
secuser_id number(12) NULL
);
......
......@@ -16,7 +16,7 @@ CREATE TABLE tl_job (
include_assessment_criteria char(1) NOT NULL,
assessment_type varchar(200) NOT NULL,
random_key varchar(10) NULL,
level_id numeric(12) NULL,
level_id numeric(12) NOT NULL,
secuser_id numeric(12) NULL
);
......
......@@ -200,7 +200,7 @@ public abstract class BaseJob extends BaseBusinessClass
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "level_id");
metaInfo.put ("mandatory", "false");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Level");
metaInfo.put ("type", "Level");
......@@ -1457,6 +1457,7 @@ public abstract class BaseJob extends BaseBusinessClass
*/
public void setLevel (Level newLevel) throws StorageException, FieldException
{
BusinessObjectParser.assertFieldCondition (newLevel != null, this, SINGLEREFERENCE_Level, "mandatory");
if (_Level.wouldReferencedChange (newLevel))
......@@ -2269,6 +2270,8 @@ public abstract class BaseJob extends BaseBusinessClass
super.validate (context);
context.check (getLevelID() != null, this, SINGLEREFERENCE_Level, "mandatory");
}
......
......@@ -52,6 +52,7 @@ public abstract class BaseLevel extends BaseBusinessClass
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
public static final String SEARCH_Name = "Name";
// Static constants corresponding to attribute helpers
......@@ -1690,6 +1691,80 @@ public abstract class BaseLevel extends BaseBusinessClass
.search (transaction);
}
public static SearchName SearchByName () { return new SearchName (); }
public static class SearchName extends SearchObject<Level>
{
public SearchName byName (String Name)
{
by ("Name", Name);
return this;
}
public SearchName andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_level.object_id", FIELD_ObjectID);
return this;
}
public SearchName andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_level.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchName andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_level.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchName andLevelDescription (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_level.level_desc", "LevelDescription");
return this;
}
public SearchName andLevelNotes (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_level.level_notes", "LevelNotes");
return this;
}
public SearchName andReportHeader (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_level.rpt_hdr", "ReportHeader");
return this;
}
public Level search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_Level, SEARCH_Name, criteria);
Set<Level> typedResults = new LinkedHashSet <Level> ();
for (BaseBusinessClass bbcResult : results)
{
Level aResult = (Level)bbcResult;
typedResults.add (aResult);
}
return (Level)singletonResult(ObjstoreUtils.removeDeleted(transaction, typedResults).toArray(new BaseBusinessClass[0]), "Level", "");
}
}
public static Level searchName (ObjectTransaction transaction, String Name) throws StorageException
{
return SearchByName ()
.byName (Name)
.search (transaction);
}
public Object getAttribute (String attribName)
......
......@@ -22,8 +22,8 @@
<ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="AssessmentType.COMPREHENSIVE"/>
<ATTRIB name="RandomKey" type="String" dbcol="random_key" length="10"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="false"/>
<SINGLEREFERENCE name="SecUser" type="SecUser" dbcol="secuser_id" />
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="true"/>
<SINGLEREFERENCE name="SecUser" type="SecUser" dbcol="secuser_id" />
</TABLE>
......
......@@ -19,6 +19,10 @@
<SEARCH type="All" paramFilter="tl_level.object_id is not null" orderBy="tl_level.object_id" />
<SEARCH type="Name" paramFilter="tl_level.object_id is not null" singleton="TRUE">
<PARAM name="Name" type="String" paramFilter="level_desc = ${Name}" />
</SEARCH>
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
......@@ -261,6 +261,10 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public ResultSet executeSearchQueryName (SQLManager sqlMgr, String Name) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryName");
}
......@@ -410,6 +414,51 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
return results;
}
else if (searchType.equals (Level.SEARCH_Name))
{
// Local scope for transformed variables
{
}
String orderBy = " ";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_level.object_id is not null
String preFilter = "(tl_level.object_id is not null)"
+ " ";
if (criteria.containsKey("Name"))
{
preFilter += " AND (level_desc = ${Name}) ";
preFilter += "";
}
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
......
......@@ -20,9 +20,9 @@ public class AssessmentType extends AbstractEnumerated
public static final EnumeratedFactory FACTORY_AssessmentType = new AssessmentTypeFactory();
public static final AssessmentType COMPREHENSIVE = new AssessmentType ("COMPREHENSIVE", "COMPREHENSIVE", "Comprehensive", false);
public static final AssessmentType COMPREHENSIVE = new AssessmentType ("COMPREHENSIVE", "COMPREHENSIVE", "Talentology Comprehensive", false);
public static final AssessmentType EXPRESS = new AssessmentType ("EXPRESS", "EXPRESS", "Express", false);
public static final AssessmentType EXPRESS = new AssessmentType ("EXPRESS", "EXPRESS", "Talentology Express", false);
private static final AssessmentType[] allAssessmentTypes =
new AssessmentType[] { COMPREHENSIVE,EXPRESS};
......@@ -33,10 +33,24 @@ public class AssessmentType extends AbstractEnumerated
return allAssessmentTypes;
}
private transient String HeaderDesc;
private transient String AdditionalDesc;
private AssessmentType (String name, String value, String description, boolean disabled)
{
super (name, value, description, disabled);
}
public String getHeaderDesc()
{
return HeaderDesc;
}
public String getAdditionalDesc()
{
return AdditionalDesc;
}
public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allAssessmentTypes);
......@@ -105,6 +119,10 @@ public class AssessmentType extends AbstractEnumerated
public static void defineAdditionalData ()
{
COMPREHENSIVE.HeaderDesc = " – Up to 96% accuracy on candidate suitability (250 Questions - 20 Minutes)";
COMPREHENSIVE.AdditionalDesc = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.";
EXPRESS.HeaderDesc = " (30 Questions - 5 Minutes)";
EXPRESS.AdditionalDesc = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut.";
}
......@@ -132,6 +150,8 @@ public class AssessmentType extends AbstractEnumerated
{
Map attribs = new HashMap ();
attribs.put ("HeaderDesc", ArrayFormatter.toObject(getHeaderDesc()));
attribs.put ("AdditionalDesc", ArrayFormatter.toObject(getAdditionalDesc()));
return attribs;
}
......
......@@ -2,9 +2,13 @@
<ROOT>
<CONSTANT package="performa.orm.types" name="AssessmentType">
<VALUE name="COMPREHENSIVE" value="COMPREHENSIVE" description="Comprehensive"/>
<VALUE name="EXPRESS" value="EXPRESS" description="Express"/>
<DATA name="HeaderDesc" type="String" />
<DATA name="AdditionalDesc" type="String" />
<VALUE name="COMPREHENSIVE" description="Talentology Comprehensive" HeaderDesc='" – Up to 96% accuracy on candidate suitability (250 Questions - 20 Minutes)"'
AdditionalDesc='"Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh."'/>
<VALUE name="EXPRESS" description="Talentology Express" HeaderDesc='" (30 Questions - 5 Minutes)"'
AdditionalDesc='"Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut."'/>
</CONSTANT>
</ROOT>
\ No newline at end of file
......@@ -3,6 +3,8 @@ package performa.utils;
import java.util.*;
import oneit.objstore.ObjectTransaction;
import oneit.security.*;
import oneit.utils.Tuple;
import performa.orm.Level;
import performa.orm.types.Importance;
/**
......@@ -14,6 +16,10 @@ public class Utils
public static final String ROLE_APPLICANT = "TL_Applicant";
public static final String ROLE_CLIENT = "TL_Client";
public static final String PRIV_ACCESS_ADMIN_PORTAL = "TL_AccessAdminPortal";
public static final String LEVEL_GENERAL_PURPOSE = "General Workforce";
public static final String LEVEL_SALES = "Sales Personnel";
public static final String LEVEL_MANAGEMENT = "Management";
public static final String LEVEL_EXECUTIVE = "Executive Management";
public static Role getRole(String role, ObjectTransaction transaction)
{
......@@ -43,4 +49,17 @@ public class Utils
}
return importances.toArray(new Importance[0]);
}
//Levels hardcoded for this phase, needs to be changed later!
public static List<Tuple.T3> getLevelsForComprehensive(ObjectTransaction objTran)
{
List<Tuple.T3> levels = new ArrayList();
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_GENERAL_PURPOSE), "General Purpose", "gn-pu"));
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_SALES), "Sales", "sales-pic"));
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_MANAGEMENT), "Management", "manag-pic"));
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_EXECUTIVE), "Executive", "exe-pic"));
return levels;
}
}
......@@ -899,8 +899,7 @@ span.skill-label {
color: #224b7a;
}
.main-pack-type li a{
text-align: center;
padding: 12px 0 16px;
text-align: center;
float: left;
width: 100%;
border-radius: 4px;
......@@ -920,6 +919,18 @@ span.skill-label {
height: 40px;
margin: 17px 0 24px;
}
.main-pack-type a input[type=radio] {
position: absolute;
visibility: hidden;
}
.main-pack-type label{
margin-bottom: 0;
font-weight: normal;
padding: 12px 0 16px;
float: left;
width: 100%;
cursor: pointer;
}
.gn-pu{
background-image: url('../images/general.png');
}
......@@ -1021,7 +1032,7 @@ span.skill-label {
font-size: 12px;
font-weight: 500;
margin-bottom: 30px;
text-transform: uppercase;
text-transform: uppercase;
}
.workplace-radio.radio label{
padding-left: 9px;
......@@ -2448,6 +2459,10 @@ span.appli-progress-bar {
}
.expand-box img {
margin-left: 1px;
margin-top: -4px;
}
.hasarrow img{
margin-top: -1px;
}
.main-pro-bar{
border-bottom: solid 1px #e3e3e3;
......@@ -4031,4 +4046,4 @@ img.alert-icon {float: left;}
@media screen and (max-width: 320px){
.verify-i-title {font-size: 13px;}
}
}
\ No newline at end of file
......@@ -10,6 +10,16 @@
Debug.assertion(job != null, "Job is null in admin portal create job");
%>
<script>
$(document).ready(function(){
$(".level_radio").change(function(){
$('li.active').removeClass("active" );
$("input.level_radio:checked").closest('li').addClass("active" );
});
});
</script>
<oneit:form name="editJob" method="post" enctype="multipart/form-data">
<div class="container-fluid">
......@@ -24,58 +34,64 @@
<div class="create-job match-job">
<div class="form-group">
<label class="label-16">Select your assessment type</label>
</div>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="radio1" id="radio1" value="option1" checked>
<label for="radio1">
<b>Comprehensive -</b> Up to 96% accuracy on candidate suitability (250 Questions - 20 Minutes) <br />
<span class="sub-radio-title">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</span>
</label>
</div>
<div class="main-pack-type">
<ul>
<li>
<a href="#">
<span class="talen">Talentology</span>
<span class="pack-type">General Purpose</span>
<span class="pack-img gn-pu"></span>
<span class="pack-price">$299.00</span>
</a>
</li>
<li class="active">
<a href="#">
<span class="talen">Talentology</span>
<span class="pack-type">Sales</span>
<span class="pack-img sales-pic"></span>
<span class="pack-price">$399.00</span>
</a>
</li>
<li>
<a href="#">
<span class="talen">Talentology</span>
<span class="pack-type">Management</span>
<span class="pack-img manag-pic"></span>
<span class="pack-price">$499.00</span>
</a>
</li>
<li>
<a href="#">
<span class="talen">Talentology</span>
<span class="pack-type">Executive</span>
<span class="pack-img exe-pic"></span>
<span class="pack-price ex-color">$599.00</span>
</a>
</li>
</ul>
</div>
<div class="clearfix"></div>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="radio1" id="radio5" value="option1">
<label for="radio5">
<b>Talentology Express</b> (30 Questions - 5 Minutes) <span class="blue"> $199.00</span> <br />
<span class="sub-radio-title">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut.</span>
</label>
</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" : "";
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<b><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></b><oneit:toString value="<%= assessmentType.getHeaderDesc() %>" mode="EscapeHTML"/><br />
<span class="sub-radio-title"><oneit:toString value="<%= assessmentType.getAdditionalDesc() %>" mode="EscapeHTML" /></span>
</label>
</div>
<%
if(assessmentType == AssessmentType.COMPREHENSIVE)
{
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
<div class="main-pack-type">
<ul>
<%
for(Tuple.T3 tuple : Utils.getLevelsForComprehensive(transaction))
{
Level level = (Level)tuple.get0();
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
String liClass = isSelected ? "active" : "";
%>
<li class="<%= liClass %>" >
<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="<%= tuple.get1() %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= tuple.get2() %>"></span>
</label>
</a>
</li>
<%
}
%>
</ul>
</div>
<div class="clearfix"></div>
<%
}
}
%>
<div class="text-center">
<oneit:button value="Review Details" name="gotoPage" cssClass="btn btn-primary top-margin-37 largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", fifthPage)
......
Job.JobTitle = Job Title
Job.JobDescription = Job Description
Job.Level = Role Type
CultureCriteria.Importance = Rate Importance
CultureCriteria.CultureElementRating = Rating
cmsWebApp/webroot/images/sale.png

1.9 KB | W: | H:

cmsWebApp/webroot/images/sale.png

1.94 KB | W: | H:

cmsWebApp/webroot/images/sale.png
cmsWebApp/webroot/images/sale.png
cmsWebApp/webroot/images/sale.png
cmsWebApp/webroot/images/sale.png
  • 2-up
  • Swipe
  • Onion skin
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