Commit ac5da2a9 authored by Rajeshekar's avatar Rajeshekar

MT-43: Capture Location (US-CA,IN-HYD) and show in Employee details and

Dashboard Issue fixed
MT-48: Add domain and capture the details in ManageEmployee screen. Show
in Dashboard and profile screen
parent 62d28e2c
...@@ -40,6 +40,7 @@ public class EmployeeDashboardVO { ...@@ -40,6 +40,7 @@ public class EmployeeDashboardVO {
private String functionalGroup; private String functionalGroup;
private String empStatus; private String empStatus;
private String employmentType; private String employmentType;
private String domain;
@DateTimeFormat(iso = ISO.DATE) @DateTimeFormat(iso = ISO.DATE)
private Date startDate; private Date startDate;
@DateTimeFormat(iso = ISO.DATE) @DateTimeFormat(iso = ISO.DATE)
......
...@@ -34,6 +34,7 @@ public class EmployeeRoles implements Serializable { ...@@ -34,6 +34,7 @@ public class EmployeeRoles implements Serializable {
private String designation; private String designation;
private String shift; private String shift;
private String baseTechnology; private String baseTechnology;
private String domain;
private String empLocation; private String empLocation;
private String technologyKnown; private String technologyKnown;
private String mobileNumber; private String mobileNumber;
......
...@@ -126,6 +126,8 @@ public class UserServiceImpl implements UserService { ...@@ -126,6 +126,8 @@ public class UserServiceImpl implements UserService {
update.set("functionalGroup", employeeRoles.getFunctionalGroup()); update.set("functionalGroup", employeeRoles.getFunctionalGroup());
update.set("empStatus", employeeRoles.getEmpStatus()); update.set("empStatus", employeeRoles.getEmpStatus());
update.set("employmentType", employeeRoles.getEmploymentType()); update.set("employmentType", employeeRoles.getEmploymentType());
update.set("empLocation", employeeRoles.getEmpLocation());
update.set("domain", employeeRoles.getDomain());
update.set("designation", employeeRoles.getDesignation()); update.set("designation", employeeRoles.getDesignation());
update.set("lastModifiedOn", new Date()); update.set("lastModifiedOn", new Date());
FindAndModifyOptions options = new FindAndModifyOptions(); FindAndModifyOptions options = new FindAndModifyOptions();
......
...@@ -60,8 +60,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -60,8 +60,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.parentData.empLocation = row.entity.empLocation; $scope.parentData.empLocation = row.entity.empLocation;
$scope.parentData.designation = row.entity.designation; $scope.parentData.designation = row.entity.designation;
$scope.parentData.functionalGroup = row.entity.functionalGroup; $scope.parentData.functionalGroup = row.entity.functionalGroup;
$scope.parentData.empStatus = row.entity.empStatus; $scope.parentData.empStatus = row.entity.empStatus;
$scope.parentData.employmentType = row.entity.employmentType; $scope.parentData.employmentType = row.entity.employmentType;
$scope.parentData.domain = row.entity.domain;
if(action == "Update") if(action == "Update")
$scope.assignRole(action, $scope.parentData); $scope.assignRole(action, $scope.parentData);
else if(action == "Delete") else if(action == "Delete")
...@@ -232,6 +233,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -232,6 +233,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.empStatus = ""; $scope.empStatus = "";
$scope.employmentType = ""; $scope.employmentType = "";
$scope.designation = ""; $scope.designation = "";
$scope.domain = "";
$scope.isDisabled = false; $scope.isDisabled = false;
}else if(dataToPass.action == "Update"){ }else if(dataToPass.action == "Update"){
$scope.empId = dataToPass.employeeId; $scope.empId = dataToPass.employeeId;
...@@ -242,9 +244,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -242,9 +244,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.functionalGroup = dataToPass.functionalGroup; $scope.functionalGroup = dataToPass.functionalGroup;
$scope.empStatus = dataToPass.empStatus; $scope.empStatus = dataToPass.empStatus;
$scope.employmentType = dataToPass.employmentType; $scope.employmentType = dataToPass.employmentType;
$scope.domain = dataToPass.domain;
$scope.designation = dataToPass.designation; $scope.designation = dataToPass.designation;
$scope.isDisabled = true; $scope.isDisabled = true;
} }
$scope.domains = myFactory.getDomains();
$scope.roles = myFactory.getRoles(); $scope.roles = myFactory.getRoles();
$scope.locations=myFactory.getLocations(); $scope.locations=myFactory.getLocations();
$scope.designations=myFactory.getDesignations(); $scope.designations=myFactory.getDesignations();
...@@ -286,6 +290,13 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -286,6 +290,13 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
return "Please select a Employment Type"; return "Please select a Employment Type";
} }
}; };
$scope.getSelectedDomain = function(){
if ($scope.domain !== undefined) {
return $scope.domain;
} else {
return "Please select a Domain";
}
};
$scope.getSelectedEmpStatus = function(){ $scope.getSelectedEmpStatus = function(){
if ($scope.empStatus !== undefined) { if ($scope.empStatus !== undefined) {
return $scope.empStatus; return $scope.empStatus;
...@@ -370,7 +381,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -370,7 +381,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,"designation": $scope.designation,"functionalGroup": $scope.functionalGroup,"empStatus": $scope.empStatus,"employmentType": $scope.employmentType}; 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,"domain": $scope.domain};
addOrUpdateRole(record, $scope.templateTitle); addOrUpdateRole(record, $scope.templateTitle);
$timeout(function(){updateGrid($scope.templateTitle, record)},500); $timeout(function(){updateGrid($scope.templateTitle, record)},500);
} }
......
...@@ -63,6 +63,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -63,6 +63,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
{field : 'role',displayName: 'Role', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150}, {field : 'role',displayName: 'Role', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150},
{field : 'baseTechnology',displayName: 'Skill ', enableColumnMenu: false, enableSorting: false,enableFiltering:true,width:200}, {field : 'baseTechnology',displayName: 'Skill ', enableColumnMenu: false, enableSorting: false,enableFiltering:true,width:200},
{field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100}, {field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100},
{field : 'domain',displayName: 'Domain', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100},
{field : 'employmentType',displayName: 'Employment Type', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150}, {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 : '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 : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:150},
......
...@@ -8,7 +8,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -8,7 +8,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
var profile = googleUser.getBasicProfile(); var profile = googleUser.getBasicProfile();
getUserRole(profile); getUserRole(profile);
getAllUserRoles(); getAllUserRoles();
getAllShifts(); //getAllShifts();
getAllDesignations(); getAllDesignations();
getAllTechnologies(); getAllTechnologies();
getAllLocations(); getAllLocations();
...@@ -98,7 +98,8 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -98,7 +98,8 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
myFactory.setFunctionalgroups(response.data['FunctionalGrp']) myFactory.setFunctionalgroups(response.data['FunctionalGrp'])
myFactory.setEmployeeStatus(response.data['EmployeeStatus']); myFactory.setEmployeeStatus(response.data['EmployeeStatus']);
myFactory.setRoles(response.data['roles']); myFactory.setRoles(response.data['roles']);
myFactory.setShifts(response.data['shifts']);
myFactory.setDomains(response.data['domains']);
}, function myError(response) { }, function myError(response) {
}); });
......
...@@ -42,6 +42,7 @@ myApp.factory('myFactory', function() { ...@@ -42,6 +42,7 @@ myApp.factory('myFactory', function() {
var functionalgroups=""; var functionalgroups="";
var employeeStatus=""; var employeeStatus="";
var employementTypes=""; var employementTypes="";
var domians="";
function setEmpId(id) { function setEmpId(id) {
empId = id; empId = id;
} }
...@@ -85,6 +86,13 @@ myApp.factory('myFactory', function() { ...@@ -85,6 +86,13 @@ myApp.factory('myFactory', function() {
function getRoles() { function getRoles() {
return roles; return roles;
} }
function setDomains(domains1) {
domains = domains1;
}
function getDomains() {
return domains;
}
function setDesignations(designations1) { function setDesignations(designations1) {
designations = designations1; designations = designations1;
} }
...@@ -170,6 +178,8 @@ myApp.factory('myFactory', function() { ...@@ -170,6 +178,8 @@ myApp.factory('myFactory', function() {
getDesignations : getDesignations, getDesignations : getDesignations,
setAccounts : setAccounts, setAccounts : setAccounts,
getAccounts : getAccounts, getAccounts : getAccounts,
setDomains : setDomains,
getDomains : getDomains,
setTechnologies : setTechnologies, setTechnologies : setTechnologies,
getTechnologies : getTechnologies, getTechnologies : getTechnologies,
setLocations : setLocations, setLocations : setLocations,
......
<md-dialog aria-label="Role Template" style="width:520px;height:690px;"> <md-dialog aria-label="Role Template" style="width:700px;height:900px;">
<form ng-cloak name="myForm"> <form ng-cloak name="myForm">
<md-toolbar> <md-toolbar>
<div class="md-toolbar-tools" <div class="md-toolbar-tools"
...@@ -14,37 +14,238 @@ ...@@ -14,37 +14,238 @@
<md-dialog-content> <md-dialog-content>
<div class="md-dialog-content"> <div class="md-dialog-content">
<div class="form-group"> <div class="form-group">
<input type="text" class="form-control" id="empId" name="empId" <div class="row" >
ng-model="empId" placeholder="Employee ID" ng-blur="validateEmpId()" ng-disabled="isDisabled"/> <br> <table width="450px">
<input type="text" class="form-control" id="empName" name="empName" <tr>
ng-model="empName" placeholder="Employee Name" /><br> <td colspan="4">
<input type="text" class="form-control" id="empEmail" name="empEmail" <b >Employee ID</b></td>
<td colspan="8"><input type="text" class="form-control" id="empId" name="empId"
ng-model="empId" placeholder="Employee ID" ng-blur="validateEmpId()" ng-disabled="isDisabled"/>
</td>
<tr>
<td colspan="4">
<b >Employee Name</b></td>
<td colspan="8"><input type="text" class="form-control" id="empName" name="empName"
ng-model="empName" placeholder="Employee Name" />
</td>
</tr>
<tr>
<td colspan="4">
<b >Email</b></td>
<td colspan="8"><input type="text" class="form-control" id="empEmail" name="empEmail"
ng-model="empEmail" placeholder="Email ID" ng-blur="validateEmailId()" ng-disabled="isDisabled"/> ng-model="empEmail" placeholder="Email ID" ng-blur="validateEmailId()" ng-disabled="isDisabled"/>
<md-select ng-model="empRole" md-selected-text="getSelectedRole()" id="empRole" > </td>
</tr>
<tr>
<td colspan="4">
<b >Role</b></td>
<td colspan="8"><md-select ng-model="empRole" md-selected-text="getSelectedRole()" id="empRole" >
<md-optgroup label="roles"> <md-option ng-value="role" <md-optgroup label="roles"> <md-option ng-value="role"
ng-repeat="role in roles">{{role}}</md-option> </md-optgroup> </md-select> ng-repeat="role in roles">{{role}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="empShift" md-selected-text="getSelectedShift()" id="empShift" ng-disabled="isDisabled" style="display:none"> </td>
<md-optgroup label="shifts"> <md-option ng-value="shift" </tr>
ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select> <tr>
<md-select ng-model="designation" md-selected-text="getDesignationText()" id="designation" > <td colspan="4">
<b >Designation</b></td>
<td colspan="8"><md-select ng-model="designation" md-selected-text="getDesignationText()" id="designation" >
<md-optgroup label="designations"> <md-option ng-value="designation" <md-optgroup label="designations"> <md-option ng-value="designation"
ng-repeat="designation in designations">{{designation}}</md-option> </md-optgroup> </md-select> ng-repeat="designation in designations">{{designation}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="empLocation" md-selected-text="getSelectedLocation()" id="empLocation"> </td>
</tr>
<tr>
<td colspan="4">
<b >Work Location</b></td>
<td colspan="8"><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"> </td>
</tr>
<tr>
<td colspan="4">
<b >Functional Group</b></td>
<td colspan="8"> <md-select ng-model="functionalGroup" md-selected-text="getSelectedFunctionalGroup()" id="functionalGroup">
<md-optgroup label="Functional Org"> <md-option ng-value="functionalGroup" <md-optgroup label="Functional Org"> <md-option ng-value="functionalGroup"
ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option> </md-optgroup> </md-select> ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="employmentType" md-selected-text="getSelectedEmploymentType()" id="employmentType"> </td>
</tr>
<tr>
<td colspan="4">
<b >Domain</b></td>
<td colspan="8"> <md-select ng-model="domain" md-selected-text="getSelectedDomain()" id="domain">
<md-optgroup label="Domain"> <md-option ng-value="domain"
ng-repeat="domain in domains">{{domain}}</md-option> </md-optgroup> </md-select>
</td>
</tr>
<tr>
<td colspan="4">
<b >Employment Type</b></td>
<td colspan="8"> <md-select ng-model="employmentType" md-selected-text="getSelectedEmploymentType()" id="employmentType">
<md-optgroup label="Employment Type"> <md-option ng-value="employmentType" <md-optgroup label="Employment Type"> <md-option ng-value="employmentType"
ng-repeat="employmentType in employmentTypes">{{employmentType}}</md-option> </md-optgroup> </md-select> ng-repeat="employmentType in employmentTypes">{{employmentType}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="empStatus" md-selected-text="getSelectedEmpStatus()" id="empStatus"> </td>
</tr>
<tr>
<td colspan="4">
<b >Employment Status</b></td>
<td colspan="8"> <md-select ng-model="empStatus" md-selected-text="getSelectedEmpStatus()" id="empStatus">
<md-optgroup label="Employment Status"> <md-option ng-value="status" <md-optgroup label="Employment Status"> <md-option ng-value="status"
ng-repeat="status in empStatuses">{{status}}</md-option> </md-optgroup> </md-select> ng-repeat="status in empStatuses">{{status}}</md-option> </md-optgroup> </md-select>
</td>
</tr>
<tr>
<td colspan="12">
<div role="alert"> <div role="alert">
<span class="error" style="color: red;">{{alertMsg}}</span> <span class="error" style="color: red;">{{alertMsg}}</span>
</div> </div>
</td>
</tr>
</table>
<!--
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Employee Name</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> <input type="text" class="form-control" id="empName" name="empName"
ng-model="empName" placeholder="Employee Name" />
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Email</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b><input type="text" class="form-control" id="empEmail" name="empEmail"
ng-model="empEmail" placeholder="Email ID" ng-blur="validateEmailId()" ng-disabled="isDisabled"/>
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Role</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b><md-select ng-model="empRole" md-selected-text="getSelectedRole()" id="empRole" >
<md-optgroup label="roles"> <md-option ng-value="role"
ng-repeat="role in roles">{{role}}</md-option> </md-optgroup> </md-select>
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12" style="display:none">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Shift</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b><md-select ng-model="empShift" class="form-control" md-selected-text="getSelectedShift()" id="empShift" ng-disabled="isDisabled" style="display:none">
<md-optgroup label="shifts"> <md-option ng-value="shift"
ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select>
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Designation</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<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>
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Work Location</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> <md-select ng-model="empLocation" md-selected-text="getSelectedLocation()" id="empLocation">
<md-optgroup label="locations"> <md-option ng-value="location"
ng-repeat="location in locations">{{location}}</md-option> </md-optgroup> </md-select>
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Functional Group</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> <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>
</p>
</div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6" >
<p>
<b>Domain</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> <md-select ng-model="domain" md-selected-text="getSelectedDomain()" id="domain">
<md-optgroup label="Domain"> <md-option ng-value="domain"
ng-repeat="domain in domains">{{domain}}</md-option> </md-optgroup> </md-select>
</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> <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>
</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> <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>
</p>
</div>
</div>
</div>
-->
</div>
</div> </div>
</div> </div>
</md-dialog-content> </md-dialog-content>
......
...@@ -186,6 +186,20 @@ ...@@ -186,6 +186,20 @@
</div> </div>
</div>
<div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6">
<p>
<b>Domain</b>
</p>
</div>
<div class="col-lg-7 col-xs-6">
<p>
<b>:</b> {{profile.domain}}
</p>
</div>
</div> </div>
<div class="row col-lg-12 col-xs-12"> <div class="row col-lg-12 col-xs-12">
<div class="col-lg-5 col-xs-6"> <div class="col-lg-5 col-xs-6">
......
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