Commit 7ea3038b by Nilu

S12520127 # Client - Incoming Issues (raised by Client) #Location should default to Hiring Team

Google location is used to replace, state and other attributes. Added google location to hiring team as well.
parent 43e3840f
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<column name="max_cap" type="Long" nullable="true"/> <column name="max_cap" type="Long" nullable="true"/>
<column name="coupon_expiry_date" type="Date" nullable="true"/> <column name="coupon_expiry_date" type="Date" nullable="true"/>
<column name="last_plan_amount" type="Double" nullable="true"/> <column name="last_plan_amount" type="Double" nullable="true"/>
<column name="google_address_text" type="String" nullable="true" length="300"/>
<column name="company_id" type="Long" length="11" nullable="false"/> <column name="company_id" type="Long" length="11" nullable="false"/>
<column name="billing_team_id" type="Long" length="11" nullable="true"/> <column name="billing_team_id" type="Long" length="11" nullable="true"/>
<column name="added_by_user_id" type="Long" length="11" nullable="false"/> <column name="added_by_user_id" type="Long" length="11" nullable="false"/>
......
...@@ -34,6 +34,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -34,6 +34,7 @@ CREATE TABLE tl_hiring_team (
max_cap numeric(12) NULL, max_cap numeric(12) NULL,
coupon_expiry_date datetime NULL, coupon_expiry_date datetime NULL,
last_plan_amount numeric(20,5) NULL, last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -35,6 +35,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -35,6 +35,7 @@ CREATE TABLE tl_hiring_team (
max_cap number(12) NULL, max_cap number(12) NULL,
coupon_expiry_date date NULL, coupon_expiry_date date NULL,
last_plan_amount number(20,5) NULL, last_plan_amount number(20,5) NULL,
google_address_text varchar2(300) NULL,
company_id number(12) NOT NULL, company_id number(12) NOT NULL,
billing_team_id number(12) NULL, billing_team_id number(12) NULL,
added_by_user_id number(12) NOT NULL, added_by_user_id number(12) NOT NULL,
......
...@@ -35,6 +35,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -35,6 +35,7 @@ CREATE TABLE tl_hiring_team (
max_cap numeric(12) NULL, max_cap numeric(12) NULL,
coupon_expiry_date timestamp NULL, coupon_expiry_date timestamp NULL,
last_plan_amount numeric(20,5) NULL, last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -110,6 +110,13 @@ public class HiringTeam extends BaseHiringTeam ...@@ -110,6 +110,13 @@ public class HiringTeam extends BaseHiringTeam
@Override @Override
public Integer getMaxCap()
{
return super.getMaxCap()!= null ? super.getMaxCap() : 0;
}
@Override
public Integer getUsedCredits() public Integer getUsedCredits()
{ {
return super.getUsedCredits() != null ? super.getUsedCredits() : 0; return super.getUsedCredits() != null ? super.getUsedCredits() : 0;
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<ATTRIB name="MaxCap" type="Integer" dbcol="max_cap" /> <ATTRIB name="MaxCap" type="Integer" dbcol="max_cap" />
<ATTRIB name="CouponExpiryDate" type="Date" dbcol="coupon_expiry_date" /> <ATTRIB name="CouponExpiryDate" type="Date" dbcol="coupon_expiry_date" />
<ATTRIB name="LastPlanAmount" type="Double" dbcol="last_plan_amount" /> <ATTRIB name="LastPlanAmount" type="Double" dbcol="last_plan_amount" />
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" />
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" /> <SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" />
<SINGLEREFERENCE name="BilledByTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" backreferenceName="BillingTeams" /> <SINGLEREFERENCE name="BilledByTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" backreferenceName="BillingTeams" />
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
selectedTeam = companyUser.getSelectedTeam(); selectedTeam = companyUser.getSelectedTeam();
} }
if(selectedTeam != null)
{
selectedTeam = selectedTeam.getInTransaction(objTran);
}
if(intercomUser == null) if(intercomUser == null)
{ {
intercomUser = IntercomUtils.findUserByID(clientUser); intercomUser = IntercomUtils.findUserByID(clientUser);
......
...@@ -56,11 +56,8 @@ ...@@ -56,11 +56,8 @@
if(lastclickedOccid!==0){ if(lastclickedOccid!==0){
var currEle = $(".main-list-div").find("li[data-id='"+ lastclickedOccid +"']"); var currEle = $(".main-list-div").find("li[data-id='"+ lastclickedOccid +"']");
//
occlistObj[currEle.parent('ul').attr("class")] = lastclickedOccid ; occlistObj[currEle.parent('ul').attr("class")] = lastclickedOccid ;
checkParents(currEle); checkParents(currEle);
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
if (occlistObj["level"+i] ){ if (occlistObj["level"+i] ){
popuplateSelectLists ($(".main-list-div").find("li[data-id='"+ occlistObj["level"+i] +"']")); popuplateSelectLists ($(".main-list-div").find("li[data-id='"+ occlistObj["level"+i] +"']"));
...@@ -69,8 +66,6 @@ ...@@ -69,8 +66,6 @@
occlistObj["level"+i] = null ; occlistObj["level"+i] = null ;
} }
} }
} }
} }
}); });
...@@ -92,10 +87,9 @@ ...@@ -92,10 +87,9 @@
if (newCurrEle.length){ if (newCurrEle.length){
occlistObj[newCurrEle.parent("ul").attr("class")] = newCurrEle.data("id") ; occlistObj[newCurrEle.parent("ul").attr("class")] = newCurrEle.data("id") ;
checkParents(newCurrEle); checkParents(newCurrEle);
}else{ } else {
return false; return false;
} }
} }
function popuplateSelectLists(thisEle){ function popuplateSelectLists(thisEle){
...@@ -103,15 +97,12 @@ ...@@ -103,15 +97,12 @@
lastclickedOccid = thisEle.data('id'); lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ'); lastclickedOcc = thisEle.data('occ');
$(".select-occupation").val(lastclickedOcc); $(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid); $("#select-occupation-id").val(lastclickedOccid);
thisEle.siblings('li').removeClass("clicked"); thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked"); thisEle.addClass("clicked");
if( !thisEle.parent().hasClass("level3")) { if( !thisEle.parent().hasClass("level3")) {
$(".occupation_select_info").show(); $(".occupation_select_info").show();
var nextUl = thisEle.find('ul').first().clone(); var nextUl = thisEle.find('ul').first().clone();
...@@ -119,25 +110,20 @@ ...@@ -119,25 +110,20 @@
$("." + nextUl.attr('class') + "-div").empty(); $("." + nextUl.attr('class') + "-div").empty();
$("." + nextUl.attr('class') + "-div").nextAll().empty(); $("." + nextUl.attr('class') + "-div").nextAll().empty();
if(nextUl) { if(nextUl) {
nextUl.appendTo($("." + nextUl.attr('class') + "-div")); nextUl.appendTo($("." + nextUl.attr('class') + "-div"));
} }
if(thisEle.parent().hasClass("level2")) { if(thisEle.parent().hasClass("level2")) {
$(".occupation_select_info").hide(); $(".occupation_select_info").hide();
} } else {
else {
if( thisEle.hasClass("main-item")) { if( thisEle.hasClass("main-item")) {
$(".occupation_select_info").css("width","50%").show(); $(".occupation_select_info").css("width","50%").show();
}else{ } else {
if( thisEle.parent().hasClass("level1")) { if( thisEle.parent().hasClass("level1")) {
$(".occupation_select_info").css("width","25%").show(); $(".occupation_select_info").css("width","25%").show();
} }
} }
} }
} }
} }
...@@ -174,7 +160,6 @@ ...@@ -174,7 +160,6 @@
<div class="form-page-area nopadding"> <div class="form-page-area nopadding">
<div class="create-job"> <div class="create-job">
<div class="form-page-section"> <div class="form-page-section">
<% <%
if(false) if(false)
{ {
...@@ -228,15 +213,14 @@ ...@@ -228,15 +213,14 @@
} }
%> %>
</div> </div>
</div> </div>
<div class="form-page-section darkbg"> <div class="form-page-section darkbg">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-16">Job Location</label> <label class="label-16">Job Location</label>
</div> </div>
</div> </div>
<%--
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
<label><oneit:ormlabel obj="<%= job %>" field="Country" /></label> <label><oneit:ormlabel obj="<%= job %>" field="Country" /></label>
...@@ -261,11 +245,16 @@ ...@@ -261,11 +245,16 @@
<oneit:ormEnum obj="<%= job %>" attributeName="ExpectedCandidateRadius" cssClass="form-control"/> <oneit:ormEnum obj="<%= job %>" attributeName="ExpectedCandidateRadius" cssClass="form-control"/>
</div> </div>
</div> </div>
--%>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-12"> <div class="col-md-8">
<label><oneit:label GUIName="Google Location"/></label> <label><oneit:label GUIName="Google Location"/></label>
<oneit:ormInput obj="<%= job %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+job.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" /> <oneit:ormInput obj="<%= job %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+job.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" />
</div> </div>
<div class="col-md-4">
<label><oneit:label GUIName="Expected Candidate Radius"/></label>
<oneit:ormEnum obj="<%= job %>" attributeName="ExpectedCandidateRadius" cssClass="form-control"/>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-4">
...@@ -283,7 +272,6 @@ ...@@ -283,7 +272,6 @@
</div> </div>
</div> </div>
<div class="form-page-section"> <div class="form-page-section">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-12"> <div class="col-md-12">
<label><oneit:label GUIName="Job Type" /></label> <label><oneit:label GUIName="Job Type" /></label>
...@@ -425,7 +413,6 @@ ...@@ -425,7 +413,6 @@
} }
%> %>
</div> </div>
</div> </div>
</div> </div>
<% <%
...@@ -447,7 +434,6 @@ ...@@ -447,7 +434,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group row" style="text-align: center;" > <div class="form-group row" style="text-align: center;" >
<oneit:button value="Add Workflow Step" name="gotoPage" cssClass="add-more-btn review-edit-btn" skin="link" <oneit:button value="Add Workflow Step" name="gotoPage" cssClass="add-more-btn review-edit-btn" skin="link"
onClick="<%="addWorkflow(); return false;"%>" onClick="<%="addWorkflow(); return false;"%>"
...@@ -489,7 +475,6 @@ ...@@ -489,7 +475,6 @@
<div class="occupation_content" id="occupation_content" style="display: none;"> <div class="occupation_content" id="occupation_content" style="display: none;">
<div class="occupation_content_row"> <div class="occupation_content_row">
<div class="main-list-div occupation_content_column"> <div class="main-list-div occupation_content_column">
<ul class="level0"> <ul class="level0">
<% <%
Occupation[] firstLevelOccupations = Occupation.SearchByAll() Occupation[] firstLevelOccupations = Occupation.SearchByAll()
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
job.setHiringTeam(hiringTeam); job.setHiringTeam(hiringTeam);
job.setJobOwner(companyUser); job.setJobOwner(companyUser);
job.setIndustry(job.getHiringTeam().getIndustry()); job.setIndustry(hiringTeam.getIndustry());
job.setGoogleAddressText(hiringTeam.getGoogleAddressText());
%> %>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -31,7 +31,10 @@ ...@@ -31,7 +31,10 @@
}); });
}); });
</script> </script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=AIzaSyCaBh-MsMb8BBYJD_NcFzoCmygQbt5-QSw"></script>
<oneit:script>
<oneit:script src="/scripts/google_address.js"/>
</oneit:script>
<div class="container-fluid"> <div class="container-fluid">
<div class="row content"> <div class="row content">
<div class="main-content-area"> <div class="main-content-area">
...@@ -173,11 +176,17 @@ ...@@ -173,11 +176,17 @@
<div class="form-brack-line-sub"></div> <div class="form-brack-line-sub"></div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-12">
<label><oneit:label GUIName="Google Location"/></label>
<oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+hiringTeam.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" />
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label><oneit:ormlabel obj="<%= hiringTeam %>" field="Country" /></label> <label><oneit:ormlabel obj="<%= hiringTeam %>" field="Country" /></label>
<oneit:ormEnum obj="<%= hiringTeam %>" attributeName="Country" cssClass="form-control"/> <oneit:ormEnum obj="<%= hiringTeam %>" attributeName="Country" cssClass="form-control"/>
</div> </div>
<div class="col-md-4"> <%-- <div class="col-md-4">
<label><oneit:ormlabel obj="<%= hiringTeam %>" field="State" /></label> <label><oneit:ormlabel obj="<%= hiringTeam %>" field="State" /></label>
<oneit:ormEnum obj="<%= hiringTeam %>" attributeName="State" cssClass="form-control"/> <oneit:ormEnum obj="<%= hiringTeam %>" attributeName="State" cssClass="form-control"/>
</div> </div>
...@@ -185,7 +194,9 @@ ...@@ -185,7 +194,9 @@
<label><oneit:ormlabel obj="<%= hiringTeam %>" field="PostCode" /></label> <label><oneit:ormlabel obj="<%= hiringTeam %>" field="PostCode" /></label>
<oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="PostCode" cssClass="form-control" /> <oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="PostCode" cssClass="form-control" />
</div> </div>
--%>
</div> </div>
<%--
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
<label><oneit:ormlabel obj="<%= hiringTeam %>" field="City" /></label> <label><oneit:ormlabel obj="<%= hiringTeam %>" field="City" /></label>
...@@ -196,6 +207,8 @@ ...@@ -196,6 +207,8 @@
<oneit:ormEnum obj="<%= hiringTeam %>" attributeName="TimeZone" cssClass="form-control"/> <oneit:ormEnum obj="<%= hiringTeam %>" attributeName="TimeZone" cssClass="form-control"/>
</div> </div>
</div> </div>
--%>
<div class="text-center form-group"> <div class="text-center form-group">
<oneit:button value="Save Updates" name="saveCompany" cssClass="btn btn-primary largeBtn" <oneit:button value="Save Updates" name="saveCompany" cssClass="btn btn-primary largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
...@@ -207,6 +220,9 @@ ...@@ -207,6 +220,9 @@
</div> </div>
</div> </div>
</div> </div>
<script>
addGoogleAddressListener('#<%= "gAddress_"+ hiringTeam.getObjectID() %>');
</script>
</oneit:form> </oneit:form>
</div> </div>
</div> </div>
......
<?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_hiring_team</tableName>
<column name="google_address_text" type="String" nullable="true" length="300"/>
</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