Commit 54034132 by Nilu

S12536300 # Client - Incoming Issues (raised by Client) #Trying to open job over…

S12536300 # Client - Incoming Issues (raised by Client) #Trying to open job over max. with Standard account
parent 4662d79c
......@@ -651,4 +651,11 @@ public class Utils
{
return colorCode == ColorCode.RED ? RingChart.RED : (colorCode == ColorCode.AMBER ? RingChart.AMBER : RingChart.GREEN);
}
public static boolean allowJobCreation(HiringTeam hiringTeam)
{
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
return billingTeam.getCardID() != null && (billingTeam.isTrue(billingTeam.getIsPPJ()) || billingTeam.canCreateJob());
}
}
\ No newline at end of file
......@@ -2511,6 +2511,10 @@ a.forgot-pass {
background-color: #434c58;
color: #ffffff;
}
.d-create-job-btn.disabled , .d-create-job-btn.disabled:hover{
background-color: #7b8da0;
cursor: not-allowed;
}
.arrow-btn {
border: 1px solid #d4d8dc;
border-radius: 100px;
......
......@@ -16,6 +16,11 @@
companyUser.setSelectedTeam(selectedTeam.getInTransaction(objTran));
}
if(selectedTeam == null && companyUser != null)
{
selectedTeam = companyUser.getSelectedTeam();
}
if(intercomUser == null)
{
intercomUser = IntercomUtils.findUserByID(clientUser);
......@@ -192,10 +197,16 @@
</div>
<div class="create-job-btn">
<%
if(selectedTeam != null)
{
Article jobsArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.JOBS);
boolean onJob = WebUtils.onJobPages(renderMode);
boolean canCreateJob = Utils.allowJobCreation(selectedTeam);
%>
<a href="<%= onJob || !canCreateJob ? "#" : jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>" class="<%= onJob || !canCreateJob ? "disabled" : ""%>" >Create Job</a>
<%
}
%>
<a href="<%= onJob ? "#" : jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>" class="<%= onJob ? "disabled" : ""%>" >Create Job</a>
</div>
</div>
</div>
......
......@@ -66,6 +66,7 @@
String homePage = WebUtils.getSamePageInRenderMode(request, "Page");
String jobsPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap());
boolean firstTime = request.getParameter("firstTime") != null ? Boolean.parseBoolean(request.getParameter("firstTime")) : false;
boolean canCreateJob = Utils.allowJobCreation(hiringTeam);
%>
<oneit:form name="editJob" method="post" enctype="multipart/form-data">
<div class="dashboard-content-area">
......@@ -73,7 +74,7 @@
<div class="welcome-box">
<div class="dashboard-welcome">
<div class="welcome-text"> Welcome <br/> <%= firstTime ? "" : "back"%> <oneit:toString value="<%= secUser.getFirstName()!=null ? secUser.getFirstName() : secUser.getUserName()%>" mode="EscapeHTML"/>!</div>
<a class="d-create-job-btn" href="<%= jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>">Create a Job</a>
<a class="d-create-job-btn <%= canCreateJob ? "" : "disabled"%>" href="<%= canCreateJob ? jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) : "#" %>">Create a Job</a>
</div>
<div class="col-sm-3 col-xs-12 d-three-box green-light">
<div class="d-fl-left eq-height">
......
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