Commit ea648583 by Nilu

HT001 - Dashboard - Replace 'Open Jobs' with 'Recent Jobs'

parent a101556e
......@@ -24,6 +24,7 @@
<column name="state" type="String" nullable="true" length="200"/>
<column name="country" type="String" nullable="true" length="200"/>
<column name="manually_closed" type="Boolean" nullable="true"/>
<column name="last_edited" type="Date" nullable="true"/>
<column name="level_id" type="Long" length="11" nullable="true"/>
<column name="client_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/>
......
......@@ -24,6 +24,7 @@ CREATE TABLE tl_job (
state varchar(200) NULL,
country varchar(200) NULL,
manually_closed char(1) NULL,
last_edited datetime NULL,
level_id numeric(12) NULL,
client_id numeric(12) NULL,
company_user_id numeric(12) NULL,
......
......@@ -25,6 +25,7 @@ CREATE TABLE tl_job (
state varchar2(200) NULL,
country varchar2(200) NULL,
manually_closed char(1) NULL,
last_edited date NULL,
level_id number(12) NULL,
client_id number(12) NULL,
company_user_id number(12) NULL,
......
......@@ -25,6 +25,7 @@ CREATE TABLE tl_job (
state varchar(200) NULL,
country varchar(200) NULL,
manually_closed char(1) NULL,
last_edited timestamp NULL,
level_id numeric(12) NULL,
client_id numeric(12) NULL,
company_user_id numeric(12) NULL,
......
......@@ -71,6 +71,8 @@ public class SaveJobFP extends SaveFP
job.setIsManuallyClosed(Boolean.TRUE);
}
job.setLastEdited(new Date());
// restarting process as custom attributes needs to be updated to intercom
completeProcessRestartAndRestoreAttribs(process, request);
......
......@@ -47,6 +47,7 @@
<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="IsManuallyClosed" type="Boolean" dbcol="manually_closed" defaultValue="Boolean.FALSE"/>
<ATTRIB name="LastEdited" type="Date" dbcol="last_edited" />
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="false"/>
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" backreferenceName="Jobs"/>
......
......@@ -51,10 +51,12 @@
Job[] allJobs = Job.SearchByCompany()
.byCompany(secUser.getExtension(CompanyUser.REFERENCE_CompanyUser).getCompany())
.search(transaction);
List<Job> recentJobs = ObjstoreUtils.sort(Arrays.asList(allJobs),
new ObjectTransform[]{ Job.pipesJob().toObjectLastModified() },
new Comparator[]{ CollectionUtils.reverse(CollectionUtils.DEFAULT_COMPARATOR) });
new ObjectTransform[]{ Job.pipesJob().toLastEdited() ,
Job.pipesJob().toObjectLastModified()},
new Comparator[]{ CollectionUtils.reverse(CollectionUtils.DEFAULT_COMPARATOR), CollectionUtils.reverse(CollectionUtils.DEFAULT_COMPARATOR), CollectionUtils.reverse(CollectionUtils.DEFAULT_COMPARATOR) });
Article jobsArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOBS);
String nextPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.VIEW_APPLICANTS).toMap());
......
<?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_edited" 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