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 {
private String functionalGroup;
private String empStatus;
private String employmentType;
private String domain;
@DateTimeFormat(iso = ISO.DATE)
private Date startDate;
@DateTimeFormat(iso = ISO.DATE)
......
......@@ -34,6 +34,7 @@ public class EmployeeRoles implements Serializable {
private String designation;
private String shift;
private String baseTechnology;
private String domain;
private String empLocation;
private String technologyKnown;
private String mobileNumber;
......
......@@ -126,6 +126,8 @@ public class UserServiceImpl implements UserService {
update.set("functionalGroup", employeeRoles.getFunctionalGroup());
update.set("empStatus", employeeRoles.getEmpStatus());
update.set("employmentType", employeeRoles.getEmploymentType());
update.set("empLocation", employeeRoles.getEmpLocation());
update.set("domain", employeeRoles.getDomain());
update.set("designation", employeeRoles.getDesignation());
update.set("lastModifiedOn", new Date());
FindAndModifyOptions options = new FindAndModifyOptions();
......
......@@ -60,8 +60,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$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.empStatus = row.entity.empStatus;
$scope.parentData.employmentType = row.entity.employmentType;
$scope.parentData.domain = row.entity.domain;
if(action == "Update")
$scope.assignRole(action, $scope.parentData);
else if(action == "Delete")
......@@ -232,6 +233,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.empStatus = "";
$scope.employmentType = "";
$scope.designation = "";
$scope.domain = "";
$scope.isDisabled = false;
}else if(dataToPass.action == "Update"){
$scope.empId = dataToPass.employeeId;
......@@ -242,9 +244,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.functionalGroup = dataToPass.functionalGroup;
$scope.empStatus = dataToPass.empStatus;
$scope.employmentType = dataToPass.employmentType;
$scope.domain = dataToPass.domain;
$scope.designation = dataToPass.designation;
$scope.isDisabled = true;
}
$scope.domains = myFactory.getDomains();
$scope.roles = myFactory.getRoles();
$scope.locations=myFactory.getLocations();
$scope.designations=myFactory.getDesignations();
......@@ -286,6 +290,13 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
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(){
if ($scope.empStatus !== undefined) {
return $scope.empStatus;
......@@ -370,7 +381,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
document.getElementById('empRole').focus();
}else{
$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);
$timeout(function(){updateGrid($scope.templateTitle, record)},500);
}
......
......@@ -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 : '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 : '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 : 'empStatus',displayName: 'Employment Status', 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
var profile = googleUser.getBasicProfile();
getUserRole(profile);
getAllUserRoles();
getAllShifts();
//getAllShifts();
getAllDesignations();
getAllTechnologies();
getAllLocations();
......@@ -98,7 +98,8 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
myFactory.setFunctionalgroups(response.data['FunctionalGrp'])
myFactory.setEmployeeStatus(response.data['EmployeeStatus']);
myFactory.setRoles(response.data['roles']);
myFactory.setShifts(response.data['shifts']);
myFactory.setDomains(response.data['domains']);
}, function myError(response) {
});
......
......@@ -42,6 +42,7 @@ myApp.factory('myFactory', function() {
var functionalgroups="";
var employeeStatus="";
var employementTypes="";
var domians="";
function setEmpId(id) {
empId = id;
}
......@@ -85,6 +86,13 @@ myApp.factory('myFactory', function() {
function getRoles() {
return roles;
}
function setDomains(domains1) {
domains = domains1;
}
function getDomains() {
return domains;
}
function setDesignations(designations1) {
designations = designations1;
}
......@@ -170,6 +178,8 @@ myApp.factory('myFactory', function() {
getDesignations : getDesignations,
setAccounts : setAccounts,
getAccounts : getAccounts,
setDomains : setDomains,
getDomains : getDomains,
setTechnologies : setTechnologies,
getTechnologies : getTechnologies,
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">
<md-toolbar>
<div class="md-toolbar-tools"
......@@ -14,37 +14,238 @@
<md-dialog-content>
<div class="md-dialog-content">
<div class="form-group">
<input type="text" class="form-control" id="empId" name="empId"
ng-model="empId" placeholder="Employee ID" ng-blur="validateEmpId()" ng-disabled="isDisabled"/> <br>
<input type="text" class="form-control" id="empName" name="empName"
ng-model="empName" placeholder="Employee Name" /><br>
<input type="text" class="form-control" id="empEmail" name="empEmail"
<div class="row" >
<table width="450px">
<tr>
<td colspan="4">
<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"/>
<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"
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">
<md-optgroup label="shifts"> <md-option ng-value="shift"
ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="designation" md-selected-text="getDesignationText()" id="designation" >
</td>
</tr>
<tr>
<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"
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"
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"
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"
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"
ng-repeat="status in empStatuses">{{status}}</md-option> </md-optgroup> </md-select>
</td>
</tr>
<tr>
<td colspan="12">
<div role="alert">
<span class="error" style="color: red;">{{alertMsg}}</span>
</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>
</md-dialog-content>
......
......@@ -186,6 +186,20 @@
</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 class="row col-lg-12 col-xs-12">
<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