Unverified Commit 3c54d103 authored by rbonthala-nisum-com's avatar rbonthala-nisum-com Committed by GitHub

Revert "MT-122 :SNS :: My_Project_Allocations" (#128)

* Revert "bug fixes in manage employee and manage project (#127)"

This reverts commit c387c185.

* Revert "Ui changes as per services and bug fix (#126)"

This reverts commit 33d41f29.

* Revert "MT-122_1 :SNS :: My_Project_Allocations (#125)"

This reverts commit 6a8d2de6.

* Revert "MT-122 :SNS :: My_Project_Allocations (#124)"

This reverts commit 4859203e.
parent 07aac43a
package com.nisum.mytime.controller; package com.nisum.mytime.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -25,7 +25,6 @@ import com.nisum.mytime.model.ProjectTeamMate; ...@@ -25,7 +25,6 @@ import com.nisum.mytime.model.ProjectTeamMate;
import com.nisum.mytime.repository.EmployeeVisaRepo; import com.nisum.mytime.repository.EmployeeVisaRepo;
import com.nisum.mytime.service.ProjectService; import com.nisum.mytime.service.ProjectService;
import com.nisum.mytime.service.UserService; import com.nisum.mytime.service.UserService;
import com.nisum.mytime.utils.MyTimeUtils;
@RestController @RestController
@RequestMapping("/projectTeam") @RequestMapping("/projectTeam")
...@@ -40,6 +39,8 @@ public class ProjectTeamController { ...@@ -40,6 +39,8 @@ public class ProjectTeamController {
@Autowired @Autowired
private EmployeeVisaRepo employeeVisaRepo; private EmployeeVisaRepo employeeVisaRepo;
@Autowired
private ProjectController projectController;
@RequestMapping(value = "/employee", method = RequestMethod.GET, @RequestMapping(value = "/employee", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE) produces = MediaType.APPLICATION_JSON_VALUE)
...@@ -214,8 +215,7 @@ public class ProjectTeamController { ...@@ -214,8 +215,7 @@ public class ProjectTeamController {
@RequestMapping(value = "/getProjectDetails", method = RequestMethod.GET, @RequestMapping(value = "/getProjectDetails", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE) produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<ProjectTeamMate>> getProjectDetails( public ResponseEntity<List<ProjectTeamMate>> getProjectDetails(
@RequestParam("projectId") String projectId, @RequestParam("projectId") String projectId,@RequestParam("status") String status)
@RequestParam(value = "status", required = false, defaultValue = MyTimeUtils.ACTIVE) String status)
throws MyTimeException { throws MyTimeException {
List<ProjectTeamMate> employeesRoles = projectService List<ProjectTeamMate> employeesRoles = projectService
.getProjectDetails(projectId,status); .getProjectDetails(projectId,status);
...@@ -225,13 +225,12 @@ public class ProjectTeamController { ...@@ -225,13 +225,12 @@ public class ProjectTeamController {
@RequestMapping(value = "/getMyProjectAllocations", @RequestMapping(value = "/getMyProjectAllocations",
method = RequestMethod.GET, method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE) produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<HashMap<Object, Object>>> getMyProjectAllocations( public ResponseEntity<List<ProjectTeamMate>> getMyProjectAllocations(
@RequestParam("employeeId") String employeeId) @RequestParam("employeeId") String employeeId)
throws MyTimeException { throws MyTimeException {
//List<ProjectTeamMate> projectAllocations = projectService List<ProjectTeamMate> projectAllocations = projectService
// .getMyProjectAllocations(employeeId); .getMyProjectAllocations(employeeId);
List<HashMap<Object, Object>> empPrjtsInfo = projectService.projectsInfoByEmpId(employeeId); return new ResponseEntity<>(projectAllocations, HttpStatus.OK);
return new ResponseEntity<>(empPrjtsInfo, HttpStatus.OK);
} }
@RequestMapping(value = "/getEmployeeBillingDetails", @RequestMapping(value = "/getEmployeeBillingDetails",
......
...@@ -34,7 +34,5 @@ public interface ProjectTeamMatesRepo ...@@ -34,7 +34,5 @@ public interface ProjectTeamMatesRepo
List<ProjectTeamMate> findByAccountAndActiveAndBillableStatus( List<ProjectTeamMate> findByAccountAndActiveAndBillableStatus(
String account, boolean status, String billableStatus); String account, boolean status, String billableStatus);
List<ProjectTeamMate> findByEmployeeIdOrderByStartDateAsc(String employeeId);
} }
...@@ -86,7 +86,5 @@ public interface ProjectService { ...@@ -86,7 +86,5 @@ public interface ProjectService {
public String addProjectTeamMateWithCheck(ProjectTeamMate projectTeamMate) public String addProjectTeamMateWithCheck(ProjectTeamMate projectTeamMate)
throws MyTimeException; throws MyTimeException;
public List<HashMap<Object, Object>> projectsInfoByEmpId(String empId);
} }
...@@ -107,7 +107,5 @@ public class MyTimeUtils { ...@@ -107,7 +107,5 @@ public class MyTimeUtils {
public final static String BENCH_ACCOUNT="Nisum India"; public final static String BENCH_ACCOUNT="Nisum India";
public final static String BENCH_PROJECT_ID="Nisum0000"; public final static String BENCH_PROJECT_ID="Nisum0000";
public final static String BENCH_BILLABILITY_STATUS="Non-Billable"; public final static String BENCH_BILLABILITY_STATUS="Non-Billable";
public final static int INT_ZERO = 0;
} }
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