Commit 13b6c23f by nilu

S42973328 # Matchd / Talentology - No Plan [Enhancement] #Hiring Team Stats -…

S42973328 # Matchd / Talentology - No Plan [Enhancement] #Hiring Team Stats - Active / Cancelled / Closed
parent 7b0f220f
......@@ -9,6 +9,7 @@
<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="xxxx" type="CLOB" nullable="true"/>
<column name="" type="String" nullable="true" length="200"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -8,7 +8,8 @@ CREATE TABLE it_does_not_matter (
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
xxxx text NULL
xxxx text NULL,
varchar(200) NULL
);
......
......@@ -9,7 +9,8 @@ CREATE TABLE it_does_not_matter (
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
xxxx clob NULL
xxxx clob NULL,
varchar2(200) NULL
);
......
......@@ -9,7 +9,8 @@ CREATE TABLE it_does_not_matter (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
xxxx text NULL
xxxx text NULL,
varchar(200) NULL
);
......
......@@ -77,6 +77,8 @@ public class ChangeCompanyFP extends SaveFP
link.setRole(RoleType.OWNER);
}
hiringTeam.getCompany().setCompanyStatus(hiringTeam.getCompanyStatus());
return super.processForm(process, submission, params);
}
}
\ No newline at end of file
......@@ -19,6 +19,7 @@
<TRANSIENT name="StripeLast4" type="String" />
<TRANSIENT name="CompanyName" type="String" />
<TRANSIENT name="CompanyType" type="HiringTeamType" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="CompanyStatus" type="CompanyStatus" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="CompanyTimeZone" type="TimeZone" attribHelper="EnumeratedAttributeHelper"/>
<TABLE name="tl_hiring_team" tablePrefix="object">
......@@ -69,6 +70,13 @@
<SEARCH type="All" paramFilter="tl_hiring_team.object_id is not null" >
</SEARCH>
<SEARCH type="Company" paramFilter="tl_hiring_team.object_id is not null" orderBy="tl_hiring_team.object_id">
<TABLE name="tl_company" join="tl_company.object_id = tl_hiring_team.company_id"/>
<PARAM name="CompanyStatus" type="CompanyStatus" transform='CompanyStatus.getValue()' paramFilter="tl_company.company_status = ${CompanyStatus}" />
</SEARCH>
<SEARCH type="BillingTeams" paramFilter="tl_hiring_team.object_id is not null and (is_ppj = 'Y' or (is_ppj = 'N' and payment_plan_id is not null))" >
</SEARCH>
......
......@@ -412,6 +412,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public ResultSet executeSearchQueryCompany (SQLManager sqlMgr, CompanyStatus CompanyStatus) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryCompany");
}
public ResultSet executeSearchQueryBillingTeams (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryBillingTeams");
......@@ -565,6 +569,56 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
return results;
}
else if (searchType.equals (HiringTeam.SEARCH_Company))
{
// Local scope for transformed variables
{
if (criteria.containsKey("CompanyStatus"))
{
CompanyStatus CompanyStatus = (CompanyStatus)(criteria.get("CompanyStatus"));
criteria.put ("CompanyStatus", CompanyStatus.getValue());
}
}
String orderBy = " ORDER BY tl_hiring_team.object_id";
String tables = ", tl_company ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_hiring_team.object_id is not null
String preFilter = "(tl_hiring_team.object_id is not null)"
+ " AND (tl_company.object_id = tl_hiring_team.company_id) ";
if (criteria.containsKey("CompanyStatus"))
{
preFilter += " AND (tl_company.company_status = ${CompanyStatus}) ";
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_hiring_team " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else if (searchType.equals (HiringTeam.SEARCH_BillingTeams))
{
// Local scope for transformed variables
......
......@@ -18,6 +18,9 @@ public class SearchHiringTeam extends BaseSearchHiringTeam
@Override
public BaseBusinessClass[] doSearch()
{
return HiringTeam.SearchByAll().andHiringTeamName(new ILikeFilter(getDetails(), "%", "%")).search(getTransaction());
return HiringTeam.SearchByCompany()
.byCompanyStatus(getCompanyStatus())
.andHiringTeamName(new ILikeFilter(getDetails(), "%", "%"))
.search(getTransaction());
}
}
\ No newline at end of file
......@@ -5,10 +5,12 @@
<BUSINESSCLASS name="SearchHiringTeam" package="performa.search" superclass="SearchExecutor" >
<IMPORT value="oneit.servlets.orm.*" />
<IMPORT value="performa.orm.types.*" />
<TABLE name="it_does_not_matter" tablePrefix="object" polymorphic="FALSE" >
<ATTRIB name="Details" type="String" dbcol="xxxx" />
<ATTRIB name="CompanyStatus" type="CompanyStatus" attribHelper="EnumeratedAttributeHelper"/>
</TABLE>
......
......@@ -15,6 +15,7 @@ import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import oneit.servlets.orm.*;
import performa.orm.types.*;
......@@ -28,10 +29,12 @@ public class SearchHiringTeamPersistenceMgr extends SearchExecutorPersistenceMgr
// Private attributes corresponding to business object data
private String dummyDetails;
private CompanyStatus dummyCompanyStatus;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Details = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_CompanyStatus = new EnumeratedAttributeHelper (CompanyStatus.FACTORY_CompanyStatus);
......@@ -39,10 +42,11 @@ public class SearchHiringTeamPersistenceMgr extends SearchExecutorPersistenceMgr
public SearchHiringTeamPersistenceMgr ()
{
dummyDetails = (String)(HELPER_Details.initialise (dummyDetails));
dummyCompanyStatus = (CompanyStatus)(HELPER_CompanyStatus.initialise (dummyCompanyStatus));
}
private String SELECT_COLUMNS = "{PREFIX}it_does_not_matter.object_id as id, {PREFIX}it_does_not_matter.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}it_does_not_matter.object_CREATED_DATE as CREATED_DATE, {PREFIX}it_does_not_matter.xxxx, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}it_does_not_matter.object_id as id, {PREFIX}it_does_not_matter.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}it_does_not_matter.object_CREATED_DATE as CREATED_DATE, {PREFIX}it_does_not_matter.xxxx, {PREFIX}it_does_not_matter., 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -93,7 +97,8 @@ public class SearchHiringTeamPersistenceMgr extends SearchExecutorPersistenceMgr
// Check for persistent sets already prefetched
if (false || !it_does_not_matterPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!it_does_not_matterPSet.containsAttrib(SearchHiringTeam.FIELD_Details))
!it_does_not_matterPSet.containsAttrib(SearchHiringTeam.FIELD_Details)||
!it_does_not_matterPSet.containsAttrib(SearchHiringTeam.FIELD_CompanyStatus))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
......@@ -163,10 +168,10 @@ public class SearchHiringTeamPersistenceMgr extends SearchExecutorPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}it_does_not_matter " +
"SET xxxx = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET xxxx = ?, = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE it_does_not_matter.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchHiringTeam.FIELD_Details))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchHiringTeam.FIELD_Details))).listEntry (HELPER_CompanyStatus.getForSQL(dummyCompanyStatus, it_does_not_matterPSet.getAttrib (SearchHiringTeam.FIELD_CompanyStatus))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -401,6 +406,7 @@ public class SearchHiringTeamPersistenceMgr extends SearchExecutorPersistenceMgr
it_does_not_matterPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
it_does_not_matterPSet.setAttrib(SearchHiringTeam.FIELD_Details, HELPER_Details.getFromRS(dummyDetails, r, "xxxx"));
it_does_not_matterPSet.setAttrib(SearchHiringTeam.FIELD_CompanyStatus, HELPER_CompanyStatus.getFromRS(dummyCompanyStatus, r, ""));
}
......@@ -418,10 +424,10 @@ public class SearchHiringTeamPersistenceMgr extends SearchExecutorPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}it_does_not_matter " +
" (xxxx, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (xxxx, , object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchHiringTeam.FIELD_Details))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchHiringTeam.FIELD_Details))).listEntry (HELPER_CompanyStatus.getForSQL(dummyCompanyStatus, it_does_not_matterPSet.getAttrib (SearchHiringTeam.FIELD_CompanyStatus))) .listEntry (objectID.longID ()).toList().toArray());
it_does_not_matterPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -7710,7 +7710,7 @@ input{
font-size: 15px;
text-align: center;
border-color: #03a0e7 !important;
width: 190px;
width: 170px;
height: 50px;
margin-top: 10px;
margin-right: 20px;
......
......@@ -50,6 +50,7 @@
jobApplication.setWorkFlow(workflow);
%>
<div class="appli-row" id="<%= jobApplication.getID() %>">
<div class="appli-checkbox appli-l eq-second-height">
<div class="checkbox-list">
......
......@@ -6,7 +6,7 @@
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_company</tableName>
<column name="company_status" type="String" nullable="false" length="200"/>
<column name="company_status" type="String" nullable="true" length="200"/>
</NODE>
</NODE>
......
......@@ -6,7 +6,7 @@
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_hiring_team</tableName>
<column name="ht_status" type="String" nullable="false" length="200"/>
<column name="ht_status" type="String" nullable="true" length="200"/>
</NODE>
</NODE>
......
-- @AutoRun
update tl_company set company_status = "ACTIVE";
update tl_company set company_status = 'ACTIVE';
update tl_hiring_team set ht_status = "ACTIVE";
\ No newline at end of file
update tl_hiring_team set ht_status = 'ACTIVE';
\ No newline at end of file
......@@ -65,6 +65,8 @@
color: #4e5258;
}
</style>
<div class="dashboard-content-area second-part">
<script type="text/javascript">
var Popup = null;
......@@ -72,6 +74,14 @@
setupRecalc ($("form"), {'recalcOnError':true});
$(".change-company-btn").prop('title', 'Change Customer');
$(".htstatus").change(function() {
$('.save').click();
});
$(".company-status").change(function() {
$('.search-real-btn').click();
});
});
$(function(){
......@@ -81,8 +91,6 @@
});
</script>
<div class="dashboard-content-area second-part">
<div class="jobs-list-shorting">
<div class="d-job-title all-jobs-title">Customers</div>
<div class="shorting-dropdown relative-parent">
......@@ -90,8 +98,12 @@
<oneit:ormInput obj="<%= searchHT %>" type="text" attributeName="Details" cssClass="form-control search-input" id="searchText" />
<span class="search-icon-btn"></span>
</div>
<div class="shorting-dropdown relative-parent">
<div class="order-label">Customer Status</div>
<oneit:ormEnum obj="<%= searchHT %>" attributeName="CompanyStatus" cssClass="form-control company-status"/>
</div>
<oneit:button value="Search" name="search" cssClass="btn btn-primary search-real-btn hidden" />
<oneit:button value=" " name="save" cssClass="btn" requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage).toMap() %>" id="save"/>
<oneit:button value=" " name="save" cssClass="btn save" requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage).toMap() %>" id="save"/>
<div class="shorting-dropdown">
<span class="order-label">order by</span>
<select class="form-control" onChange="location=this.value">
......@@ -127,7 +139,7 @@
%>
<div class="client-list">
<div class="client-row" >
<div class="client-name-cell jl-c" style="width:30%;">
<div class="client-name-cell jl-c" style="width:25%;">
<div class="client-name">
<oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML" />
</div>
......@@ -155,7 +167,10 @@
<oneit:toString value="<%= filledCount %>" mode="EscapeHTML" nullValue="0"/>
<span class="grey-span">Jobs Filled</span>
</div>
<div class="application-count jl-c" style="width:20%;">
<div class="application-count jl-c" style="width:12%;">
<oneit:ormEnum obj="<%= hiringTeam %>" attributeName="HTStatus" cssClass="form-control htstatus"/>
</div>
<div class="application-count jl-c" style="width:13%;padding: 11px 6px 17px 20px;">
<oneit:button value="Login as Admin" name="assume" cssClass="btn btn-primary loginAsAdmin"
requestAttribs="<%= CollectionUtils.mapEntry("HiringTeam", hiringTeam)
.toMap()%>"/>
......
......@@ -10,6 +10,8 @@
ObjectTransaction objTran = process.getTransaction ();
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
hiringTeam.setCompanyStatus(hiringTeam.getCompany().getCompanyStatus());
request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "changeCompanyPopup").mapEntry("enctype", "multipart/form-data").toMap());
request.setAttribute("oneit.pageHeaderTitle", "Change Customer Popup");
%>
......@@ -29,6 +31,10 @@
<oneit:layout_field width="1"><oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML"/></oneit:layout_field>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1"><oneit:label GUIName="Customer Status" /></oneit:layout_label>
<oneit:layout_field width="1"><oneit:ormEnum obj="<%= hiringTeam %>" attributeName="CompanyStatus" cssClass="form-control"/></oneit:layout_field>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1">
<oneit:ormInput obj="<%= hiringTeam %>" type="radio" attributeName="ExistingCustomer" value="true"/> Existing Customer
</oneit:layout_label>
......
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