Commit 1439d978 authored by vikram singh's avatar vikram singh

added onBehalfOf property to the project and updated dashboard.service

parent e416065c
......@@ -40,5 +40,6 @@ public class Resource extends AuditFields implements Serializable {
private String resourceRole;
private String status;
private String onBehalfOf;
}
......@@ -42,6 +42,7 @@ public class EmployeeDashboardVO {
private String empSubStatus;
private String employmentType;
private String domain;
private String onBehalfOf;
@DateTimeFormat(iso = ISO.DATE)
private Date projectStartDate;
......
......@@ -24,6 +24,7 @@ public class ResourceVO {
private String projectId;
private String projectName;
private String status;
private String onBehalfOf;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private String billableStatus;
......
......@@ -161,9 +161,12 @@ public class DashboardService implements IDashboardService {
employeeDashboard.stream().forEach(emp -> {
Resource resource=resourceService.getCurrentAllocation(emp.getEmployeeId());
//resourceService.getLatestResourceByEmpId(emp.getEmployeeId());
Project resourceProject = projectService.getProjectByProjectId(resource.getProjectId());
if(!resourceProject.getStatus().equals("Completed")){
emp.setProjectId(resourceProject.getProjectId());
emp.setBillableStatus(resource.getBillableStatus());
emp.setOnBehalfOf(resource.getOnBehalfOf()!=null?resource.getOnBehalfOf():"");
emp.setProjectName(resourceProject.getProjectName());
emp.setBillingStartDate(resource.getBillingStartDate());
emp.setBillingEndDate(resource.getBillingEndDate());
......
......@@ -601,6 +601,7 @@ public class ResourceService implements IResourceService {
resourceVO.setBillableStatus(resource.getBillableStatus());
resourceVO.setEmployeeId(resource.getEmployeeId());
resourceVO.setStatus(resource.getStatus());
resourceVO.setOnBehalfOf(resource.getOnBehalfOf()!=null?resource.getOnBehalfOf():"");
Employee employee = employeeService.getEmployeeById(resource.getEmployeeId());
resourceVO.setEmailId(employee.getEmailId());
......
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