Commit abd738af authored by Vijay Akula's avatar Vijay Akula

Allocation Change Service implementation

parents f3e83121 125a898d
package com.nisum.myteam.controller; package com.nisum.myteam.controller;
import com.nisum.myteam.exception.handler.MyTeamException; import static org.springframework.data.mongodb.core.aggregation.Aggregation.group;
import com.nisum.myteam.exception.handler.ResponseDetails; import static org.springframework.data.mongodb.core.aggregation.Aggregation.newAggregation;
import com.nisum.myteam.model.ColumnChartData; import static org.springframework.data.mongodb.core.aggregation.Aggregation.project;
import com.nisum.myteam.model.GroupByCount; import static org.springframework.data.mongodb.core.aggregation.Aggregation.sort;
import com.nisum.myteam.model.ReportSeriesRecord;
import com.nisum.myteam.model.dao.Account; import java.text.ParseException;
import com.nisum.myteam.model.dao.Employee; import java.text.SimpleDateFormat;
import com.nisum.myteam.model.dao.Resource; import java.util.ArrayList;
import com.nisum.myteam.model.vo.ReportVo; import java.util.Calendar;
import com.nisum.myteam.model.vo.ResourceVO; import java.util.Date;
import com.nisum.myteam.service.IAccountService; import java.util.HashMap;
import com.nisum.myteam.service.IEmployeeService; import java.util.List;
import com.nisum.myteam.service.IResourceService; import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
...@@ -25,19 +28,26 @@ import org.springframework.data.mongodb.core.query.Query; ...@@ -25,19 +28,26 @@ import org.springframework.data.mongodb.core.query.Query;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import static org.springframework.data.mongodb.core.aggregation.Aggregation.*; import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.BillableEmployee;
import com.nisum.myteam.model.ColumnChartData;
import com.nisum.myteam.model.GroupByCount;
import com.nisum.myteam.model.ReportSeriesRecord;
import com.nisum.myteam.model.dao.Account;
import com.nisum.myteam.model.dao.Employee;
import com.nisum.myteam.model.dao.Resource;
import com.nisum.myteam.model.vo.ReportVo;
import com.nisum.myteam.model.vo.ResourceVO;
import com.nisum.myteam.service.IAccountService;
import com.nisum.myteam.service.IEmployeeService;
import com.nisum.myteam.service.IResourceService;
//import com.nisum.myteam.model.dao.Resource;
@RestController @RestController
@RequestMapping("/reports") @RequestMapping("/reports")
...@@ -56,7 +66,7 @@ public class ReportsController { ...@@ -56,7 +66,7 @@ public class ReportsController {
@Autowired @Autowired
private IAccountService accountService; private IAccountService accountService;
//Ok Response //Ok Response
@RequestMapping(value = "/getEmployeesByFunctionalGroup1", @RequestMapping(value = "/getEmployeesByFunctionalGroup1",
method = RequestMethod.GET, method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE) produces = MediaType.APPLICATION_JSON_VALUE)
...@@ -220,7 +230,6 @@ public class ReportsController { ...@@ -220,7 +230,6 @@ public class ReportsController {
produces = MediaType.APPLICATION_JSON_VALUE) produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<Map<String, List<GroupByCount>>>> getEmployeesByFunctionalGroup1() public ResponseEntity<List<Map<String, List<GroupByCount>>>> getEmployeesByFunctionalGroup1()
throws MyTeamException { throws MyTeamException {
ProjectionOperation projectToMatchModel = project() ProjectionOperation projectToMatchModel = project()
.andExpression("functionalGroup").as("name").andExpression("y") .andExpression("functionalGroup").as("name").andExpression("y")
.as("y"); .as("y");
...@@ -248,13 +257,13 @@ public class ReportsController { ...@@ -248,13 +257,13 @@ public class ReportsController {
return new ResponseEntity<>(list, HttpStatus.OK); return new ResponseEntity<>(list, HttpStatus.OK);
} }
@RequestMapping(value = "/fetchEmployeeDetailsByFG", @RequestMapping(value = "/fetchEmployeeDetailsByFGAndBillability",
method = RequestMethod.GET, method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE) produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<Employee>> getEmployeesByFG( public ResponseEntity<List<BillableEmployee>> getEmployeesByFGAndBillability(
@RequestParam("fGroup") String fGroup) throws MyTeamException { @RequestParam("fGroup") String fGroup , @RequestParam("billableStatus") String billableStatus) throws MyTeamException {
List<Employee> empList = new ArrayList<>(); List<BillableEmployee> empList = new ArrayList<>();
empList = employeeService.getEmployeesByFunctionalGrp(fGroup); empList = employeeService.getEmployeeDetailsByFGAndBillability(fGroup,billableStatus);
return new ResponseEntity<>(empList, HttpStatus.OK); return new ResponseEntity<>(empList, HttpStatus.OK);
} }
...@@ -311,7 +320,6 @@ public class ReportsController { ...@@ -311,7 +320,6 @@ public class ReportsController {
return new ResponseEntity<>(empList, HttpStatus.OK); return new ResponseEntity<>(empList, HttpStatus.OK);
} }
@RequestMapping(value = "/billabilityByFunctionalGroup", @RequestMapping(value = "/billabilityByFunctionalGroup",
method = RequestMethod.GET, method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE) produces = MediaType.APPLICATION_JSON_VALUE)
...@@ -320,44 +328,58 @@ public class ReportsController { ...@@ -320,44 +328,58 @@ public class ReportsController {
ReportVo reportVo = new ReportVo(); ReportVo reportVo = new ReportVo();
Map<String,Object> billableData = new HashMap(); Map<String,Object> billableData = new HashMap();
Map<String,Object> nonBillableData = new HashMap(); Map<String,Object> nonBillableData = new HashMap();
Map<String,Object> traineeData = new HashMap();
List<Object> billableCount = new ArrayList<>(); List<Object> billableCount = new ArrayList<>();
List<Object> nonBillableCount = new ArrayList<>(); List<Object> nonBillableCount = new ArrayList<>();
List<Object> traineeCount = new ArrayList<>();
billableData.put("name","Billable"); billableData.put("name","Billable");
nonBillableData.put("name","Non Billable"); nonBillableData.put("name","Non-Billable");
traineeData.put("name", "Trainee");
for(String functionalGroup:reportVo.getCategoriesList()){ for(String functionalGroup:reportVo.getCategoriesList()){
Map<String,Object> billableObj = new HashMap(); Map<String,Object> billableObj = new HashMap();
Map<String,Object> nonbillableObj = new HashMap(); Map<String,Object> nonbillableObj = new HashMap();
// Map<String,Object> traineeObj = new HashMap();
Integer billableC=0; Integer billableC=0;
Integer nonBillableC=0; Integer nonBillableC=0;
Integer traineeC=0;
// float traineePer;
float billper; float billper;
float nonBillPer; float nonBillPer;
List<Employee> employeeList = employeeService.getAllEmployees().stream(). List<Employee> employeeList = employeeService.getEmployeesByFunctionalGrp(functionalGroup);
filter(e -> e.getFunctionalGroup().equals(functionalGroup)).collect(Collectors.toList());
for(Employee employee:employeeList){ for(Employee employee:employeeList){
Resource resource = resourceService.getLatestResourceByEmpId(employee.getEmployeeId()); Resource resource = resourceService.getLatestResourceByEmpId(employee.getEmployeeId());
if(resource!=null && resource.getBillableStatus().equals("Billable")){ if(resource!=null && resource.getBillableStatus().equals("Billable")){
billableC++; billableC++;
}else{ }else if(resource!=null && resource.getBillableStatus().equals("Trainee")) {
traineeC++;
} else{
nonBillableC++; nonBillableC++;
} }
} }
billper = ((billableC / (float)employeeList.size())*100); billper = ((billableC / (float)(employeeList.size() - traineeC))*100);
nonBillPer = nonBillableC /(float) employeeList.size()*100; nonBillPer = nonBillableC /(float) (employeeList.size()-traineeC)*100;
// traineePer = traineeC / (float) employeeList.size()*100;
billableObj.put("percent", billper); billableObj.put("percent", billper);
billableObj.put("y", billableC); billableObj.put("y", billableC);
nonbillableObj.put("percent", nonBillPer); nonbillableObj.put("percent", nonBillPer);
nonbillableObj.put("y", nonBillableC); nonbillableObj.put("y", nonBillableC);
// traineeObj.put("percent", traineePer);
// traineeObj.put("y", traineeC);
billableCount.add(billableObj); billableCount.add(billableObj);
nonBillableCount.add(nonbillableObj); nonBillableCount.add(nonbillableObj);
traineeCount.add(traineeC);
} }
billableData.put("data",billableCount); billableData.put("data",billableCount);
nonBillableData.put("data",nonBillableCount); nonBillableData.put("data",nonBillableCount);
traineeData.put("data", traineeCount);
reportVo.getSeriesDataList().add(billableData); reportVo.getSeriesDataList().add(billableData);
reportVo.getSeriesDataList().add(nonBillableData); reportVo.getSeriesDataList().add(nonBillableData);
reportVo.getSeriesDataList().add(traineeData);
return reportVo; return reportVo;
} }
//Not Ok Response //Not Ok Response
@RequestMapping(value = "/getBillabilityDetailsByAccount", @RequestMapping(value = "/getBillabilityDetailsByAccount",
method = RequestMethod.GET, method = RequestMethod.GET,
...@@ -365,6 +387,7 @@ public class ReportsController { ...@@ -365,6 +387,7 @@ public class ReportsController {
public ResponseEntity<ColumnChartData> getBillabilityDetailsByAccount() public ResponseEntity<ColumnChartData> getBillabilityDetailsByAccount()
throws MyTeamException { throws MyTeamException {
ProjectionOperation projectToMatchModel = project() ProjectionOperation projectToMatchModel = project()
.andExpression("account").as("categories") .andExpression("account").as("categories")
.andExpression("billableStatus").as("seriesName") .andExpression("billableStatus").as("seriesName")
...@@ -380,7 +403,7 @@ public class ReportsController { ...@@ -380,7 +403,7 @@ public class ReportsController {
// Convert the aggregation result into a List // Convert the aggregation result into a List
AggregationResults<ColumnChartData> groupResults = mongoTemplate.aggregate(aggregate, Resource.class, AggregationResults<ColumnChartData> groupResults = mongoTemplate.aggregate(aggregate, Resource.class,
ColumnChartData.class); ColumnChartData.class);
List<ColumnChartData> result = groupResults.getMappedResults(); List<ColumnChartData> result = groupResults.getMappedResults();
List<String> statusList = new ArrayList(); List<String> statusList = new ArrayList();
statusList.add("Billable"); statusList.add("Billable");
...@@ -390,7 +413,12 @@ public class ReportsController { ...@@ -390,7 +413,12 @@ public class ReportsController {
List<String> catagories = new ArrayList(); List<String> catagories = new ArrayList();
List<ReportSeriesRecord> seriesDetails = new ArrayList<ReportSeriesRecord>(); List<ReportSeriesRecord> seriesDetails = new ArrayList<ReportSeriesRecord>();
List<Account> accounts= accountService.getAllAccounts();
//List<Account> accounts = employeeService.getAccounts();
List<Account> accounts = accountService.getAllAccounts();
ColumnChartData reportData = new ColumnChartData(); ColumnChartData reportData = new ColumnChartData();
for (String status : statusList) { for (String status : statusList) {
catagories = new ArrayList(); catagories = new ArrayList();
...@@ -422,7 +450,6 @@ public class ReportsController { ...@@ -422,7 +450,6 @@ public class ReportsController {
seriesDetails.add(reportSeriesRecord); seriesDetails.add(reportSeriesRecord);
} }
System.out.println(seriesDetails);
reportData.setCategoriesList(catagories); reportData.setCategoriesList(catagories);
reportData.setSeriesDataList(seriesDetails); reportData.setSeriesDataList(seriesDetails);
return new ResponseEntity<>(reportData, HttpStatus.OK); return new ResponseEntity<>(reportData, HttpStatus.OK);
...@@ -430,4 +457,3 @@ public class ReportsController { ...@@ -430,4 +457,3 @@ public class ReportsController {
} }
package com.nisum.myteam.model;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class BillableEmployee implements Serializable {
private static final long serialVersionUID = 1L;
private String employeeId;
private String employeeName;
private String emailId;
private String projectName;
private String billableStatus;
private Date billingStartDate;
private Date billingEndDate;
private String functionalGroup;
}
...@@ -7,6 +7,7 @@ import org.springframework.data.mongodb.repository.MongoRepository; ...@@ -7,6 +7,7 @@ import org.springframework.data.mongodb.repository.MongoRepository;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set;
public interface ResourceRepo public interface ResourceRepo
extends MongoRepository<Resource, String> { extends MongoRepository<Resource, String> {
...@@ -24,6 +25,12 @@ public interface ResourceRepo ...@@ -24,6 +25,12 @@ public interface ResourceRepo
List<Resource> findByBillingStartDateGreaterThan(Date billingStartDate); List<Resource> findByBillingStartDateGreaterThan(Date billingStartDate);
List<Resource> findByBillingStartDateBetween(Date fromDate,Date toDate); List<Resource> findByBillingStartDateBetween(Date fromDate,Date toDate);
//Set<Resource> findByBillableStatus(String resourceAllocationStatus);
Resource findOneByProjectIdAndEmployeeIdAndBillingEndDate(String projectId,String employeeId,Date billingEndDate);
Resource findOneByEmployeeIdAndBillingEndDate(String employeeId,Date billingEndDate);
// List<Resource> findByEmployeeIdAndActive(String employeeId, boolean status); // List<Resource> findByEmployeeIdAndActive(String employeeId, boolean status);
......
package com.nisum.myteam.service; package com.nisum.myteam.service;
import com.nisum.myteam.exception.handler.MyTeamException; import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.dao.Account; import com.nisum.myteam.model.BillableEmployee;
import com.nisum.myteam.model.dao.Employee; import com.nisum.myteam.model.dao.Account;
import org.springframework.stereotype.Service; import com.nisum.myteam.model.dao.Employee;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List; import java.util.HashMap;
import java.util.Set; import java.util.List;
import java.util.Set;
@Service
public interface IEmployeeService { @Service
public interface IEmployeeService {
boolean isEmployeeExistsById(String employeeId);
boolean isEmployeeExistsById(String employeeId);
Employee createEmployee(Employee employeeRoles, String empId) throws MyTeamException;
Employee createEmployee(Employee employeeRoles, String empId) throws MyTeamException;
Employee updateEmployee(Employee employeeRoles, String empId);
Employee updateEmployee(Employee employeeRoles, String empId);
Employee deleteEmployee(String empId);
Employee deleteEmployee(String empId);
Employee updateProfile(Employee employeeRoles) throws MyTeamException;
Employee updateProfile(Employee employeeRoles) throws MyTeamException;
Employee getEmployeeById(String empId);
Employee getEmployeeById(String empId);
Employee getEmployeeByEmaillId(String emailId);
Employee getEmployeeByEmaillId(String emailId);
List<Employee> getManagers() throws MyTeamException;
List<Employee> getManagers() throws MyTeamException;
List<Employee> getActiveEmployees() throws MyTeamException;
List<Employee> getActiveEmployees() throws MyTeamException;
List<Employee> getEmployeesByStatus(String status);
List<Employee> getEmployeesByStatus(String status);
List<Account> getAccounts() throws MyTeamException;
List<Account> getAccounts() throws MyTeamException;
Employee getEmployeeRoleDataForSearchCriteria(String searchId, String searchAttribute);
Employee getEmployeeRoleDataForSearchCriteria(String searchId, String searchAttribute);
List<String> getEmployeeDetailsForAutocomplete();
List<String> getEmployeeDetailsForAutocomplete();
List<HashMap<String, String>> getDeliveryLeads(String domainId);
List<HashMap<String, String>> getDeliveryLeads(String domainId);
List<Employee> getEmployeesByFunctionalGrp(String functionalGrp);
List<Employee> getEmployeesByFunctionalGrp(String functionalGrp);
boolean verifyEmployeeRole(String empId, String roleName);
boolean verifyEmployeeRole(String empId, String roleName);
List<Employee> getEmployeesFromList(Set<String> empIdsSet);
List<Employee> getEmployeesFromList(Set<String> empIdsSet);
List<HashMap<String, String>> getDeliveryManagerMap(List deliveryManagerIdsList);
List<HashMap<String, String>> getDeliveryManagerMap(List deliveryManagerIdsList);
public List<Employee> getAllEmployees();
public List<Employee> getAllEmployees();
public List<Employee> getEmployeesByEmpStatusAndShift(String empStatus, String shift);
public List<Employee> getEmployeesByEmpStatusAndShift(String empStatus, String shift);
}
List<BillableEmployee> getEmployeeDetailsByFGAndBillability(String fGroup, String billableStatus);
}
package com.nisum.myteam.service; package com.nisum.myteam.service;
import com.nisum.myteam.exception.handler.MyTeamException; import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.dao.Employee; import com.nisum.myteam.model.dao.Employee;
import com.nisum.myteam.model.dao.Resource; import com.nisum.myteam.model.dao.Resource;
import com.nisum.myteam.model.vo.EmployeeShiftsVO; import com.nisum.myteam.model.vo.EmployeeShiftsVO;
import com.nisum.myteam.model.vo.MyProjectAllocationVO; import com.nisum.myteam.model.vo.MyProjectAllocationVO;
import com.nisum.myteam.model.vo.ReserveReportsVO; import com.nisum.myteam.model.vo.ReserveReportsVO;
import com.nisum.myteam.model.vo.ResourceVO; import com.nisum.myteam.model.vo.ResourceVO;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set;
public interface IResourceService {
public interface IResourceService {
Resource addResource(Resource resourceAllocation, String loginEmpId) throws MyTeamException;
Resource addResource(Resource resourceAllocation, String loginEmpId) throws MyTeamException;
public void updateExistedResource(Resource resourceAlloc) throws MyTeamException;
public void updateExistedResource(Resource resourceAlloc) throws MyTeamException;
public void insertNewResourceWithNewStatus(Resource resourceAllocReq, String loginEmpId) throws MyTeamException;
public void insertNewResourceWithNewStatus(Resource resourceAllocReq, String loginEmpId) throws MyTeamException;
void deleteResource(Resource resource, String loginEmpId);
void deleteResource(Resource resource, String loginEmpId);
List<Resource> getAllResourcesForAllActiveProjects();
List<Resource> getAllResourcesForAllActiveProjects();
List<Resource> getResourcesSortByBillingStartDate(String employeeId);
List<Resource> getResourcesSortByBillingStartDate(String employeeId);
List<ResourceVO> getActiveResources(String empId);
List<ResourceVO> getActiveResources(String empId);
public List<ResourceVO> getResourcesForProject(String projectId, String statusFlag);
public List<ResourceVO> getResourcesForProject(String projectId, String statusFlag);
public List<Resource> getResourcesUnderDeliveryLead(String empId);
public List<Resource> getResourcesUnderDeliveryLead(String empId);
public List<ResourceVO> getBillingsForEmployee(String empId);
public List<ResourceVO> getBillingsForEmployee(String empId);
public List<Resource> getBillingsForProject(String empId, String projectId);
public List<Resource> getBillingsForProject(String empId, String projectId);
public List<MyProjectAllocationVO> getWorkedProjectsForResource(String empId);
public List<MyProjectAllocationVO> getWorkedProjectsForResource(String empId);
public List<Employee> getUnAssignedEmployees();
public List<Employee> getUnAssignedEmployees();
public List<Resource> getAllResources();
public List<Resource> getAllResources();
public List<ResourceVO> getAllResourcesVO();
public List<ResourceVO> getAllResourcesVO();
public void deleteResourcesUnderProject(String projectId);
public void deleteResourcesUnderProject(String projectId);
public Resource addResourceToBenchProject(Employee employee, String loginEmpId) throws MyTeamException;
public Resource addResourceToBenchProject(Employee employee, String loginEmpId) throws MyTeamException;
public List<EmployeeShiftsVO> getResourcesForShift(String shift);
public List<EmployeeShiftsVO> getResourcesForShift(String shift);
public Resource getLatestResourceByEmpId(String employeeId);
public Resource getLatestResourceByEmpId(String employeeId);
public List<Resource> getResourcesByBillingStatus(String resourceStatus);
public List<Resource> getResourcesByBillingStatus(String resourceStatus);
public List<ReserveReportsVO> prepareReserveReports(List<Resource> resourcesList);
public List<ReserveReportsVO> prepareReserveReports(List<Resource> resourcesList);
public List<ReserveReportsVO> getResourceReportsByBillingStatus(String resourceStatus);
public List<ReserveReportsVO> getResourceReportsByBillingStatus(String resourceStatus);
// List<Resource> getAllResourcesForProject(String projectId, String status); Set<Resource> findByBillableStatus(String billableStatus);
// List<Resource> getResourcesForEmployee(String empId);
// List<Resource> getAllResourcesForProject(String projectId, String status);
// List<Resource> getAllResourcesForProject(String projectId);
// List<Resource> getResourcesForEmployee(String empId);
// Resource save(Resource resource);
// List<Resource> getAllResourcesForProject(String projectId);
// void addResources(Employee employee, String loginEmpId);
// Resource save(Resource resource);
// void inactivateResource(Employee employeeReq, Employee employeeUpdated, String loginEmpId);
// void addResources(Employee employee, String loginEmpId);
}
// void inactivateResource(Employee employeeReq, Employee employeeUpdated, String loginEmpId);
}
...@@ -2,16 +2,16 @@ server.port=8080 ...@@ -2,16 +2,16 @@ server.port=8080
server.context-path=/myTeam/ server.context-path=/myTeam/
#Production configuration #Production configuration
#spring.data.mongodb.host=10.3.45.11 spring.data.mongodb.host=10.3.45.11
#spring.data.mongodb.port=27017 spring.data.mongodb.port=27017
#spring.data.mongodb.database=mytimedb spring.data.mongodb.database=mytimedb
#spring.data.mongodb.username=mytime spring.data.mongodb.username=mytime
#spring.data.mongodb.password=nisum@123 spring.data.mongodb.password=nisum@123
#Local Database configuration #Local Database configuration
spring.data.mongodb.host=localhost #spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017 #spring.data.mongodb.port=27017
spring.data.mongodb.database=myTeamDB #spring.data.mongodb.database=myTeamDB
quartz.enabled=true quartz.enabled=true
cron.expression=0 45 10/3 1/1 * ? * cron.expression=0 45 10/3 1/1 * ? *
......
...@@ -18,16 +18,16 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid ...@@ -18,16 +18,16 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid
enableFiltering: true, enableFiltering: true,
enableHorizontalScrollbar:1, enableHorizontalScrollbar:1,
columnDefs : [ columnDefs : [
{field : 'employeeId',displayName: 'Employee Id', enableColumnMenu: false, enableSorting: false,enableFiltering: true,width:100}, {field : 'employeeId',displayName: 'Emp Id', enableColumnMenu: false, enableSorting: false,enableFiltering: true,width:100},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:200}, {field : 'employeeName',displayName: 'Emp Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:200},
{name : ' prevAccountName', displayName: 'Previous Client', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:100}, {name : 'prevAccountName', displayName: 'Prev Client', enableColumnMenu: false, enableSorting: false, enableFiltering:true, width:100},
{field : 'prevProjectName',displayName: 'Previous Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true, width:150}, {field : 'prevProjectName',displayName: 'Prev Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true, width:150},
{name : 'prevBillableStatus', displayName: 'Previous Billability', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:100}, {name : 'prevBillableStatus', displayName: 'Prev Billability', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:100},
{name : 'prevBillingStartDate', displayName: 'Previous Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:150}, {name : 'prevBillingStartDate', displayName: 'Prev Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:150},
{name : 'prevBillingEndDate', displayName: 'Previous Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150}, {name : 'prevBillingEndDate', displayName: 'Prev Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150},
{name : 'currentAccountName', displayName: 'Current Client', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:100}, {name : 'currentAccountName', displayName: 'Current Client', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:100},
{name : 'currentBillableStatus', displayName: 'Current Billability', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:100}, {name : 'currentBillableStatus', displayName: 'Current Billability', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:100},
{field : 'currentProjectName',displayName: 'Current Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:150}, {field : 'currentProjectName',displayName: 'Current Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:150},
{name : 'currentBillingStartDate', displayName: 'Current Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150}, {name : 'currentBillingStartDate', displayName: 'Current Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150},
{name : 'currentBillingEndDate', displayName: 'Current Billing End Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150}, {name : 'currentBillingEndDate', displayName: 'Current Billing End Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150},
...@@ -36,12 +36,12 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid ...@@ -36,12 +36,12 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid
enableSelectAll: true, enableSelectAll: true,
exporterMenuExcel:false, exporterMenuExcel:false,
exporterMenuCsv:false, exporterMenuCsv:false,
exporterCsvFilename: 'EmployeeEfforts.csv', exporterCsvFilename: 'AllocationChange.csv',
exporterExcelFilename:'EmployeeEfforts', exporterExcelFilename:'Allocation Change',
exporterPdfDefaultStyle: {fontSize: 9}, exporterPdfDefaultStyle: {fontSize: 9},
exporterPdfTableStyle: {margin: [15, 15, 15, 15]}, exporterPdfTableStyle: {margin: [15, 15, 15, 15]},
exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
exporterPdfHeader: { text: "Employee Efforts", style: 'headerStyle' }, exporterPdfHeader: { text: "Allocation Change Report", style: 'headerStyle' },
exporterPdfFooter: function ( currentPage, pageCount ) { exporterPdfFooter: function ( currentPage, pageCount ) {
return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
}, },
......
...@@ -91,10 +91,13 @@ myApp.directive('hcPieChart', function () { ...@@ -91,10 +91,13 @@ myApp.directive('hcPieChart', function () {
$scope.getMyTeamDetails = function(seriesName, category, optionName,title){ $scope.getMyTeamDetails = function(seriesName, category, optionName,title){
if(title.trim() == 'Employees Overview Report'){ if(title.trim() == 'Billability By Functional Group'){
if(category=='I&A'){
category = 'I%26A';
}
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "/reports/fetchEmployeeDetailsByFG?fGroup="+optionName url : appConfig.appUri + "reports/fetchEmployeeDetailsByFGAndBillability?fGroup="+category+"&billableStatus="+seriesName
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
$scope.gridOptions.data = response.data; $scope.gridOptions.data = response.data;
if(response.data.length > 10){ if(response.data.length > 10){
......
...@@ -512,6 +512,9 @@ i.fa.fa-refresh:hover { ...@@ -512,6 +512,9 @@ i.fa.fa-refresh:hover {
height: auto !important; height: auto !important;
max-height: calc(350px - 20px); max-height: calc(350px - 20px);
} */ } */
.ui-grid-icon-cancel{
color:black;
}
md-toolbar._md-toolbar-transitions { md-toolbar._md-toolbar-transitions {
min-height: 50px !important; min-height: 50px !important;
} }
......
...@@ -17,7 +17,7 @@ function($mdDateLocaleProvider) { ...@@ -17,7 +17,7 @@ function($mdDateLocaleProvider) {
myApp.constant('appConfig', { myApp.constant('appConfig', {
appName: "MyTime", appName: "MyTime",
//appUri: "http://10.3.45.11:8080/myTeam/", // appUri: "http://10.3.45.11:8080/myTeam/",
appUri: "http://localhost:8080/myTeam/", appUri: "http://localhost:8080/myTeam/",
version:"1.0", version:"1.0",
empStartId:16001, empStartId:16001,
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
function renderButton() { function renderButton() {
gapi.load('auth2', function () { gapi.load('auth2', function () {
gapi.auth2.init({ gapi.auth2.init({
//client_id: "951338644595-32q4i4n2rv4jevvteq77m7jpcq9sbrec.apps.googleusercontent.com",
client_id: "685521475239-ujm7l2hkgrltk7loi8efl0ed702asm2r.apps.googleusercontent.com", client_id: "685521475239-ujm7l2hkgrltk7loi8efl0ed702asm2r.apps.googleusercontent.com",
//client_id: "951338644595-32q4i4n2rv4jevvteq77m7jpcq9sbrec.apps.googleusercontent.com",
hosted_domain: 'nisum.com' hosted_domain: 'nisum.com'
}); });
}); });
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
} }
</script> </script>
<script src="https://apis.google.com/js/platform.js?onload=renderButton"></script> <script src="https://apis.google.com/js/platform.js?onload=renderButton"></script>
<!--<meta name="google-signin-client_id" content="10230597574-gv1bg8nehm0a63n9hh5mu9um563uqaq1.apps.googleusercontent.com">-->
<meta name="google-signin-client_id" content="685521475239-ujm7l2hkgrltk7loi8efl0ed702asm2r.apps.googleusercontent.com"> <meta name="google-signin-client_id" content="685521475239-ujm7l2hkgrltk7loi8efl0ed702asm2r.apps.googleusercontent.com">
<!--<meta name="google-signin-client_id" content="951338644595-32q4i4n2rv4jevvteq77m7jpcq9sbrec.apps.googleusercontent.com">--> <!--<meta name="google-signin-client_id" content="951338644595-32q4i4n2rv4jevvteq77m7jpcq9sbrec.apps.googleusercontent.com">-->
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<tr ng-show="empBillableStatus"> <tr ng-show="empBillableStatus">
<td class="Employee">{{empBillableStatus}} Start Date </td> <td class="Employee">{{empBillableStatus}} Start Date </td>
<td> <td>
<md-datepicker ng-model="newBillingStartDate" md-placeholder="Plase select Date " id="newBillingStartDate " md-min-date="minDate " <md-datepicker ng-model="newBillingStartDate" md-placeholder="Please select Date " id="newBillingStartDate " md-min-date="minDate "
md-max-date="maxDate " onkeydown="return false " ng-change="currentBillabilityDateChange()" name="newBillingStartDate"></md-datepicker> md-max-date="maxDate " onkeydown="return false " ng-change="currentBillabilityDateChange()" name="newBillingStartDate"></md-datepicker>
</td> </td>
</tr> </tr>
......
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