Commit 236ee698 authored by Vijay Akula's avatar Vijay Akula

Resolved conflicts

parents 22239759 d7162062
...@@ -40,9 +40,10 @@ public class AccountController { ...@@ -40,9 +40,10 @@ public class AccountController {
respDetails = new ResponseDetails(new Date(), AccountStatus.CREATE.getCode(), AccountStatus.CREATE.getMessage(), respDetails = new ResponseDetails(new Date(), AccountStatus.CREATE.getCode(), AccountStatus.CREATE.getMessage(),
"Account description", null, request.getContextPath(), "details", accountPersisted); "Account description", null, request.getContextPath(), "details", accountPersisted);
} }else {
respDetails = new ResponseDetails(new Date(), AccountStatus.ALREADY_EXISTED.getCode(), AccountStatus.ALREADY_EXISTED.getMessage(), respDetails = new ResponseDetails(new Date(), AccountStatus.ALREADY_EXISTED.getCode(), AccountStatus.ALREADY_EXISTED.getMessage(),
"Choose the different account name", null, request.getRequestURI(), "details", account); "Choose the different account name", null, request.getRequestURI(), "details", account);
}
return new ResponseEntity<ResponseDetails>(respDetails, HttpStatus.OK); return new ResponseEntity<ResponseDetails>(respDetails, HttpStatus.OK);
} }
......
package com.nisum.myteam.controller;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.EmployeeEfforts;
import com.nisum.myteam.service.IEmployeeEffortsService;
@RestController
@RequestMapping("/employeeEfforts")
public class EmployeeEffortsController {
@Autowired
private IEmployeeEffortsService employeeEffortService;
@RequestMapping(value = "getWeeklyReport", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<EmployeeEfforts>> employeeLoginsBasedOnDate(
@RequestParam("fromDate") String fromDate, @RequestParam("toDate") String toDate) throws MyTeamException {
List<EmployeeEfforts> employeeEffortsList = new ArrayList<>();
try {
employeeEffortsList = employeeEffortService.getEmployeeEffortsReport(fromDate, toDate);
} catch (Exception e) {
e.printStackTrace();
}
return new ResponseEntity<>(employeeEffortsList, HttpStatus.OK);
}
}
...@@ -52,7 +52,7 @@ public class ResourceAllocationController { ...@@ -52,7 +52,7 @@ public class ResourceAllocationController {
if (!resourceAllocService.isResourceAssignedToAnyProject(resourceAllocationReq)) { if (!resourceAllocService.isResourceAssignedToAnyProject(resourceAllocationReq)) {
ResourceAllocation resourcePersisted = resourceAllocService.addResourceAllocation(resourceAllocationReq, loginEmpId); ResourceAllocation resourcePersisted = resourceAllocService.addResourceAllocation(resourceAllocationReq, loginEmpId);
ResponseDetails createResponseDetails = new ResponseDetails(new Date(), 601, "Resource has been created", ResponseDetails createResponseDetails = new ResponseDetails(new Date(), 800, "Resource has been created",
"Resource description", null, request.getContextPath(), "details", resourcePersisted); "Resource description", null, request.getContextPath(), "details", resourcePersisted);
return new ResponseEntity<ResponseDetails>(createResponseDetails, HttpStatus.OK); return new ResponseEntity<ResponseDetails>(createResponseDetails, HttpStatus.OK);
...@@ -61,12 +61,12 @@ public class ResourceAllocationController { ...@@ -61,12 +61,12 @@ public class ResourceAllocationController {
} }
} }
ResponseDetails responseDetails = new ResponseDetails(new Date(), 602, resourceAllocService.respMap.get("message").toString(), ResponseDetails responseDetails = new ResponseDetails(new Date(), resourceAllocService.respMap.get("statusCode").toString(), resourceAllocService.respMap.get("message").toString(),
"Error message desc", null, request.getRequestURI(), "Resource details", resourceAllocationReq); "Error message desc", null, request.getRequestURI(), "Resource details", resourceAllocationReq);
return new ResponseEntity<ResponseDetails>(responseDetails, HttpStatus.OK); return new ResponseEntity<ResponseDetails>(responseDetails, HttpStatus.OK);
} }
ResponseDetails responseDetails = new ResponseDetails(new Date(), 602, "Please provide the valid Employee Id", ResponseDetails responseDetails = new ResponseDetails(new Date(), 820, "Please provide the valid Employee Id",
"Employee Id is not valid", null, request.getRequestURI(), "Resource details", resourceAllocationReq); "Employee Id is not valid", null, request.getRequestURI(), "Resource details", resourceAllocationReq);
return new ResponseEntity<ResponseDetails>(responseDetails, HttpStatus.OK); return new ResponseEntity<ResponseDetails>(responseDetails, HttpStatus.OK);
...@@ -85,11 +85,11 @@ public class ResourceAllocationController { ...@@ -85,11 +85,11 @@ public class ResourceAllocationController {
resourceAllocService.updateResource(resourceAllocationReq, loginEmpId); resourceAllocService.updateResource(resourceAllocationReq, loginEmpId);
} }
ResponseDetails createResponseDetails = new ResponseDetails(new Date(), 601, resourceAllocService.respMap.get("message").toString(), ResponseDetails createResponseDetails = new ResponseDetails(new Date(), resourceAllocService.respMap.get("statusCode").toString(), resourceAllocService.respMap.get("message").toString(),
"Resource description", null, request.getContextPath(), "Resource details", resourceAllocationReq); "Resource description", null, request.getContextPath(), "Resource details", resourceAllocationReq);
return new ResponseEntity<ResponseDetails>(createResponseDetails, HttpStatus.OK); return new ResponseEntity<ResponseDetails>(createResponseDetails, HttpStatus.OK);
} }
ResponseDetails responseDetails = new ResponseDetails(new Date(), 602, "Please provide the valid Employee Id", ResponseDetails responseDetails = new ResponseDetails(new Date(), 820, "Please provide the valid Employee Id",
"Employee Id is not valid", null, request.getRequestURI(), "Resource details", resourceAllocationReq); "Employee Id is not valid", null, request.getRequestURI(), "Resource details", resourceAllocationReq);
return new ResponseEntity<ResponseDetails>(responseDetails, HttpStatus.OK); return new ResponseEntity<ResponseDetails>(responseDetails, HttpStatus.OK);
} }
......
package com.nisum.myteam.model;
import java.io.Serializable;
import org.springframework.data.annotation.Id;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class EmployeeEfforts implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String id;
private String employeeId;
private String employeeName;
private String totalHoursSpentInWeek;
private String projectName;
private String accountName;
private String functionalOrg;
}
...@@ -52,7 +52,7 @@ public class LeaveNotificationScheduler { ...@@ -52,7 +52,7 @@ public class LeaveNotificationScheduler {
private IFunctionalGroupService functionalGroupService; private IFunctionalGroupService functionalGroupService;
//@Scheduled(cron = "0 * * * * ?") //@Scheduled(cron = "0 * * * * ?")
//@Scheduled(cron = "00 50 15 * * 1-5") //@Scheduled(cron = "00 50 15 * * 1-5")
public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException { public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException {
//Shift 1(9:00 AM - 6:00 PM) //Shift 1(9:00 AM - 6:00 PM)
...@@ -94,7 +94,7 @@ public class LeaveNotificationScheduler { ...@@ -94,7 +94,7 @@ public class LeaveNotificationScheduler {
private void sendMailToAbsentees(String shift) throws IOException, MessagingException, MyTeamException { private void sendMailToAbsentees(String shift) throws IOException, MessagingException, MyTeamException {
Mail mail = new Mail(); Mail mail = new Mail();
mail.setFrom(environment.getProperty("email.leave.notification.from")); mail.setFrom(environment.getProperty("email.leave.notification.from"));
mail.setSubject(environment.getProperty("email.leave.notification.subject")); mail.setSubject(environment.getProperty("email.leave.notification.subject"));
...@@ -111,30 +111,27 @@ public class LeaveNotificationScheduler { ...@@ -111,30 +111,27 @@ public class LeaveNotificationScheduler {
List<AttendenceData> absentiesList = attendenceList.stream() List<AttendenceData> absentiesList = attendenceList.stream()
.filter(attendance -> attendance.getPresent().equalsIgnoreCase(MyTeamUtils.ABSENT)).collect(Collectors.toList()); .filter(attendance -> attendance.getPresent().equalsIgnoreCase(MyTeamUtils.ABSENT)).collect(Collectors.toList());
for (AttendenceData absentee : absentiesList) { for (AttendenceData absentee : absentiesList) {
//model.put("employeeName", );//mail.setModel(model); //model.put("employeeName", );//mail.setModel(model);
employee = employeeService.getEmployeeById(absentee.getEmployeeId()); employee = employeeService.getEmployeeById(absentee.getEmployeeId());
empSubStatus = employee.getEmpSubStatus(); empSubStatus = employee.getEmpSubStatus();
if(empSubStatus==null) if(empSubStatus==null)
empSubStatus=""; empSubStatus="";
if (employee.getEmpStatus().equalsIgnoreCase(EmployeeStatus.ACTIVE.getStatus()) && ( !empSubStatus.equalsIgnoreCase(EmpSubStatus.LONG_LEAVE.getLeaveType()) &&
if (employee.getEmpStatus().equalsIgnoreCase(EmployeeStatus.ACTIVE.getStatus()) && !empSubStatus.equalsIgnoreCase(EmpSubStatus.LONG_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.MATERNITY_LEAVE.getLeaveType()) && !empSubStatus.equalsIgnoreCase(EmpSubStatus.MATERNITY_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType())) { !empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType()))) {
logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId()); logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId());
//mail.setEmpName(absentee.getEmployeeName()); //mail.setEmpName(absentee.getEmployeeName());
//mail.setTo(absentee.getEmailId()); //mail.setTo(absentee.getEmailId());
mail.setEmpName("Vijay"); mail.setEmpName("Prayas");
mail.setTo("vakula@nisum.com"); mail.setTo("pjain@nisum.com");
functionalGroup = functionalGroupService.getFunctionalGroup(employee.getFunctionalGroup()); functionalGroup = functionalGroupService.getFunctionalGroup(employee.getFunctionalGroup());
//mail.setCc(new String[]{functionalGroup.getGroupHeadEmailId()}); //mail.setCc(new String[]{functionalGroup.getGroupHeadEmailId()});
mail.setCc(new String[]{"mduppanapudi@nisum.com"}); mail.setCc(new String[]{"prayasjain21@gmail.com"});
mailService.sendLeaveNotification(mail); mailService.sendLeaveNotification(mail);
} }
......
package com.nisum.myteam.service;
import java.sql.SQLException;
import java.util.List;
import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.EmployeeEfforts;
public interface IEmployeeEffortsService {
List<EmployeeEfforts> getEmployeeEffortsReport(String fromDate, String toDate) throws MyTeamException, SQLException;
}
...@@ -46,7 +46,6 @@ public interface IProjectService { ...@@ -46,7 +46,6 @@ public interface IProjectService {
public List<HashMap<Object, Object>> deliveryLeadProjects(String empId) throws MyTeamException; public List<HashMap<Object, Object>> deliveryLeadProjects(String empId) throws MyTeamException;
public Account getProjectAccount(String accountId); public Account getProjectAccount(String accountId);
public Account updateProjSeqinAccount(Account account) throws MyTeamException; public Account updateProjSeqinAccount(Account account) throws MyTeamException;
...@@ -57,7 +56,6 @@ public interface IProjectService { ...@@ -57,7 +56,6 @@ public interface IProjectService {
public List<Project> getActiveProjects() throws MyTeamException; public List<Project> getActiveProjects() throws MyTeamException;
public List<Project> getProjectsForDeliveryLead(String deliveryLeadId); public List<Project> getProjectsForDeliveryLead(String deliveryLeadId);
List<Resource> getResourcesUnderProject(String empId); List<Resource> getResourcesUnderProject(String empId);
......
package com.nisum.myteam.service.impl;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Time;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.nisum.myteam.configuration.DbConnection;
import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.EmployeeEfforts;
import com.nisum.myteam.service.IEmployeeEffortsService;
import com.nisum.myteam.utils.MyTeamLogger;
import com.nisum.myteam.utils.MyTeamUtils;
@Component
@Transactional
public class EmployeeEffortsService implements IEmployeeEffortsService {
@Autowired
DbConnection dbConnection;
@Override
public List<EmployeeEfforts> getEmployeeEffortsReport(String fromDate, String toDate)
throws MyTeamException, SQLException {
String query = null;
query = MyTeamUtils.EMPLOYEE_EFFORTS_QUERY + "'" + fromDate.replace("-", "/") + "'"
+ MyTeamUtils.EMPLOYEE_EFFORTS_QUERY1 + "'" + toDate.replace("-", "/") + "'"
+ MyTeamUtils.EMPLOYEE_EFFORTS_QUERY2;
List<EmployeeEfforts> listOfEmpEffortsData = getEmployeeEfforts(query);
return listOfEmpEffortsData;
}
private List<EmployeeEfforts> getEmployeeEfforts(String query) {
List<EmployeeEfforts> listOfEmpEffortsData = new ArrayList<>();
try (Connection connection = dbConnection.getDBConnection();
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(query.toString())) {
while (resultSet.next()) {
EmployeeEfforts employeeEfforts = new EmployeeEfforts();
employeeEfforts.setEmployeeId(resultSet.getString("EmployeeCode"));
employeeEfforts.setEmployeeName(resultSet.getString("FirstName"));
employeeEfforts.setTotalHoursSpentInWeek(resultSet.getString("TotalHoursInWeek") + ':' + resultSet.getString("TotalMinutesInWeek"));
listOfEmpEffortsData.add(employeeEfforts);
}
} catch (Exception e) {
e.printStackTrace();
MyTeamLogger.getInstance().error(e.getMessage());
}
return listOfEmpEffortsData;
}
}
...@@ -59,6 +59,7 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -59,6 +59,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
isExists = true; isExists = true;
} }
respMap.put("statusCode", 810);
respMap.put("message", "Resource Not Found"); respMap.put("message", "Resource Not Found");
return isExists; return isExists;
} }
...@@ -68,6 +69,7 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -68,6 +69,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
if (resourceAlloc != null) { if (resourceAlloc != null) {
ResourceAllocation resourcePers = resourceAllocationRepo.save(resourceAlloc); ResourceAllocation resourcePers = resourceAllocationRepo.save(resourceAlloc);
respMap.put("statusCode", 801);
respMap.put("message", "resource has been updated"); respMap.put("message", "resource has been updated");
respMap.put("resourceObj", resourcePers); respMap.put("resourceObj", resourcePers);
...@@ -104,12 +106,14 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -104,12 +106,14 @@ public class ResourceAllocationService implements IResourceAllocationService {
if (!resourceAllocation.getBillingStartDate().after(project.getProjectStartDate())) { if (!resourceAllocation.getBillingStartDate().after(project.getProjectStartDate())) {
log.info("Billing start date should be after Project start date"); log.info("Billing start date should be after Project start date");
respMap.put("statusCode", 811);
respMap.put("message", "Billing start date should be after Project start date"); respMap.put("message", "Billing start date should be after Project start date");
isValid = false; isValid = false;
} }
if (!resourceAllocation.getBillingStartDate().before(resourceAllocation.getBillingEndDate())) { if (!resourceAllocation.getBillingStartDate().before(resourceAllocation.getBillingEndDate())) {
log.info("Billing start date should be before Billing End Date."); log.info("Billing start date should be before Billing End Date.");
respMap.put("statusCode", 812);
respMap.put("message", "Billing start date should be before Billing End Date."); respMap.put("message", "Billing start date should be before Billing End Date.");
isValid = false; isValid = false;
} }
...@@ -118,6 +122,7 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -118,6 +122,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
if (!resourceAllocation.getBillingEndDate().before(project.getProjectEndDate())) { if (!resourceAllocation.getBillingEndDate().before(project.getProjectEndDate())) {
log.info("Billing end date should be before Project End Date."); log.info("Billing end date should be before Project End Date.");
respMap.put("statusCode", 813);
respMap.put("message", "Billing end date should be before Project End Date."); respMap.put("message", "Billing end date should be before Project End Date.");
isValid = false; isValid = false;
} }
...@@ -138,6 +143,7 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -138,6 +143,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
+ projectService.getProjectByProjectId(resource.getProjectId()).getProjectName() + projectService.getProjectByProjectId(resource.getProjectId()).getProjectName()
+ " project should not be before Date of Joining ( " + empDoj + ")."; + " project should not be before Date of Joining ( " + empDoj + ").";
isValid = false; isValid = false;
respMap.put("statusCode", 814);
respMap.put("message", message); respMap.put("message", message);
} }
return isValid; return isValid;
...@@ -160,6 +166,7 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -160,6 +166,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
+ projectService.getProjectByProjectId(resourceAllocPrev.getProjectId()).getProjectName() + projectService.getProjectByProjectId(resourceAllocPrev.getProjectId()).getProjectName()
+ " Project" + " from " + resourceAllocPrev.getBillingStartDate() + "to " + resourceAllocPrev.getBillingEndDate(); + " Project" + " from " + resourceAllocPrev.getBillingStartDate() + "to " + resourceAllocPrev.getBillingEndDate();
isAssigned = true; isAssigned = true;
respMap.put("statusCode", 815);
respMap.put("message", message); respMap.put("message", message);
} }
return isAssigned; return isAssigned;
...@@ -168,6 +175,7 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -168,6 +175,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
public void updateResource(ResourceAllocation resourceAllocReq, String loginEmpId) throws MyTeamException { public void updateResource(ResourceAllocation resourceAllocReq, String loginEmpId) throws MyTeamException {
ResourceAllocation resourceAllocationPers = resourceAllocationRepo.save(resourceAllocReq); ResourceAllocation resourceAllocationPers = resourceAllocationRepo.save(resourceAllocReq);
respMap.put("statusCode", 801;
respMap.put("message", "Resource updated successfully"); respMap.put("message", "Resource updated successfully");
respMap.put("resourceObj", resourceAllocationPers); respMap.put("resourceObj", resourceAllocationPers);
......
...@@ -88,7 +88,17 @@ public class MyTeamUtils { ...@@ -88,7 +88,17 @@ public class MyTeamUtils {
public final static String ABESENT_STATUS_QUERY1 =" and convert(varchar,tr.aDateTime, 111) <= "; public final static String ABESENT_STATUS_QUERY1 =" and convert(varchar,tr.aDateTime, 111) <= ";
public final static String ABESENT_STATUS_QUERY2 =" and emp.EmployeeCode = "; public final static String ABESENT_STATUS_QUERY2 =" and emp.EmployeeCode = ";
public final static String ABESENT_STATUS_QUERY3 =" group by convert(varchar,tr.aDateTime, 111), emp.EmployeeCode, emp.FirstName"; public final static String ABESENT_STATUS_QUERY3 =" group by convert(varchar,tr.aDateTime, 111), emp.EmployeeCode, emp.FirstName";
public final static String EMPLOYEE_EFFORTS_QUERY = "Select EmployeeCode, FirstName, SUM(MinutesInOffice)/60 TotalHoursInWeek ,"
+ "SUM(MinutesInOffice)%60 TotalMinutesInWeek FROM(select emp.EmployeeCode,emp.FirstName, "
+ "DATEDIFF(MINUTE, MIN(tr.aDateTime),MAX(tr.aDateTime)) MinutesInOffice "
+" from [Transactions] as tr,EmployeeMaster as emp "+
" where tr.EmployeemasterID=emp.EmployeeMasterID and convert(varchar,tr.aDateTime, 111) >=";
public final static String EMPLOYEE_EFFORTS_QUERY1 = " and convert(varchar,tr.aDateTime, 111) <=";
public final static String EMPLOYEE_EFFORTS_QUERY2 = " group by convert(varchar,tr.aDateTime, 111), emp.EmployeeCode, emp.FirstName)"
+"A Group by EmployeeCode, FirstName HAVING SUM(MinutesInOffice) >=3000";
public final static String UNION=" Union "; public final static String UNION=" Union ";
//public final static String PRESENT_QUERY = "SELECT DISTINCT Emp.EmployeeCode, Emp.FirstName FROM Transactions AS Tr, EmployeeMaster AS Emp WHERE Tr.EmployeemasterID = Emp.EmployeeMasterID AND CONVERT(VARCHAR,Tr.aDateTime, 111) = '<REPORTDATE>' AND Emp.EmployeeCode IN (<EMPIDS>)"; //public final static String PRESENT_QUERY = "SELECT DISTINCT Emp.EmployeeCode, Emp.FirstName FROM Transactions AS Tr, EmployeeMaster AS Emp WHERE Tr.EmployeemasterID = Emp.EmployeeMasterID AND CONVERT(VARCHAR,Tr.aDateTime, 111) = '<REPORTDATE>' AND Emp.EmployeeCode IN (<EMPIDS>)";
......
...@@ -59,7 +59,7 @@ email.leave.notification.subject=Employee Leave Email Notification ...@@ -59,7 +59,7 @@ email.leave.notification.subject=Employee Leave Email Notification
#spring.thymeleaf.suffix=/WEB-INF/thymeleaf/templates/ #spring.thymeleaf.suffix=/WEB-INF/thymeleaf/templates/
#spring.thymeleaf.prefix=.html #spring.thymeleaf.prefix=.html
#spring.thymeleaf.view-names:thymeleaf/* #spring.thymeleaf.view-names:thymeleaf/*
#spring.thymeleaf.view-names:thymeleaf/* spring.thymeleaf.view-names:thymeleaf/*
email.project.notification.template.file.path=email/projectMailTemplate.html email.project.notification.template.file.path=email/projectMailTemplate.html
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</tr> </tr>
<tr> <tr>
<td style="line-height: 25px; padding: 15px 20px 20px 20px"><b>NOTE:</b> <br /> <td style="line-height: 25px; padding: 15px 20px 20px 20px"><b>NOTE:</b> <br />
--> Please ignore if already applied.<br /> Please ignore if already applied.<br />
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -31,13 +31,11 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -31,13 +31,11 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
columnDefs : [ columnDefs : [
{field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: false, enableSorting: false,enableFiltering:true, width:100,cellTemplate: getEmpDetTemplate}, {field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: false, enableSorting: false,enableFiltering:true, width:100,cellTemplate: getEmpDetTemplate},
{field : 'employeeName',displayName: 'Employee Name ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:200}, {field : 'employeeName',displayName: 'Employee Name ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:200},
{field : 'domain',displayName: 'Domain', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
{field : 'account',displayName: 'Client', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100}, {field : 'account',displayName: 'Client', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
{field : 'domain',displayName: 'Domain', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
{field : 'projectName',displayName: 'Project', enableColumnMenu: false, enableSorting: false,enableFiltering:false,width:150}, {field : 'projectName',displayName: 'Project', enableColumnMenu: false, enableSorting: false,enableFiltering:false,width:150},
{field : 'startDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150}, {field : 'startDate',displayName: 'Billing Start Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150},
{field : 'endDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150}, {field : 'endDate',displayName: 'Billing End Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150},
{field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
{field : 'emailId',displayName: 'Email Id', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
{field : 'empStatus',displayName: 'Status', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:80}, {field : 'empStatus',displayName: 'Status', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:80},
{field : 'empSubStatus',displayName: 'Sub Status', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:120,cellClass:function(grid,row,col){ {field : 'empSubStatus',displayName: 'Sub Status', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:120,cellClass:function(grid,row,col){
...@@ -53,7 +51,11 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -53,7 +51,11 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
else if(grid.getCellValue(row,col)==='Resigned') { else if(grid.getCellValue(row,col)==='Resigned') {
return 'red'; return 'red';
} }
}} }},
{field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
{field : 'emailId',displayName: 'Email Id', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
...@@ -79,7 +81,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -79,7 +81,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
exporterCsvFilename: 'AbsentDetails.csv', exporterCsvFilename: 'AbsentDetails.csv',
exporterExcelFilename:'Employee Details', exporterExcelFilename:'Employee Details',
exporterPdfDefaultStyle: {fontSize: 9}, exporterPdfDefaultStyle: {fontSize: 9},
exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, 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 Details", style: 'headerStyle' }, exporterPdfHeader: { text: "Employee Details", style: 'headerStyle' },
exporterPdfFooter: function ( currentPage, pageCount ) { exporterPdfFooter: function ( currentPage, pageCount ) {
...@@ -92,7 +94,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -92,7 +94,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
}, },
exporterPdfOrientation: 'portrait', exporterPdfOrientation: 'portrait',
exporterPdfPageSize: 'LETTER', exporterPdfPageSize: 'LETTER',
exporterPdfMaxGridWidth: 500, exporterPdfMaxGridWidth: 400,
exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
onRegisterApi: function(gridApi){ onRegisterApi: function(gridApi){
$scope.gridApi = gridApi; $scope.gridApi = gridApi;
...@@ -140,7 +142,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -140,7 +142,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
$scope.getEmployeesDashBoardData = function(){ $scope.getEmployeesDashBoardData = function(){
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "getEmployeesDashBoard" url : appConfig.appUri + "resources/getEmployeesDashBoard"
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
//alert("response"+response); //alert("response"+response);
// alert("response"+response.data); // alert("response"+response.data);
...@@ -201,7 +203,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -201,7 +203,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
pageSize:10, pageSize:10,
columnDefs : [ columnDefs : [
{field : 'projectName',displayName: 'Project', enableColumnMenu: true, enableSorting: true,minWidth : 100,width: 150}, {field : 'projectName',displayName: 'Project', enableColumnMenu: true, enableSorting: true,minWidth : 100,width: 150},
{field : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: false,minWidth : 100,width: 150}, {field : 'accountName',displayName: 'Account', enableColumnMenu: false, enableSorting: false,minWidth : 100,width: 150},
{field : 'managerName',displayName: 'Manager Name', enableColumnMenu: false, enableSorting: false,minWidth : 100,width: 150}, {field : 'managerName',displayName: 'Manager Name', enableColumnMenu: false, enableSorting: false,minWidth : 100,width: 150},
{field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false, enableSorting: false,minWidth : 100,width: 150}, {field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false, enableSorting: false,minWidth : 100,width: 150},
{field : 'projectStartDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: false, cellFilter: 'date:"dd-MMM-yyyy"',minWidth : 100,width: 150}, {field : 'projectStartDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: false, cellFilter: 'date:"dd-MMM-yyyy"',minWidth : 100,width: 150},
...@@ -271,7 +273,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -271,7 +273,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
}; };
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "billing?employeeId="+$scope.profile.employeeId url : appConfig.appUri + "resources/billing?employeeId="+$scope.profile.employeeId
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
//alert("response"+response); //alert("response"+response);
// alert("response"+response.data); // alert("response"+response.data);
...@@ -281,7 +283,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -281,7 +283,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
}); });
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "getMyProjectAllocations?employeeId="+$scope.profile.employeeId url : appConfig.appUri + "resources/getMyProjectAllocations?employeeId="+$scope.profile.employeeId
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
//alert("response"+response); //alert("response"+response);
// alert("response"+response.data); // alert("response"+response.data);
...@@ -347,4 +349,4 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -347,4 +349,4 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
template: '<select class="form-control" ng-model="colFilter.term" ng-options="option.id as option.value for option in colFilter.options"></select>' template: '<select class="form-control" ng-model="colFilter.term" ng-options="option.id as option.value for option in colFilter.options"></select>'
}; };
}); });
\ No newline at end of file
myApp.controller("assignEmployeeEffortrsController",function($scope, myFactory, $mdDialog, $http, appConfig, $timeout, $element, $window){
$scope.records = [];
$scope.parentData = {
"employeeId": "",
"employeeName": "",
"totalHoursSpent":"",
"projectName":"",
"account":"",
"functionalOrg":""
};
var today = new Date();
var priorDt = new Date(today.getTime() - (6 * 24 * 60 * 60 * 1000));
$scope.maxDate = today;
$scope.toDate = today;
$scope.fromDate = priorDt;
// +'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i ng-show="row.entity.status == \'InActive\'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i><i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="left" title="Delete" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p>';
$scope.gridOptions = {
paginationPageSizes : [10, 20, 30, 40, 50, 100],
paginationPageSize : 10,
pageNumber: 1,
pageSize:10,
enableFiltering: true,
rowHeight:22,
columnDefs : [
{field : 'employeeId',displayName: 'Employee Id', enableColumnMenu: false, enableSorting: false,enableFiltering: true},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
{name : 'totalHoursSpentInWeek', displayName: 'Total Hours(HH:MM)', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width :230},
{field : 'projectName',displayName: 'Project Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
{name : 'account', displayName: 'Account', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{name : 'functionalOrg', displayName: 'Functional Org', enableColumnMenu: false, enableSorting: false, enableFiltering:false}
],
enableGridMenu: true,
enableSelectAll: true,
exporterMenuExcel:false,
exporterMenuCsv:false,
exporterCsvFilename: '.csv',
exporterExcelFilename:'Employee Efforts Details',
exporterPdfDefaultStyle: {fontSize: 9},
exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
exporterPdfHeader: { text: "Employee Efforts Details", style: 'headerStyle' },
exporterPdfFooter: function ( currentPage, pageCount ) {
return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
},
exporterPdfCustomFormatter: function ( docDefinition ) {
docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
return docDefinition;
},
exporterPdfOrientation: 'portrait',
exporterPdfPageSize: 'LETTER',
exporterPdfMaxGridWidth: 800,
exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
onRegisterApi: function(gridApi){
$scope.gridApi = gridApi;
},
gridMenuCustomItems: [{
title: 'Export all data as EXCEL',
action: function ($event) {
exportUiGridService.exportToExcel('sheet 1', $scope.gridApi, 'all', 'all');
},
order: 110
},
{
title: 'Export visible data as EXCEL',
action: function ($event) {
exportUiGridService.exportToExcel('sheet 1', $scope.gridApi, 'visible', 'visible');
},
order: 111
}
]
};
$scope.gridOptions.data = $scope.records;
$scope.getEmployeeEffortsData = function(){
var fromDate = getFormattedDate($scope.fromDate);
var toDate = getFormattedDate($scope.toDate);
$http({
method : "GET",
url : appConfig.appUri + "employeeEfforts/getWeeklyReport?fromDate=" + fromDate + "&toDate=" +toDate
}).then(function mySuccess(response) {
$scope.gridOptions.data = response.data;
if(response.data.length > 10){
$scope.gridOptions.enablePaginationControls = true;
}
else{
$scope.gridOptions.enablePaginationControls = false;
}
}, function myError(response) {
showAlert("Something went wrong while fetching data!!!");
$scope.gridOptions.data = [];
});
}
function getFormattedDate(date){
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
return year + '-' + (month < 10 ? "0" + month : month) + '-'
+ (day < 10 ? "0" + day : day);
}
});
...@@ -217,7 +217,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -217,7 +217,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
}; };
function addEmployee(record){ function addEmployee(record){
var urlRequest = appConfig.appUri+ "user/assignEmployeeRole"; var urlRequest = appConfig.appUri+ "employees/"+myFactory.getEmpId();
var req = { var req = {
method : 'POST', method : 'POST',
url : urlRequest, url : urlRequest,
...@@ -263,6 +263,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -263,6 +263,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"}); menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"}); menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"}); menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
menuItems.push({"menu" : "Employee Efforts","icon" : "fa fa-user-circle-o fa-2x","path" : "templates/employeeEfforts.html"});
}else if(role == "Delivery Lead"){ }else if(role == "Delivery Lead"){
//menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"}); //menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"});
//menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"}); //menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
...@@ -298,6 +299,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -298,6 +299,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"}); menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"}); menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"}); menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
menuItems.push({"menu" : "Employee Efforts ","icon" : "fa fa-user-circle-o fa-2x","path" : "templates/employeeEfforts.html"});
}else if(role == "Lead"){ }else if(role == "Lead"){
menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"}); menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"});
menuItems.push({"menu" : "Reportee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"}); menuItems.push({"menu" : "Reportee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
...@@ -326,6 +328,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -326,6 +328,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"}); menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"}); menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"}); menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Employee Efforts","icon" : "fa fa-user-circle-o fa-2x","path" : "templates/employeeEfforts.html"});
}else{ }else{
menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"}); menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"}); menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
......
...@@ -14,7 +14,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m ...@@ -14,7 +14,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
$scope.employees = []; $scope.employees = [];
$scope.projects = []; $scope.projects = [];
var getCellTemplate = '<div class="ui-grid-cell-contents"><a href="#" ng-click="grid.appScope.getRowData(row,\'View\')">{{COL_FIELD}}</a></div>'; var getCellTemplate = '<div class="ui-grid-cell-contents"><a href="#" ng-click="grid.appScope.getRowData(row,\'View\')">{{COL_FIELD}}</a></div>';
var getCellActiveTemplate='<div ng-show="COL_FIELD==true"><p class="col-lg-12">Active</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">In Active</p></div>'; //var getCellActiveTemplate='<div ng-show="COL_FIELD==true"><p class="col-lg-12">Active</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">In Active</p></div>';
//var getCellTemplate = '<p class="col-lg-12"><i class="fa fa-2x" aria-hidden="true" style="font-size:1.5em;colormargin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,\'Update\')">{{COL_FIELD}}</i></i></p>'; //var getCellTemplate = '<p class="col-lg-12"><i class="fa fa-2x" aria-hidden="true" style="font-size:1.5em;colormargin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,\'Update\')">{{COL_FIELD}}</i></i></p>';
// var getCellActiveTemplate='<div >COL_FIELD<p class="col-lg-12">Y</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">N</p></div>'; // var getCellActiveTemplate='<div >COL_FIELD<p class="col-lg-12">Y</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">N</p></div>';
...@@ -26,13 +26,13 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m ...@@ -26,13 +26,13 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
enableFiltering:true, enableFiltering:true,
columnDefs : [ columnDefs : [
{field : 'projectName',displayName: 'Project',cellTemplate:getCellTemplate, enableColumnMenu: true, enableSorting: true,enableFiltering:true}, {field : 'projectName',displayName: 'Project',cellTemplate:getCellTemplate, enableColumnMenu: true, enableSorting: true,enableFiltering:true},
{field : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: false,enableFiltering:true}, {field : 'accountName',displayName: 'Account', enableColumnMenu: false, enableSorting: false,enableFiltering:true},
{field : 'deliveryLeadIds',displayName: 'Delivery Lead',cellTemplate:'<div ng-repeat= "item in row.entity[col.field]">{{item.employeeName}}<span ng-hide="$last">,</span></div>', enableColumnMenu: false, enableSorting: false,enableFiltering:false}, {field : 'deliveryLeadIds',displayName: 'Delivery Lead',cellTemplate:'<div ng-repeat= "item in row.entity[col.field]">{{item.employeeName}}<span ng-hide="$last">,</span></div>', enableColumnMenu: false, enableSorting: false,enableFiltering:false},
{field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false, enableSorting: false,enableFiltering:false}, {field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false, enableSorting: false,enableFiltering:false},
{field : 'projectStartDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false}, {field : 'billingStartDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false},
{field : 'projectEndDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false}, {field : 'billingEndDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false},
{field : 'shift',displayName: 'Shift', enableColumnMenu: false, enableSorting: false,enableFiltering:false}, {field : 'shift',displayName: 'Shift', enableColumnMenu: false, enableSorting: false,enableFiltering:false},
{field : 'status',displayName: 'Status', enableColumnMenu: false,cellTemplate:getCellActiveTemplate,enableSorting: false,enableFiltering:false} {field : 'resourceStatus',displayName: 'Status', enableColumnMenu: false,enableSorting: false,enableFiltering:false}
] ]
}; };
$scope.gridOptions.data = $scope.records; $scope.gridOptions.data = $scope.records;
...@@ -64,7 +64,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m ...@@ -64,7 +64,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
$scope.getMyProjectAllocations = function(){ $scope.getMyProjectAllocations = function(){
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "getMyProjectAllocations?employeeId="+myFactory.getEmpId() url : appConfig.appUri + "resources/getMyProjectAllocations?employeeId="+myFactory.getEmpId()
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
$scope.gridOptions.data = response.data.records; $scope.gridOptions.data = response.data.records;
if(response.data.records.length > 10){ if(response.data.records.length > 10){
...@@ -117,7 +117,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m ...@@ -117,7 +117,7 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
columnDefs : [ columnDefs : [
{field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: true, enableSorting: true, width:100}, {field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: true, enableSorting: true, width:100},
{field : 'employeeName',displayName: 'Empl Name ', enableColumnMenu: false, enableSorting: false}, {field : 'employeeName',displayName: 'Empl Name ', enableColumnMenu: false, enableSorting: false},
{field : 'role',displayName: 'Role', enableColumnMenu: false, enableSorting: false}, {field : 'resourceRole',displayName: 'Role', enableColumnMenu: false, enableSorting: false},
// {field : 'emailId',displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false}, // {field : 'emailId',displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false},
// {field : 'experience',displayName: 'Exp', enableColumnMenu: true, enableSorting: true,width:80}, // {field : 'experience',displayName: 'Exp', enableColumnMenu: true, enableSorting: true,width:80},
{field : 'designation',displayName: 'Designation ', enableColumnMenu: false, enableSorting: false}, {field : 'designation',displayName: 'Designation ', enableColumnMenu: false, enableSorting: false},
......
...@@ -587,6 +587,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -587,6 +587,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.projectId = dataToPass.projectId; $scope.projectId = dataToPass.projectId;
$scope.projectName = dataToPass.projectName; $scope.projectName = dataToPass.projectName;
$scope.account = dataToPass.account; $scope.account = dataToPass.account;
$scope.projectStartDate = dataToPass.projectStartDate;
$scope.projectEndDate = dataToPass.projectEndDate;
$scope.managerIds=dataToPass.managerIds; $scope.managerIds=dataToPass.managerIds;
$scope.projectStatus = dataToPass.status; $scope.projectStatus = dataToPass.status;
$scope.domain = dataToPass.domain; $scope.domain = dataToPass.domain;
...@@ -617,10 +619,12 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -617,10 +619,12 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
{ field: 'employeeName', displayName: 'Emp Name ', enableColumnMenu: false, enableSorting: false,enableFiltering:true }, { field: 'employeeName', displayName: 'Emp Name ', enableColumnMenu: false, enableSorting: false,enableFiltering:true },
// { field: 'emailId', displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false }, // { field: 'emailId', displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false },
// { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 }, // { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 },
{field: 'role', displayName:'Role', enableColumnMenu: true, enableSorting: false,enableFiltering:false}, {field: 'resourceRole', displayName:'Role', enableColumnMenu: true, enableSorting: false,enableFiltering:false},
{ field: 'designation', displayName: 'Designation ', enableColumnMenu: false, enableSorting: false,enableFiltering:false }, { field: 'designation', displayName: 'Designation ', enableColumnMenu: false, enableSorting: false,enableFiltering:false },
// { field: 'active', displayName: 'Status ', enableColumnMenu: false, enableSorting: false, cellTemplate: getCellActiveTemplate }, // { field: 'active', displayName: 'Status ', enableColumnMenu: false, enableSorting: false, cellTemplate: getCellActiveTemplate },
{ field: 'billableStatus', displayName: 'Billability ', enableColumnMenu: false, enableSorting: false ,enableFiltering:false}, { field: 'billableStatus', displayName: 'Billability ', enableColumnMenu: false, enableSorting: false ,enableFiltering:false},
{ field: 'billingStartDate', displayName: 'Start Date ', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false},
{ field: 'billingEndDate', displayName: 'End Date ', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false},
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false, width:100,enableFiltering: false} {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false, width:100,enableFiltering: false}
] ]
}; };
...@@ -640,10 +644,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -640,10 +644,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
} }
$scope.gridOptions.data = response.data.records; $scope.gridOptions.data = response.data.records;
for(i=0;i<response.data.records.length;i++){ for(i=0;i<response.data.records.length;i++){
if(response.data.records[i].role == 'Lead'){ if(response.data.records[i].resourceRole == 'Lead'){
$scope.gridOptions.data[i].role = "Lead"; $scope.gridOptions.data[i].resourceRole = "Lead";
}else{ }else{
$scope.gridOptions.data[i].role = "Individual Contributor"; $scope.gridOptions.data[i].resourceRole = "Individual Contributor";
} }
} }
}, function myError(response) { }, function myError(response) {
...@@ -679,6 +683,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -679,6 +683,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}; };
$scope.getRowData = function(row, action){ $scope.getRowData = function(row, action){
console.log(row.entity)
$scope.parentData.employeeId = row.entity.employeeId; $scope.parentData.employeeId = row.entity.employeeId;
$scope.parentData.employeeName = row.entity.employeeName; $scope.parentData.employeeName = row.entity.employeeName;
$scope.parentData.emailId = row.entity.emailId; $scope.parentData.emailId = row.entity.emailId;
...@@ -693,9 +698,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -693,9 +698,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.parentData.shift = row.entity.shift; $scope.parentData.shift = row.entity.shift;
$scope.parentData.mobileNumber = row.entity.mobileNumber; $scope.parentData.mobileNumber = row.entity.mobileNumber;
$scope.parentData.employeeModel = {} $scope.parentData.employeeModel = {}
$scope.parentData.newBillingStartDate = row.entity.newBillingStartDate; $scope.parentData.newBillingStartDate = row.entity.billingStartDate;
$scope.parentData.startDate = new Date(row.entity.startDate); $scope.parentData.startDate = new Date(row.entity.startDate);
$scope.parentData.endDate = new Date(row.entity.endDate); $scope.parentData.endDate = new Date(row.entity.billingEndDate);
console.log($scope.parentData)
if(action == "UpdateTeam"){ if(action == "UpdateTeam"){
$scope.updateTeamMate(action, $scope.parentData); $scope.updateTeamMate(action, $scope.parentData);
} }
...@@ -753,7 +759,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -753,7 +759,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// $scope.employeeModel.employeeName = userData.employeeName; // $scope.employeeModel.employeeName = userData.employeeName;
// $scope.employeeModel.emailId = userData.emailId; // $scope.employeeModel.emailId = userData.emailId;
$scope.empBillableStatus = userData.billableStatus; $scope.empBillableStatus = userData.billableStatus;
if(userData.role == "Individual Contributor"){ if(userData.resourceRole == "Individual Contributor"){
$scope.employeeRole = "Employee"; $scope.employeeRole = "Employee";
}else{ }else{
$scope.employeeRole = "Lead"; $scope.employeeRole = "Lead";
...@@ -919,8 +925,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -919,8 +925,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if($scope.templateTitle == "Add"){ if($scope.templateTitle == "Add"){
$('.md-datepicker-input')[0].value = null; $('.md-datepicker-input')[0].value = null;
} }
else{ else{
$('.md-datepicker-input')[3].value = null; $('.md-datepicker-input')[3].value = new Date($scope.projectEndDate).toISOString().slice(0,10);
} }
} }
...@@ -1180,16 +1186,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1180,16 +1186,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}else if($scope.employeeRole == undefined){ }else if($scope.employeeRole == undefined){
$scope.alertMsg = "Please select a employee role"; $scope.alertMsg = "Please select a employee role";
angular.element(document.getElementById('empRole')).focus(); angular.element(document.getElementById('empRole')).focus();
}else if($scope.employeeShift == undefined){
$scope.alertMsg = "Please select a employee shift";
angular.element(document.getElementById('empShift')).focus();
} }
else if($scope.empBillableStatus == undefined){ else if($scope.empBillableStatus == undefined){
$scope.alertMsg = "Please select a billable status"; $scope.alertMsg = "Please select a billable status";
angular.element(document.getElementById('empBillableStatus')).focus(); angular.element(document.getElementById('empBillableStatus')).focus();
}else if($scope.startDate == undefined) {
$scope.alertMsg = "Please select Start Date";
angular.element(document.getElementById('startDate')).focus();
} }
else if($scope.endDate == undefined) { else if($scope.endDate == undefined) {
$scope.alertMsg = "Please select End Date"; $scope.alertMsg = "Please select End Date";
...@@ -1206,7 +1206,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1206,7 +1206,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else if(!(($scope.newBillingStartDate >= new Date(dataToPass.projectStartDate)) && ($scope.newBillingStartDate <= $scope.endDate))){ else if(!(($scope.newBillingStartDate >= new Date(dataToPass.projectStartDate)) && ($scope.newBillingStartDate <= $scope.endDate))){
$scope.alertMsg = $scope.empBillableStatus + " start date should be in between start date and end date"; $scope.alertMsg = $scope.empBillableStatus + " start date should be in between start date and end date";
} }
else if (!(($scope.newBillingStartDate >= $scope.startDate) && ($scope.newBillingStartDate <= $scope.endDate)) && action == "Update"){ else if (!(($scope.newBillingStartDate >= new Date(dataToPass.projectStartDate)) && ($scope.newBillingStartDate <= $scope.endDate)) && action == "Update"){
$scope.alertMsg = $scope.empBillableStatus + " start date should be in between start date and end date"; $scope.alertMsg = $scope.empBillableStatus + " start date should be in between start date and end date";
}else if($scope.endDate > new Date(dataToPass.projectEndDate)){ }else if($scope.endDate > new Date(dataToPass.projectEndDate)){
$scope.alertMsg = "End date should not exceed project end date"; $scope.alertMsg = "End date should not exceed project end date";
...@@ -1214,7 +1214,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1214,7 +1214,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else { else {
$scope.id = $scope.id ? $scope.id : $scope.objectId; $scope.id = $scope.id ? $scope.id : $scope.objectId;
$scope.alertMsg = ""; $scope.alertMsg = "";
var record = {"id":$scope.id,"employeeId":employeeModel.employeeId, "employeeName":employeeModel.employeeName, "emailId": employeeModel.emailId, "designation":employeeModel.designation,"projectId":project,"projectName":projectName,"managerId":managerId,"managerName":managerName,"mobileNumber":employeeModel.mobileNumber,"active":true,"billableStatus":$scope.empBillableStatus,"startDate":$scope.startDate,"endDate":$scope.endDate,"account":account,"role":$scope.employeeRole,"newBillingStartDate":newBillingStartDate,"accountId":$scope.accountId,"domainId":$scope.domainId,"shift":$scope.employeeShift,"projectStartDate":$scope.startDate,"projectEndDate":$scope.endDate}; var record = {"id":$scope.id,"employeeId":employeeModel.employeeId,"projectId":project,"billableStatus":$scope.empBillableStatus,"billingEndDate":$scope.endDate,"resourceRole":$scope.employeeRole,"billingStartDate":newBillingStartDate};
if(action == "Add"){ if(action == "Add"){
addRecord(record,action); addRecord(record,action);
$scope.myForm.$setPristine(); $scope.myForm.$setPristine();
...@@ -1356,7 +1356,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1356,7 +1356,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}; };
$scope.DataUpdate = function () { $scope.DataUpdate = function () {
var data = $scope.parentData; var data = $scope.parentData;
if (data.role == "Individual Contributor") { if (data.resourceRole == "Individual Contributor") {
var roleselected = "Employee"; var roleselected = "Employee";
} else { } else {
roleselected = data.role; roleselected = data.role;
...@@ -1484,10 +1484,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1484,10 +1484,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else if(action == "Add"){ else if(action == "Add"){
$scope.gridOptions.data.push(record); $scope.gridOptions.data.push(record);
for(i=0;i<$scope.gridOptions.data.length;i++){ for(i=0;i<$scope.gridOptions.data.length;i++){
if($scope.gridOptions.data[i].role == 'Lead'){ if($scope.gridOptions.data[i].resourceRole == 'Lead'){
$scope.gridOptions.data[i].role = "Lead"; $scope.gridOptions.data[i].resourceRole = "Lead";
}else{ }else{
$scope.gridOptions.data[i].role = "Individual Contributor"; $scope.gridOptions.data[i].resourceRole = "Individual Contributor";
} }
} }
} }
...@@ -1501,7 +1501,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1501,7 +1501,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
function addRecord(record, action){ function addRecord(record, action){
var urlRequest = ""; var urlRequest = "";
var loginEmpId = myFactory.getEmpId(); var loginEmpId = myFactory.getEmpId();
urlRequest = appConfig.appUri+ "addEmployeeToTeamWithCheck?loginEmpId="+loginEmpId; urlRequest = appConfig.appUri+ "resources?loginEmpId="+loginEmpId;
var req = { var req = {
method : 'POST', method : 'POST',
url : urlRequest, url : urlRequest,
...@@ -1513,21 +1513,24 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1513,21 +1513,24 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$http(req).then(function mySuccess(response) { $http(req).then(function mySuccess(response) {
$scope.result = "Success"; $scope.result = "Success";
var titleOfModel = "Attention"; var titleOfModel = "Attention";
$scope.objectId = response.data.records.id; if(response.data.records!=null){
if(response.data.message =="TeamMate added successfuly"){ $scope.objectId = response.data.records;
titleOfModel = ""; titleOfModel = "";
$timeout(function(){ $timeout(function(){
updateGrid(action,record); updateGrid(action,record);
removeTab('Add'); removeTab('Add');
},500); },500);
}
$mdDialog.show($mdDialog.alert({ $mdDialog.show($mdDialog.alert({
skipHide: true, skipHide: true,
title:titleOfModel, title:titleOfModel,
textContent: response.data.message, textContent: response.data.message,
ok: 'ok' ok: 'ok'
})); }));
}
else{
$scope.alertMsg=response.data.message;
}
}, function myError(response){ }, function myError(response){
$scope.result = "Error"; $scope.result = "Error";
}); });
...@@ -1545,10 +1548,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1545,10 +1548,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.gridOptions.columnDefs[5].visible = true; $scope.gridOptions.columnDefs[5].visible = true;
} }
for(i=0;i<$scope.gridOptions.data.length;i++){ for(i=0;i<$scope.gridOptions.data.length;i++){
if($scope.gridOptions.data[i].role == 'Lead'){ if($scope.gridOptions.data[i].resourceRole == 'Lead'){
$scope.gridOptions.data[i].role = "Lead"; $scope.gridOptions.data[i].resourceRole = "Lead";
}else{ }else{
$scope.gridOptions.data[i].role = "Individual Contributor"; $scope.gridOptions.data[i].resourceRole = "Individual Contributor";
} }
} }
}, function myError(response) { }, function myError(response) {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div class="row col-lg-12" style="height: 15px;"></div> <div class="row col-lg-12" style="height: 15px;"></div>
</div> </div>
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter
class="myGrid" style="width:99%;height:330px;"> class="myGrid grid-half-view" style="width:99%;height:330px;">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter
class="myGrid"> class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="row col-lg-12" style="margin-left: 0px; margin-top: 10px"> <div class="row col-lg-12" style="margin-left: 0px; margin-top: 10px">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="myGrid" style="width: 99%"> class="myGrid grid-full-view" style="width: 99%">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
<div class="md-padding" id="popupContainer" ng-controller="assignEmployeeEffortrsController" ng-init = "getEmployeeEffortsData()">
<div class="container-fluid mainDivHeaderClass">
<div class="row">
<div class="col-lg-12">
<h1 class="no-padding">Employee Efforts
<span class="right">
<i class="fa fa-refresh" aria-hidden="true" ng-click="refreshPage()"></i>
</span>
</h1>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<div class="form-inline">
<div class="col-lg-4 col-md-4">
<label class="" for="toDate">To Date: <md-datepicker
ng-model="toDate" md-placeholder="Enter date"
md-min-date="minDate" md-max-date="maxDate"
onkeydown="return false"
ng-change="validateDates(toDate, 'ToDate')"></md-datepicker></label>
</div>
<div class="col-lg-2 col-md-2">
<label class="" for="submitBtn"><md-button
class="md-raised md-primary"
ng-click="getEmployeeEffortsData('click');"> <i
class="fa fa-search fa-1x"></i>
Search</md-button></label>
</div>
</div>
</div>
<div class="form-group">
<div class="form-inline col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="mygrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No
data available</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
<script src="controllers/MyDetailsController.js"></script> <script src="controllers/MyDetailsController.js"></script>
<script src="controllers/ReporteesController.js"></script> <script src="controllers/ReporteesController.js"></script>
<script src="controllers/ManagerReporteesController.js"></script> <script src="controllers/ManagerReporteesController.js"></script>
<script src="controllers/EmployeeEffortsController.js"></script>
<script src="controllers/ReportsController.js"></script> <script src="controllers/ReportsController.js"></script>
<script src="controllers/AssignRolesController.js"></script> <script src="controllers/AssignRolesController.js"></script>
<script src="controllers/ProjectController.js"></script> <script src="controllers/ProjectController.js"></script>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</md-button> </md-button>
</div> </div>
</md-toolbar> </md-toolbar>
<section layout="row" style="background-color: #fafafa;padding-top: 40px;" layout-sm="column" layout-align="end end" layout-wrap> <section layout="row" style="background-color: #fafafa;padding-top: 10px;" layout-sm="column" layout-align="end end" layout-wrap>
<md-button class="md-raised " class="pull-right" data-ng-click="addTab()" style="width:120px;background: cadetblue;color:white; " ng-show="!isSecondTab">Add</md-button> <md-button class="md-raised " class="pull-right" data-ng-click="addTab()" style="width:120px;background: cadetblue;color:white; " ng-show="!isSecondTab">Add</md-button>
</section> </section>
<md-content style="height:1100px !important"> <md-content style="height:1100px !important">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<md-tab label="Team Details "> <md-tab label="Team Details ">
<md-content class="md-padding "> <md-content class="md-padding ">
<md-dialog-content> <md-dialog-content>
<div class="md-dialog-content "> <div class="md-dialog-content " style="padding:0px">
<div class="form-group "> <div class="form-group ">
<div class="row col-lg-12 " style="margin-left: 0px; "> <div class="row col-lg-12 " style="margin-left: 0px; ">
<div class="row col-lg-12 col-xs-12 "> <div class="row col-lg-12 col-xs-12 ">
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
<p> <p>
<b>Project Name:</b> {{projectName}} <b>Project Name:</b> {{projectName}}
</p> </p>
<p>
<b>Project Start Date:</b> {{projectStartDate | date : 'dd-MMM-yyyy'}}
</p>
<p>
<b>Project End Date:</b> {{projectEndDate | date : 'dd-MMM-yyyy'}}
</p>
</div> </div>
<div class="col-xs-6 text-right "> <div class="col-xs-6 text-right ">
<p> <p>
...@@ -94,10 +100,10 @@ ...@@ -94,10 +100,10 @@
</md-select> </md-select>
</td> </td>
</tr> </tr>
<tr> <!-- <tr>
<td class="Employee">Employee Name : </td> <td class="Employee">Employee Name : </td>
<td>{{employeeModel.employeeName}}</td> <td>{{employeeModel.employeeName}}</td>
</tr> </tr> -->
<tr> <tr>
<td class="Employee"> Employee Id :</td> <td class="Employee"> Employee Id :</td>
<td>{{employeeModel.employeeId}}</td> <td>{{employeeModel.employeeId}}</td>
...@@ -120,7 +126,7 @@ ...@@ -120,7 +126,7 @@
</md-select> </md-select>
</td> </td>
</tr> </tr>
<tr> <!-- <tr>
<td class="Employee">Shift</td> <td class="Employee">Shift</td>
<td> <td>
<md-select ng-model="employeeShift" md-selected-text="getSelectedEmpShift()" id="empShift"> <md-select ng-model="employeeShift" md-selected-text="getSelectedEmpShift()" id="empShift">
...@@ -129,7 +135,7 @@ ...@@ -129,7 +135,7 @@
</md-optgroup> </md-optgroup>
</md-select> </md-select>
</td> </td>
</tr> </tr> -->
<tr> <tr>
<td class="Employee">Billability Status</td> <td class="Employee">Billability Status</td>
<td> <td>
...@@ -147,16 +153,16 @@ ...@@ -147,16 +153,16 @@
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>
<tr> <!-- <tr>
<td class="Employee">Start Date</td> <td class="Employee">Start Date</td>
<td> <td>
<md-datepicker ng-model="startDate" ng-disabled = "true" md-placeholder="Please select Date" id="startDate " md-min-date="minDate " md-max-date="maxDate " <md-datepicker ng-model="startDate" ng-disabled = "true" md-placeholder="Please select Date" id="startDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="startDate"></md-datepicker> onkeydown="return false " name="startDate"></md-datepicker>
</td> </td>
</tr> </tr> -->
<tr> <tr ng-show="empBillableStatus">
<td class="Employee">End Date</td> <td class="Employee">{{empBillableStatus}} End Date</td>
<td> <td>
<md-datepicker ng-model="endDate" md-placeholder="Please select Date" id="endDate " md-min-date="minDate " md-max-date="maxDate " <md-datepicker ng-model="endDate" md-placeholder="Please select Date" id="endDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="endDate"></md-datepicker> onkeydown="return false " name="endDate"></md-datepicker>
...@@ -164,8 +170,8 @@ ...@@ -164,8 +170,8 @@
</tr> </tr>
</table> </table>
<div role="alert "> <div role="alert">
<span class="error " style="color: red; ">{{alertMsg}}</span> <span class="alert alert alert-danger" style="color: red; ">{{alertMsg}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -245,7 +251,7 @@ ...@@ -245,7 +251,7 @@
</md-select> </md-select>
</td> </td>
</tr> </tr>
<tr> <!-- <tr>
<td class="Employee">Shift</td> <td class="Employee">Shift</td>
<td> <td>
<md-select ng-model="employeeShift" md-selected-text="getSelectedEmpShift()" id="empShift"> <md-select ng-model="employeeShift" md-selected-text="getSelectedEmpShift()" id="empShift">
...@@ -254,7 +260,7 @@ ...@@ -254,7 +260,7 @@
</md-optgroup> </md-optgroup>
</md-select> </md-select>
</td> </td>
</tr> </tr> -->
<tr> <tr>
<td class="Employee">Billability Status</td> <td class="Employee">Billability Status</td>
<td> <td>
...@@ -275,16 +281,16 @@ ...@@ -275,16 +281,16 @@
</td> </td>
</tr> </tr>
<tr> <!-- <tr>
<td class="Employee">Start Date</td> <td class="Employee">Start Date</td>
<td> <td>
<md-datepicker ng-model="startDate" ng-disabled = "true" md-placeholder="Please select Date" id="startDate " md-min-date="minDate " md-max-date="maxDate " <md-datepicker ng-model="startDate" ng-disabled = "true" md-placeholder="Please select Date" id="startDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="startDate"></md-datepicker> onkeydown="return false " name="startDate"></md-datepicker>
</td> </td>
</tr> </tr> -->
<tr> <tr ng-show="empBillableStatus">
<td class="Employee">End Date</td> <td class="Employee">{{empBillableStatus}} End Date</td>
<td> <td>
<md-datepicker ng-model="endDate " md-placeholder="Please select Date" id="endDate " md-min-date="minDate " md-max-date="maxDate " <md-datepicker ng-model="endDate " md-placeholder="Please select Date" id="endDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="endDate"></md-datepicker> onkeydown="return false " name="endDate"></md-datepicker>
......
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