Commit b36602b2 by Nilu Committed by Harsh Shah

Row - Job - If job is Open, then show [calendar] N days until closed. Otherwise,…

Row - Job - If job is Open, then show [calendar] N days until closed. Otherwise, show [calendar] {Status} on {date} - For example, if job is Closed, then show the calendar icon with **Closed on July 28, 2017** Statuses: Draft / Open / Closed / Filled. Date is whenever the most recent status was applied.
parent a23beb0a
......@@ -18,6 +18,7 @@
<column name="random_key" type="String" nullable="true" length="10"/>
<column name="job_type" type="String" nullable="false" length="200"/>
<column name="ref_number" type="String" nullable="true" length="100"/>
<column name="last_status_change_date" type="Date" nullable="true"/>
<column name="level_id" type="Long" length="11" nullable="false"/>
<column name="secuser_id" type="Long" length="11" nullable="true"/>
</NODE>
......
......@@ -18,6 +18,7 @@ CREATE TABLE tl_job (
random_key varchar(10) NULL,
job_type varchar(200) NOT NULL,
ref_number varchar(100) NULL,
last_status_change_date datetime NULL,
level_id numeric(12) NOT NULL,
secuser_id numeric(12) NULL
);
......
......@@ -19,6 +19,7 @@ CREATE TABLE tl_job (
random_key varchar2(10) NULL,
job_type varchar2(200) NOT NULL,
ref_number varchar2(100) NULL,
last_status_change_date date NULL,
level_id number(12) NOT NULL,
secuser_id number(12) NULL
);
......
......@@ -19,6 +19,7 @@ CREATE TABLE tl_job (
random_key varchar(10) NULL,
job_type varchar(200) NOT NULL,
ref_number varchar(100) NULL,
last_status_change_date timestamp NULL,
level_id numeric(12) NOT NULL,
secuser_id numeric(12) NULL
);
......
......@@ -69,6 +69,14 @@ public class Job extends BaseJob
context.check(getSaveCultureTemplate() == null || !getSaveCultureTemplate() , this, FIELD_CultureTemplateName, "saveTemplateFirst");
}
@Override
protected void postJobStatusChange() throws FieldException
{
setLastStatusChangeDate(new Date());
super.postJobStatusChange();
}
@Override
......
......@@ -37,6 +37,7 @@
<ATTRIB name="RandomKey" type="String" dbcol="random_key" length="10"/>
<ATTRIB name="JobType" type="JobType" dbcol="job_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="JobType.FULL_TIME"/>
<ATTRIB name="ReferenceNumber" type="String" dbcol="ref_number" length="100"/>
<ATTRIB name="LastStatusChangeDate" type="Date" dbcol="last_status_change_date"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="true"/>
<SINGLEREFERENCE name="SecUser" type="SecUser" dbcol="secuser_id" />
......
......@@ -107,4 +107,12 @@
</NODE>
<NODE name="CONFIG.Formatting::AdminPortal">
<PARAM name="PerformaDateFormatter" factory="Participant" class="oneit.utils.text.DateFormatterFactory"
format="MMM dd, yyyy" language="en" country="au"/>
</NODE>
</OBJECTS>
\ No newline at end of file
......@@ -29,15 +29,15 @@
<label class="label-16">Detail</label>
</div>
<div class="form-group">
<label><oneit:ormlabel obj="<%= job %>" field="JobTitle" /></label>
<label><oneit:label GUIName="Job Title" /></label>
<oneit:ormInput obj="<%= job %>" type="text" attributeName="JobTitle" cssClass="form-control" />
</div>
<div class="form-group">
<label><oneit:ormlabel obj="<%= job %>" field="JobDescription" /></label>
<label><oneit:label GUIName="Job Description" /></label>
<oneit:ormtextarea obj="<%= job %>" attributeName="JobDescription" cssClass="form-control textarea-box"/>
</div>
<div class="form-group">
<label><oneit:ormlabel obj="<%= job %>" field="JobType" /></label>
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="JobType" cssClass="form-control"/>
</div>
<div class="optional-title">OPTIONAL</div>
......
......@@ -60,12 +60,24 @@
<span class="superlaw">SUPERLAW</span>
<span class="calendar">
<%
int daysToClose = job.getNoOfDaystoClosed();
if(job.getJobStatus() == JobStatus.OPEN)
{
int daysToClose = job.getNoOfDaystoClosed();
%>
<span class="number">
<oneit:toString value="<%= daysToClose %>" mode="Integer"/>
</span>
<oneit:toString value="<%= (daysToClose == 1 ? "day" : "days") + " until closed" %>" mode="EscapeHTML"/>
<%
}
else
{
%>
<oneit:toString value="<%= job.getJobStatus().getDescription() %>" mode="EscapeHTML"/> on
<oneit:toString value="<%= job.getLastStatusChangeDate() %>" mode="PerformaDate"/>
<%
}
%>
<span class="number">
<oneit:toString value="<%= daysToClose %>" mode="Integer"/>
</span>
<oneit:toString value="<%= (daysToClose == 1 ? "day" : "days") + " until close" %>" mode="EscapeHTML"/>
</span>
</div>
</div>
......
......@@ -42,7 +42,7 @@
</div>
<div class="form-group">
<div class="review-medium-title">
<oneit:ormlabel obj="<%= job %>" field="JobTitle"/>
<oneit:label GUIName="Job Title" />
<span class="skill-label">
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML" />
</span>
......@@ -50,7 +50,7 @@
</div>
<div class="form-group">
<div class="review-medium-title">
<oneit:ormlabel obj="<%= job %>" field="JobDescription" />
<oneit:label GUIName="Job Description" />
<span class="skill-label">
<oneit:toString value="<%= job.getJobDescription() %>" mode="ParagraphHTML" />
</span>
......@@ -59,7 +59,7 @@
<div class="form-group">
<div class="row main-review-label">
<div class="col-sm-3 col-xs-12 review-label">
<oneit:ormlabel obj="<%= job %>" field="Level" />
<oneit:label GUIName="Job Type" />
</div>
<div class="col-sm-9 col-xs-12 review-data">
<oneit:toString value="<%= job.getLevel() %>" mode="EscapeHTML" />
......
<?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_job</tableName>
<column name="last_status_change_date" type="Date" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment