Commit c1b681bb by nilu

S32916706 # Client - Incoming Issues (raised by Client) #Calculation wrong in Express

showing role fit value as 0 if it is negative
parent 726ccc1b
...@@ -709,7 +709,7 @@ public class JobApplication extends BaseJobApplication ...@@ -709,7 +709,7 @@ public class JobApplication extends BaseJobApplication
{ {
Tuple.T3<Double, ColorCode, Double> roleFitData = (getRoleFit() != null && getRoleFit().get(null) != null) ? (Tuple.T3<Double, ColorCode, Double>) getRoleFit().get(null) : null; Tuple.T3<Double, ColorCode, Double> roleFitData = (getRoleFit() != null && getRoleFit().get(null) != null) ? (Tuple.T3<Double, ColorCode, Double>) getRoleFit().get(null) : null;
double score = roleFitData != null ? roleFitData.get2() : 0d; double score = roleFitData != null ? roleFitData.get2() > 0 ? roleFitData.get2() : 0d : 0d;
Color color = roleFitData != null ? Utils.getColor(roleFitData.get1()) : RingChart.GREEN; Color color = roleFitData != null ? Utils.getColor(roleFitData.get1()) : RingChart.GREEN;
return new RingChart(getID().toString() + "rolefit.jpeg").addData("Completed", score , color).addData("Incomplete", (100 - score), RingChart.GREY).getChartImage(); return new RingChart(getID().toString() + "rolefit.jpeg").addData("Completed", score , color).addData("Incomplete", (100 - score), RingChart.GREY).getChartImage();
......
...@@ -375,13 +375,21 @@ ...@@ -375,13 +375,21 @@
%> %>
<div class="appli-row"> <div class="appli-row">
<span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span> <span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="PercentageWholeNumber" /></span> <span class="appli-percen gray"><oneit:toString value="<%= !job.isExpressJob() ? rating : null %>" mode="PercentageWholeNumber" /></span>
<span class="appli-progress-bar"> <span class="appli-progress-bar">
<div class="progress"> <%
<div class="progress-bar" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%;"></div> if(!job.isExpressJob())
</div> {
%>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%;"></div>
</div>
<%
}
%>
</span> </span>
</div> </div>
<% <%
if(detailed) if(detailed)
{ {
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<div class="<%= job.getIncludeAssessmentCriteria()==Boolean.TRUE ? "col-sm-4" : "col-sm-6" %> col-xs-12 text-center thr-block role-fit" href="#1a" data-toggle="tab" id="progress1" onClick="tabToggle('#tab1', '.role-fit')"> <div class="<%= job.getIncludeAssessmentCriteria()==Boolean.TRUE ? "col-sm-4" : "col-sm-6" %> col-xs-12 text-center thr-block role-fit" href="#1a" data-toggle="tab" id="progress1" onClick="tabToggle('#tab1', '.role-fit')">
<label class="progress-label">role fit</label> <label class="progress-label">role fit</label>
<div class="<%= colorClass %> fixed-width"> <div class="<%= colorClass %> fixed-width">
<p style="display:none;"><oneit:toString value="<%= roleFitData!=null ? roleFitData.get2() : 0d %>" mode="TwoDPDouble" nullValue="0"/></p> <p style="display:none;"><oneit:toString value="<%= roleFitData!=null ? roleFitData.get2() > 0 ? roleFitData.get2() : 0d : 0d %>" mode="TwoDPDouble" nullValue="0"/></p>
</div> </div>
<div class="row four-label"> <div class="row four-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