Commit 24440c83 authored by Prayas Jain's avatar Prayas Jain

Fixed Utilization Report Issue and fixed css issue in manage employee screen

parent 45e1ec52
...@@ -80,7 +80,7 @@ public class ReportService implements IReportService { ...@@ -80,7 +80,7 @@ public class ReportService implements IReportService {
billableC++; billableC++;
}else if(resource!=null && resource.getBillableStatus().equals("Trainee")) { }else if(resource!=null && resource.getBillableStatus().equals("Trainee")) {
traineeC++; traineeC++;
} else if(resource!=null && resource.getBillableStatus().equals("Non-Billable")){ } else if(resource!=null){
nonBillableC++; nonBillableC++;
} }
} }
...@@ -160,7 +160,7 @@ public class ReportService implements IReportService { ...@@ -160,7 +160,7 @@ public class ReportService implements IReportService {
billableEmployees.add(mappingReports(employee,resource)); billableEmployees.add(mappingReports(employee,resource));
}else if(resource!=null && resource.getBillableStatus().equals("Trainee")) { }else if(resource!=null && resource.getBillableStatus().equals("Trainee")) {
trainees.add(mappingReports(employee,resource)); trainees.add(mappingReports(employee,resource));
} else{ } else if(resource!=null){
nonBillableEmployees.add(mappingReports(employee,resource)); nonBillableEmployees.add(mappingReports(employee,resource));
} }
} }
......
...@@ -1144,6 +1144,7 @@ public class ResourceService implements IResourceService { ...@@ -1144,6 +1144,7 @@ public class ResourceService implements IResourceService {
public Resource makeResourceInactive(String employeeId,Date endDate){ public Resource makeResourceInactive(String employeeId,Date endDate){
Resource futureAllocation = resourceRepo.findOneByEmployeeIdAndStatus(employeeId, MyTeamUtils.STATUS_PROPOSED); Resource futureAllocation = resourceRepo.findOneByEmployeeIdAndStatus(employeeId, MyTeamUtils.STATUS_PROPOSED);
Resource currentAllocation = resourceRepo.findOneByEmployeeIdAndStatus(employeeId, MyTeamUtils.STATUS_ENGAGED); Resource currentAllocation = resourceRepo.findOneByEmployeeIdAndStatus(employeeId, MyTeamUtils.STATUS_ENGAGED);
Resource latestAllocation = this.getLatestResourceByEmpId(employeeId);
if(Objects.nonNull(futureAllocation)){ if(Objects.nonNull(futureAllocation)){
resourceRepo.delete(futureAllocation); resourceRepo.delete(futureAllocation);
} }
...@@ -1153,6 +1154,11 @@ public class ResourceService implements IResourceService { ...@@ -1153,6 +1154,11 @@ public class ResourceService implements IResourceService {
currentAllocation.setStatus(MyTeamUtils.STATUS_RELEASED); currentAllocation.setStatus(MyTeamUtils.STATUS_RELEASED);
resourceRepo.save(currentAllocation); resourceRepo.save(currentAllocation);
} }
if(Objects.nonNull(latestAllocation) && latestAllocation.getStatus().equals(MyTeamUtils.STATUS_RELEASED)
&& latestAllocation.getProjectId().equals(MyTeamUtils.BENCH_PROJECT_ID)) {
latestAllocation.setBillingEndDate(endDate);
resourceRepo.save(latestAllocation);
}
return null; return null;
} }
} }
\ No newline at end of file
...@@ -644,6 +644,7 @@ cursor: pointer; ...@@ -644,6 +644,7 @@ cursor: pointer;
width:1500px; width:1500px;
height:1200px; height:1200px;
margin-left: 1%; margin-left: 1%;
max-height: 70%;
} }
.new-role-dialog-content{ .new-role-dialog-content{
overflow-x:hidden; overflow-x:hidden;
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
<!--row--> </md-dialog-content> <!--row--> </md-dialog-content>
<md-dialog-actions layout="row"> <md-dialog-actions layout="row" style="margin-bottom:20px;">
<div role="alert" class="col-sm-8 error-msg"> <div role="alert" class="col-sm-8 error-msg">
<span ng-if="errorMessage" class="error" style="color: red; text-align:left;">{{alertMsg}}</span> <span ng-if="errorMessage" class="error" style="color: red; text-align:left;">{{alertMsg}}</span>
</div> </div>
......
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