Commit c0c90e95 authored by Rajeshekar's avatar Rajeshekar

MT-45: Employment Type Full Time/Part Time

MT-41: Update Designation while in Manage Employees
MT-42: Active Employee : Capture if employee is active or inactive(left
org). By default on emp creation,set active to true.
MT-40: Capture Functional Group and show in Employee details and
Dashboard
parent 6a08ed6e
package com.nisum.mytime.controller; package com.nisum.mytime.controller;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -19,6 +21,7 @@ import com.nisum.mytime.model.Account; ...@@ -19,6 +21,7 @@ import com.nisum.mytime.model.Account;
import com.nisum.mytime.model.Designation; import com.nisum.mytime.model.Designation;
import com.nisum.mytime.model.EmployeeRoles; import com.nisum.mytime.model.EmployeeRoles;
import com.nisum.mytime.model.Location; import com.nisum.mytime.model.Location;
import com.nisum.mytime.model.MasterData;
import com.nisum.mytime.model.Shift; import com.nisum.mytime.model.Shift;
import com.nisum.mytime.model.Skill; import com.nisum.mytime.model.Skill;
import com.nisum.mytime.service.UserService; import com.nisum.mytime.service.UserService;
...@@ -161,4 +164,23 @@ public class UserController { ...@@ -161,4 +164,23 @@ public class UserController {
.collect(Collectors.toList()); .collect(Collectors.toList());
return new ResponseEntity<>(technologies, HttpStatus.OK); return new ResponseEntity<>(technologies, HttpStatus.OK);
} }
@RequestMapping(value = "/getMasterData", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Map<String, List<String>>> getMasterData()
throws MyTimeException {
Map<String, List<String>> masterDataMap = new HashMap<>();
Map<String, List<MasterData>> result = userService.getMasterData()
.stream().filter(e -> (e.isActiveStatus() == true))
.collect(Collectors.groupingBy(MasterData::getMasterDataType));
for (String key : result.keySet()) {
List<MasterData> valueList = result.get(key);
List<String> technologies = valueList.stream()
.map(MasterData::getMasterDataName).sorted()
.collect(Collectors.toList());
masterDataMap.put(key, technologies);
}
return new ResponseEntity<>(masterDataMap, HttpStatus.OK);
}
} }
\ No newline at end of file
...@@ -17,33 +17,36 @@ import lombok.ToString; ...@@ -17,33 +17,36 @@ import lombok.ToString;
@NoArgsConstructor @NoArgsConstructor
@ToString @ToString
public class EmployeeDashboardVO { public class EmployeeDashboardVO {
private String employeeId; private String employeeId;
private String employeeName; private String employeeName;
private String emailId; private String emailId;
private String baseTechnology; private String baseTechnology;
private String technologyKnown; private String technologyKnown;
private String alternateMobileNumber; private String alternateMobileNumber;
private String personalEmailId; private String personalEmailId;
private Date createdOn; private Date createdOn;
private Date lastModifiedOn; private Date lastModifiedOn;
private String role; private String role;
private String shift; private String shift;
private String projectId; private String projectId;
private String projectName; private String projectName;
private String account; private String account;
private String managerId; private String managerId;
private String managerName; private String managerName;
private String experience; private String experience;
private String designation; private String designation;
private String billableStatus; private String billableStatus;
private String mobileNumber; private String mobileNumber;
@DateTimeFormat(iso = ISO.DATE) private String functionalGroup;
private Date startDate; private String empStatus;
@DateTimeFormat(iso = ISO.DATE) private String employmentType;
private Date endDate; @DateTimeFormat(iso = ISO.DATE)
private boolean active; private Date startDate;
private boolean projectAssigned; @DateTimeFormat(iso = ISO.DATE)
private boolean hasB1Visa; private Date endDate;
private boolean hasH1Visa; private boolean active;
private boolean hasPassport; private boolean projectAssigned;
private boolean hasB1Visa;
private boolean hasH1Visa;
private boolean hasPassport;
} }
...@@ -39,6 +39,9 @@ public class EmployeeRoles implements Serializable { ...@@ -39,6 +39,9 @@ public class EmployeeRoles implements Serializable {
private String mobileNumber; private String mobileNumber;
private String alternateMobileNumber; private String alternateMobileNumber;
private String personalEmailId; private String personalEmailId;
private String functionalGroup;
private String empStatus;
private String employmentType;
private Date createdOn; private Date createdOn;
private Date lastModifiedOn; private Date lastModifiedOn;
......
package com.nisum.mytime.model;
import java.io.Serializable;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Document(collection = "MasterData")
public class MasterData implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private ObjectId id;
private String masterDataType;
private String masterDataId;
private String masterDataName;
private boolean activeStatus;
private String comments;
}
package com.nisum.mytime.repository;
import org.springframework.data.mongodb.repository.MongoRepository;
import com.nisum.mytime.model.MasterData;
public interface MasterDataRepo extends MongoRepository<MasterData, String> {
}
\ No newline at end of file
...@@ -8,6 +8,7 @@ import com.nisum.mytime.model.Designation; ...@@ -8,6 +8,7 @@ import com.nisum.mytime.model.Designation;
import com.nisum.mytime.model.EmpLoginData; import com.nisum.mytime.model.EmpLoginData;
import com.nisum.mytime.model.EmployeeRoles; import com.nisum.mytime.model.EmployeeRoles;
import com.nisum.mytime.model.Location; import com.nisum.mytime.model.Location;
import com.nisum.mytime.model.MasterData;
import com.nisum.mytime.model.Shift; import com.nisum.mytime.model.Shift;
import com.nisum.mytime.model.Skill; import com.nisum.mytime.model.Skill;
...@@ -47,4 +48,6 @@ public interface UserService { ...@@ -47,4 +48,6 @@ public interface UserService {
public List<Account> getAccounts() throws MyTimeException; public List<Account> getAccounts() throws MyTimeException;
List<Location> getLocations() throws MyTimeException; List<Location> getLocations() throws MyTimeException;
List<MasterData> getMasterData() throws MyTimeException;
} }
...@@ -17,6 +17,7 @@ import com.nisum.mytime.model.Designation; ...@@ -17,6 +17,7 @@ import com.nisum.mytime.model.Designation;
import com.nisum.mytime.model.EmpLoginData; import com.nisum.mytime.model.EmpLoginData;
import com.nisum.mytime.model.EmployeeRoles; import com.nisum.mytime.model.EmployeeRoles;
import com.nisum.mytime.model.Location; import com.nisum.mytime.model.Location;
import com.nisum.mytime.model.MasterData;
import com.nisum.mytime.model.ProjectTeamMate; import com.nisum.mytime.model.ProjectTeamMate;
import com.nisum.mytime.model.Shift; import com.nisum.mytime.model.Shift;
import com.nisum.mytime.model.Skill; import com.nisum.mytime.model.Skill;
...@@ -24,6 +25,7 @@ import com.nisum.mytime.repository.AccountRepo; ...@@ -24,6 +25,7 @@ import com.nisum.mytime.repository.AccountRepo;
import com.nisum.mytime.repository.DesignationRepo; import com.nisum.mytime.repository.DesignationRepo;
import com.nisum.mytime.repository.EmployeeRolesRepo; import com.nisum.mytime.repository.EmployeeRolesRepo;
import com.nisum.mytime.repository.LocationRepo; import com.nisum.mytime.repository.LocationRepo;
import com.nisum.mytime.repository.MasterDataRepo;
import com.nisum.mytime.repository.ProjectTeamMatesRepo; import com.nisum.mytime.repository.ProjectTeamMatesRepo;
import com.nisum.mytime.repository.ShiftRepo; import com.nisum.mytime.repository.ShiftRepo;
import com.nisum.mytime.repository.TechnologyRepo; import com.nisum.mytime.repository.TechnologyRepo;
...@@ -46,6 +48,8 @@ public class UserServiceImpl implements UserService { ...@@ -46,6 +48,8 @@ public class UserServiceImpl implements UserService {
@Autowired @Autowired
private AccountRepo accountRepo; private AccountRepo accountRepo;
@Autowired
private MasterDataRepo masterDataRepo;
@Autowired @Autowired
private TechnologyRepo technologyRepo; private TechnologyRepo technologyRepo;
...@@ -91,6 +95,8 @@ public class UserServiceImpl implements UserService { ...@@ -91,6 +95,8 @@ public class UserServiceImpl implements UserService {
public EmployeeRoles assigingEmployeeRole(EmployeeRoles employeeRoles) public EmployeeRoles assigingEmployeeRole(EmployeeRoles employeeRoles)
throws MyTimeException { throws MyTimeException {
employeeRoles.setCreatedOn(new Date()); employeeRoles.setCreatedOn(new Date());
employeeRoles.setEmpStatus("Active");
employeeRoles.setEmploymentType("Full Time");
return employeeRolesRepo.save(employeeRoles); return employeeRolesRepo.save(employeeRoles);
} }
...@@ -114,6 +120,10 @@ public class UserServiceImpl implements UserService { ...@@ -114,6 +120,10 @@ public class UserServiceImpl implements UserService {
update.set("employeeName", employeeRoles.getEmployeeName()); update.set("employeeName", employeeRoles.getEmployeeName());
update.set("emailId", employeeRoles.getEmailId()); update.set("emailId", employeeRoles.getEmailId());
update.set("role", employeeRoles.getRole()); update.set("role", employeeRoles.getRole());
update.set("functionalGroup", employeeRoles.getFunctionalGroup());
update.set("empStatus", employeeRoles.getEmpStatus());
update.set("employmentType", employeeRoles.getEmploymentType());
update.set("designation", employeeRoles.getDesignation());
update.set("lastModifiedOn", new Date()); update.set("lastModifiedOn", new Date());
FindAndModifyOptions options = new FindAndModifyOptions(); FindAndModifyOptions options = new FindAndModifyOptions();
options.returnNew(true); options.returnNew(true);
...@@ -221,4 +231,10 @@ public class UserServiceImpl implements UserService { ...@@ -221,4 +231,10 @@ public class UserServiceImpl implements UserService {
return employeeRolesDB; return employeeRolesDB;
} }
@Override
public List<MasterData> getMasterData() throws MyTimeException {
// TODO Auto-generated method stub
return masterDataRepo.findAll();
}
} }
...@@ -44,7 +44,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -44,7 +44,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
{field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false,enableFiltering: true}, {field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false,enableFiltering: true},
{field : 'baseTechnology',displayName: 'Skill', enableColumnMenu: false, enableSorting: false,enableFiltering: true}, {field : 'baseTechnology',displayName: 'Skill', enableColumnMenu: false, enableSorting: false,enableFiltering: true},
{field : 'designation',displayName: 'Designation', enableColumnMenu: false, enableSorting: true,enableFiltering: true}, {field : 'designation',displayName: 'Designation', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
// {field : 'role',displayName: 'Role', enableColumnMenu: false, enableSorting: true,enableFiltering: true, width:100}, //{field : 'role',displayName: 'Role', enableColumnMenu: false, enableSorting: true,enableFiltering: true, width:200},
{field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering: true, width:120}
// {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false,enableFiltering: false, width:100} // {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false,enableFiltering: false, width:100}
] ]
}; };
...@@ -56,6 +58,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -56,6 +58,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.parentData.emailId = row.entity.emailId; $scope.parentData.emailId = row.entity.emailId;
$scope.parentData.role = row.entity.role; $scope.parentData.role = row.entity.role;
$scope.parentData.empLocation = row.entity.empLocation; $scope.parentData.empLocation = row.entity.empLocation;
$scope.parentData.designation = row.entity.designation;
$scope.parentData.functionalGroup = row.entity.functionalGroup;
$scope.parentData.empStatus = row.entity.empStatus;
$scope.parentData.employmentType = row.entity.employmentType;
if(action == "Update") if(action == "Update")
$scope.assignRole(action, $scope.parentData); $scope.assignRole(action, $scope.parentData);
else if(action == "Delete") else if(action == "Delete")
...@@ -222,6 +228,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -222,6 +228,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.empRole; $scope.empRole;
$scope.empEmail = ""; $scope.empEmail = "";
$scope.empLocation = ""; $scope.empLocation = "";
$scope.functionalGroup = "";
$scope.empStatus = "";
$scope.employmentType = "";
$scope.designation = "";
$scope.isDisabled = false; $scope.isDisabled = false;
}else if(dataToPass.action == "Update"){ }else if(dataToPass.action == "Update"){
$scope.empId = dataToPass.employeeId; $scope.empId = dataToPass.employeeId;
...@@ -229,10 +239,18 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -229,10 +239,18 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.empRole = dataToPass.role; $scope.empRole = dataToPass.role;
$scope.empEmail = dataToPass.emailId; $scope.empEmail = dataToPass.emailId;
$scope.empLocation = dataToPass.empLocation; $scope.empLocation = dataToPass.empLocation;
$scope.functionalGroup = dataToPass.functionalGroup;
$scope.empStatus = dataToPass.empStatus;
$scope.employmentType = dataToPass.employmentType;
$scope.designation = dataToPass.designation;
$scope.isDisabled = true; $scope.isDisabled = true;
} }
$scope.roles = ["Delivery Manager","Director","Employee","HR","HR Manager","Lead","Manager"]; $scope.roles = myFactory.getRoles();
$scope.locations=myFactory.getLocations(); $scope.locations=myFactory.getLocations();
$scope.designations=myFactory.getDesignations();
$scope.functionalGroups=myFactory.getFunctionalgroups();
$scope.employmentTypes=myFactory.getEmployementTypes();
$scope.empStatuses=myFactory.getEmployeeStatus();
$scope.getSelectedRole = function(){ $scope.getSelectedRole = function(){
if ($scope.empRole !== undefined) { if ($scope.empRole !== undefined) {
return $scope.empRole; return $scope.empRole;
...@@ -247,6 +265,34 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -247,6 +265,34 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
return "Please select a location"; return "Please select a location";
} }
}; };
$scope.getDesignationText = function(){
if ($scope.designation !== undefined) {
return $scope.designation;
} else {
return "Please select a designation";
}
};
$scope.getSelectedFunctionalGroup = function(){
if ($scope.functionalGroup !== undefined) {
return $scope.functionalGroup;
} else {
return "Please select a Functional Org";
}
};
$scope.getSelectedEmploymentType = function(){
if ($scope.employmentType !== undefined) {
return $scope.employmentType;
} else {
return "Please select a Employment Type";
}
};
$scope.getSelectedEmpStatus = function(){
if ($scope.empStatus !== undefined) {
return $scope.empStatus;
} else {
return "Please select a employee status";
}
};
$scope.validateEmpId = function(){ $scope.validateEmpId = function(){
var searchId = $scope.empId; var searchId = $scope.empId;
if(searchId != "" && isNaN(searchId)){ if(searchId != "" && isNaN(searchId)){
...@@ -324,7 +370,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -324,7 +370,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
document.getElementById('empRole').focus(); document.getElementById('empRole').focus();
}else{ }else{
$scope.alertMsg = ""; $scope.alertMsg = "";
var record = {"employeeId":$scope.empId, "employeeName": $scope.empName, "emailId": $scope.empEmail, "role": $scope.empRole, "empLocation": $scope.empLocation}; var record = {"employeeId":$scope.empId, "employeeName": $scope.empName, "emailId": $scope.empEmail, "role": $scope.empRole, "empLocation": $scope.empLocation,"designation": $scope.designation,"functionalGroup": $scope.functionalGroup,"empStatus": $scope.empStatus,"employmentType": $scope.employmentType};
addOrUpdateRole(record, $scope.templateTitle); addOrUpdateRole(record, $scope.templateTitle);
$timeout(function(){updateGrid($scope.templateTitle, record)},500); $timeout(function(){updateGrid($scope.templateTitle, record)},500);
} }
......
...@@ -55,14 +55,18 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -55,14 +55,18 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
pageNumber: 1, pageNumber: 1,
pageSize:10, pageSize:10,
enableFiltering: true, enableFiltering: true,
enableHorizontalScrollbar:1,
columnDefs : [ columnDefs : [
{field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: false, enableSorting: false,enableFiltering:true, width:120,cellTemplate: getEmpDetTemplate}, {field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: false, enableSorting: false,enableFiltering:true, width:100,cellTemplate: getEmpDetTemplate},
{field : 'employeeName',displayName: 'EmployeeName ', enableColumnMenu: false, enableSorting: true,enableFiltering:true}, {field : 'employeeName',displayName: 'EmployeeName ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:200},
{field : 'designation',displayName: 'Designation ', enableColumnMenu: false, enableSorting: true,enableFiltering:true}, {field : 'designation',displayName: 'Designation ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150},
{field : 'baseTechnology',displayName: 'Skill ', enableColumnMenu: false, enableSorting: false,enableFiltering:true}, {field : 'role',displayName: 'Role', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150},
{field : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: true,enableFiltering:true}, {field : 'baseTechnology',displayName: 'Skill ', enableColumnMenu: false, enableSorting: false,enableFiltering:true,width:200},
{field : 'projectName',displayName: 'Project', enableColumnMenu: false, enableSorting: true,enableFiltering:true}, {field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100},
{field : 'employmentType',displayName: 'Employment Type', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150},
{field : 'empStatus',displayName: 'Employment Status', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150},
{field : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150},
{field : 'projectName',displayName: 'Project', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:200},
/*{field : 'projectAssigned',displayName: 'Allocated ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,cellTemplate: getCellActiveTemplate,filterHeaderTemplate: '<div class="ui-grid-filter-container" ng-repeat="colFilter in col.filters"><div my-custom-dropdown></div></div>', /*{field : 'projectAssigned',displayName: 'Allocated ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,cellTemplate: getCellActiveTemplate,filterHeaderTemplate: '<div class="ui-grid-filter-container" ng-repeat="colFilter in col.filters"><div my-custom-dropdown></div></div>',
filter: { filter: {
term: 1, term: 1,
...@@ -73,9 +77,9 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -73,9 +77,9 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
filterHeaderTemplate: '<div class="ui-grid-filter-container" ng-repeat="colFilter in col.filters"><div my-custom-dropdown></div></div>', filterHeaderTemplate: '<div class="ui-grid-filter-container" ng-repeat="colFilter in col.filters"><div my-custom-dropdown></div></div>',
filter: { filter: {
term: '', term: '',
options: [ {id: 'Billable', value: 'Billable'}, {id: 'Shadow', value: 'Shadow'},{id: 'NA', value: 'NA'},{id: 'Bench', value: 'Bench'},{id: 'UA', value: 'Unassigned'},{id: '', value: 'All'}] // custom attribute that goes with custom directive above options: [ {id: 'Billable', value: 'Billable'}, {id: 'Shadow', value: 'Shadow'},{id: 'NA', value: 'NA'},{id: 'Bench', value: 'Bench'},{id: 'Reserved', value: 'Reserved'},{id: 'UA', value: 'Unassigned'},{id: '', value: 'All'}] // custom attribute that goes with custom directive above
}, },
cellFilter: 'mapGender' } cellFilter: 'mapGender' ,width:150}
// {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:130} // {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:130}
], ],
enableGridMenu: true, enableGridMenu: true,
...@@ -269,6 +273,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -269,6 +273,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
'NA': 'NA', 'NA': 'NA',
'Bench': 'Bench', 'Bench': 'Bench',
'UA': 'Unassigned', 'UA': 'Unassigned',
"Reserved":"Reserved",
'': 'All' '': 'All'
}; };
......
...@@ -13,6 +13,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -13,6 +13,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
getAllTechnologies(); getAllTechnologies();
getAllLocations(); getAllLocations();
getAllAccounts(); getAllAccounts();
getMasterData();
$("#start").trigger("click"); $("#start").trigger("click");
} }
...@@ -87,6 +88,21 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -87,6 +88,21 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
}); });
}; };
function getMasterData(){
$http({
method : "GET",
url : appConfig.appUri + "user/getMasterData"
}).then(function mySuccess(response) {
myFactory.setTechnologies(response.data);
myFactory.setEmployementTypes(response.data['EmpType']);
myFactory.setFunctionalgroups(response.data['FunctionalGrp'])
myFactory.setEmployeeStatus(response.data['EmployeeStatus']);
myFactory.setRoles(response.data['roles']);
}, function myError(response) {
});
};
function getAllLocations(){ function getAllLocations(){
$http({ $http({
method : "GET", method : "GET",
...@@ -273,11 +289,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -273,11 +289,6 @@ 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-card-o fa-2x","path" : "templates/profile.html"}); menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
}else if(role == "Employee"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.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 Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
}else if(role == "HR Manager"){ }else if(role == "HR Manager"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"}); menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Employee Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"}); menuItems.push({"menu" : "Employee Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
...@@ -312,6 +323,12 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -312,6 +323,12 @@ 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-card-o fa-2x","path" : "templates/profile.html"}); menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
}else{
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.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 Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
} }
myFactory.setMenuItems(menuItems); myFactory.setMenuItems(menuItems);
......
...@@ -257,7 +257,7 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog ...@@ -257,7 +257,7 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
$scope.empEmail = dataToPass.emailId; $scope.empEmail = dataToPass.emailId;
$scope.isDisabled = true; $scope.isDisabled = true;
} }
$scope.roles = ["Delivery Manager","Director","Employee","HR","HR Manager","Lead","Manager"]; $scope.roles=myFactory.getRoles(); //["Delivery Manager","Director","Employee","HR","HR Manager","Lead","Manager"];
$scope.shifts = myFactory.getShifts();//["Shift 1(09:00 AM - 06:00 PM)","Shift 2(03:30 PM - 12:30 PM)", "Shift 3(09:00 PM - 06:00 AM)"]; $scope.shifts = myFactory.getShifts();//["Shift 1(09:00 AM - 06:00 PM)","Shift 2(03:30 PM - 12:30 PM)", "Shift 3(09:00 PM - 06:00 AM)"];
$scope.getSelectedRole = function(){ $scope.getSelectedRole = function(){
if ($scope.empRole !== undefined) { if ($scope.empRole !== undefined) {
......
...@@ -541,7 +541,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog, ...@@ -541,7 +541,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
} }
$scope.designations = myFactory.getDesignations(); $scope.designations = myFactory.getDesignations();
$scope.billableStatuses = ["Billable","Shadow","Bench","NA"]; $scope.billableStatuses = ["Billable","Shadow","Bench","Reserved","NA"];
$scope.shifts =myFactory.getShifts(); $scope.shifts =myFactory.getShifts();
$scope.getSelectedDesignation = function(){ $scope.getSelectedDesignation = function(){
if ($scope.empDesignation !== undefined) { if ($scope.empDesignation !== undefined) {
......
...@@ -357,7 +357,7 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http ...@@ -357,7 +357,7 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
}else if(dataToPass.action == "ViewTeamDetail"){}else if(dataToPass.action == "ViewBillability"){} }else if(dataToPass.action == "ViewTeamDetail"){}else if(dataToPass.action == "ViewBillability"){}
$scope.designations = myFactory.getDesignations(); $scope.designations = myFactory.getDesignations();
$scope.billableStatuses = ["Billable","Shadow","Bench","NA"]; $scope.billableStatuses = ["Billable","Shadow","Bench","Reserved","NA"];
$scope.shifts =myFactory.getShifts(); $scope.shifts =myFactory.getShifts();
$scope.getSelectedDesignation = function(){ $scope.getSelectedDesignation = function(){
if ($scope.empDesignation !== undefined) { if ($scope.empDesignation !== undefined) {
......
...@@ -328,7 +328,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http, ...@@ -328,7 +328,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
}else if(dataToPass.action == "ViewTeamDetail"){}else if(dataToPass.action == "ViewBillability"){} }else if(dataToPass.action == "ViewTeamDetail"){}else if(dataToPass.action == "ViewBillability"){}
$scope.designations = myFactory.getDesignations(); $scope.designations = myFactory.getDesignations();
$scope.billableStatuses = ["Billable","Shadow","Bench","NA"]; $scope.billableStatuses = ["Billable","Shadow","Bench","Reserved","NA"];
$scope.shifts =myFactory.getShifts(); $scope.shifts =myFactory.getShifts();
$scope.getSelectedDesignation = function(){ $scope.getSelectedDesignation = function(){
if ($scope.empDesignation !== undefined) { if ($scope.empDesignation !== undefined) {
......
...@@ -37,7 +37,11 @@ myApp.factory('myFactory', function() { ...@@ -37,7 +37,11 @@ myApp.factory('myFactory', function() {
var technologies=""; var technologies="";
var locations=""; var locations="";
var shifts=""; var shifts="";
var roles="";
var accounts=""; var accounts="";
var functionalgroups="";
var employeeStatus="";
var employementTypes="";
function setEmpId(id) { function setEmpId(id) {
empId = id; empId = id;
} }
...@@ -74,6 +78,13 @@ myApp.factory('myFactory', function() { ...@@ -74,6 +78,13 @@ myApp.factory('myFactory', function() {
function getMenuItems() { function getMenuItems() {
return menuItems; return menuItems;
} }
function setRoles(roles1) {
roles = roles1;
}
function getRoles() {
return roles;
}
function setDesignations(designations1) { function setDesignations(designations1) {
designations = designations1; designations = designations1;
} }
...@@ -102,6 +113,25 @@ myApp.factory('myFactory', function() { ...@@ -102,6 +113,25 @@ myApp.factory('myFactory', function() {
function getLocations() { function getLocations() {
return locations; return locations;
} }
function setFunctionalgroups(functionalgroups1) {
functionalgroups = functionalgroups1;
}
function getFunctionalgroups() {
return functionalgroups;
}
function setEmployeeStatus(employeeStatus1) {
employeeStatus = employeeStatus1;
}
function getEmployeeStatus() {
return employeeStatus;
}
function setEmployementTypes(employementTypes1) {
employementTypes = employementTypes1;
}
function getEmployementTypes() {
return employementTypes;
}
function setShifts(shifts1) { function setShifts(shifts1) {
shifts = shifts1; shifts = shifts1;
} }
...@@ -144,6 +174,14 @@ myApp.factory('myFactory', function() { ...@@ -144,6 +174,14 @@ myApp.factory('myFactory', function() {
getTechnologies : getTechnologies, getTechnologies : getTechnologies,
setLocations : setLocations, setLocations : setLocations,
getLocations : getLocations, getLocations : getLocations,
setFunctionalgroups : setFunctionalgroups,
getFunctionalgroups : getFunctionalgroups,
setEmployeeStatus : setEmployeeStatus,
getEmployeeStatus : getEmployeeStatus,
setEmployementTypes: setEmployementTypes,
getEmployementTypes : getEmployementTypes,
setRoles: setRoles,
getRoles : getRoles,
setShifts : setShifts, setShifts : setShifts,
getShifts : getShifts, getShifts : getShifts,
setTemplateUrl : setTemplateUrl, setTemplateUrl : setTemplateUrl,
......
<md-dialog aria-label="Role Template" style="width:520px;height:390px;"> <md-dialog aria-label="Role Template" style="width:520px;height:690px;">
<form ng-cloak name="myForm"> <form ng-cloak name="myForm">
<md-toolbar> <md-toolbar>
<div class="md-toolbar-tools" <div class="md-toolbar-tools"
...@@ -26,10 +26,22 @@ ...@@ -26,10 +26,22 @@
<md-select ng-model="empShift" md-selected-text="getSelectedShift()" id="empShift" ng-disabled="isDisabled" style="display:none"> <md-select ng-model="empShift" md-selected-text="getSelectedShift()" id="empShift" ng-disabled="isDisabled" style="display:none">
<md-optgroup label="shifts"> <md-option ng-value="shift" <md-optgroup label="shifts"> <md-option ng-value="shift"
ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select> ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="designation" md-selected-text="getDesignationText()" id="designation" >
<md-optgroup label="designations"> <md-option ng-value="designation"
ng-repeat="designation in designations">{{designation}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="empLocation" md-selected-text="getSelectedLocation()" id="empLocation"> <md-select ng-model="empLocation" md-selected-text="getSelectedLocation()" id="empLocation">
<md-optgroup label="locations"> <md-option ng-value="location" <md-optgroup label="locations"> <md-option ng-value="location"
ng-repeat="location in locations">{{location}}</md-option> </md-optgroup> </md-select> ng-repeat="location in locations">{{location}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="functionalGroup" md-selected-text="getSelectedFunctionalGroup()" id="functionalGroup">
<md-optgroup label="Functional Org"> <md-option ng-value="functionalGroup"
ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="employmentType" md-selected-text="getSelectedEmploymentType()" id="employmentType">
<md-optgroup label="Employment Type"> <md-option ng-value="employmentType"
ng-repeat="employmentType in employmentTypes">{{employmentType}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="empStatus" md-selected-text="getSelectedEmpStatus()" id="empStatus">
<md-optgroup label="Employment Status"> <md-option ng-value="status"
ng-repeat="status in empStatuses">{{status}}</md-option> </md-optgroup> </md-select>
<div role="alert"> <div role="alert">
<span class="error" style="color: red;">{{alertMsg}}</span> <span class="error" style="color: red;">{{alertMsg}}</span>
</div> </div>
......
...@@ -172,6 +172,48 @@ ...@@ -172,6 +172,48 @@
</div> </div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6">
<p>
<b>Functional Org</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> {{profile.functionalGroup}}
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6">
<p>
<b>Employment Type</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> {{profile.employmentType}}
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6">
<p>
<b>Employment Status</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> {{profile.empStatus}}
</p>
</div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment