Unverified Commit 7b17a8c9 authored by mshaik-nisum-com's avatar mshaik-nisum-com Committed by GitHub

Merge pull request #154 from nisum-inc/FEATURE/CUSTOM_FUNCTION_FOR_CANCEL

Feature/custom function for cancel
parents 775f87ed d3d17a1b
...@@ -65,6 +65,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -65,6 +65,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.parentData.hasB1 = row.entity.hasB1; $scope.parentData.hasB1 = row.entity.hasB1;
$scope.parentData.passportExpiryDate = row.entity.passportExpiryDate; $scope.parentData.passportExpiryDate = row.entity.passportExpiryDate;
$scope.parentData.b1ExpiryDate = row.entity.b1ExpiryDate; $scope.parentData.b1ExpiryDate = row.entity.b1ExpiryDate;
$scope.parentData.endDate = row.entity.endDate;
if(action == "Update") if(action == "Update")
$scope.assignRole(action, $scope.parentData); $scope.assignRole(action, $scope.parentData);
else if(action == "Delete") else if(action == "Delete")
...@@ -235,13 +236,14 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -235,13 +236,14 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.employmentType = dataToPass.employmentType; $scope.employmentType = dataToPass.employmentType;
$scope.domain = dataToPass.domain; $scope.domain = dataToPass.domain;
$scope.designation = dataToPass.designation; $scope.designation = dataToPass.designation;
$scope.dateOfJoining = new Date(dataToPass.dateOfJoining); $scope.dateOfJoining = (dataToPass.dateOfJoining == null) ? null : new Date(dataToPass.dateOfJoining);
$scope.dateOfBirth = new Date(dataToPass.dateOfBirth); $scope.dateOfBirth = (dataToPass.dateOfBirth == null) ? null : new Date(dataToPass.dateOfBirth);
$scope.isDisabled = true; $scope.isDisabled = true;
$scope.hasPassort = dataToPass.hasPassort; $scope.hasPassort = dataToPass.hasPassort;
$scope.hasB1 = dataToPass.hasB1; $scope.hasB1 = dataToPass.hasB1;
$scope.passportExpiryDate = new Date(dataToPass.passportExpiryDate); $scope.passportExpiryDate = (dataToPass.passportExpiryDate == null) ? null : new Date(dataToPass.passportExpiryDate);
$scope.b1ExpiryDate = new Date(dataToPass.b1ExpiryDate); $scope.b1ExpiryDate = (dataToPass.b1ExpiryDate == null) ? null : new Date(dataToPass.b1ExpiryDate);
$scope.exitDate = (dataToPass.endDate == null) ? null :new Date(dataToPass.endDate);
} }
$scope.domains = myFactory.getDomains(); $scope.domains = myFactory.getDomains();
$scope.roles = myFactory.getRoles(); $scope.roles = myFactory.getRoles();
...@@ -275,7 +277,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -275,7 +277,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
if ($scope.functionalGroup !== undefined) { if ($scope.functionalGroup !== undefined) {
return $scope.functionalGroup; return $scope.functionalGroup;
} else { } else {
return "Please select a Functional Org"; return "Please select a Functional Group";
} }
}; };
$scope.getSelectedEmploymentType = function(){ $scope.getSelectedEmploymentType = function(){
...@@ -332,8 +334,23 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -332,8 +334,23 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
} }
} }
$scope.validateMessage = function() { $scope.validateMessage = function(type) {
$scope.errorMessage = false;
var emailId = $scope.empEmail;
if (type === 'email') {
if (emailId != "" && !validateEmail(emailId)) {
// $scope.alertMsg = "Please enter a valid
// nisum email id";
$scope.alertMsg = "";
document.getElementById('empEmail').focus();
// $scope.errorMessage = true;
} else {
// $scope.alertMsg = "";
$scope.errorMessage = false;
}
} else {
$scope.errorMessage = false;
}
} }
$scope.validateEmpName = function(){ $scope.validateEmpName = function(){
...@@ -395,6 +412,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -395,6 +412,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var empStatus = $scope.empStatus; var empStatus = $scope.empStatus;
var dateOfJoining = $scope.dateOfJoining; var dateOfJoining = $scope.dateOfJoining;
var dateOfBirth = $scope.dateOfBirth; var dateOfBirth = $scope.dateOfBirth;
var b1ExpiryDate = $scope.b1ExpiryDate;
var passportExpiryDate = $scope.passportExpiryDate;
if(searchId == ""){ if(searchId == ""){
$scope.alertMsg = "Employee Id is mandatory"; $scope.alertMsg = "Employee Id is mandatory";
document.getElementById('empId').focus(); document.getElementById('empId').focus();
...@@ -416,7 +435,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -416,7 +435,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}else if(empEmail == "") { }else if(empEmail == "") {
$scope.alertMsg = "Email ID is mandatory"; $scope.alertMsg = "Email ID is mandatory";
document.getElementById('empEmail').focus(); document.getElementById('empEmail').focus();
}else if(dateOfJoining == undefined){ }else if(!validateEmail(empEmail)){
$scope.alertMsg = "Please enter a valid nisum email id";
document.getElementById('empEmail').focus();
}
else if(dateOfJoining == undefined){
$scope.alertMsg = "Please select a Date Of Joining"; $scope.alertMsg = "Please select a Date Of Joining";
document.getElementById('dateOfJoining').focus(); document.getElementById('dateOfJoining').focus();
}else if(dateOfBirth != undefined && !(today.getFullYear() - dateOfBirth.getFullYear() > 20 )){ }else if(dateOfBirth != undefined && !(today.getFullYear() - dateOfBirth.getFullYear() > 20 )){
...@@ -443,10 +466,19 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -443,10 +466,19 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}else if(hasPassort == undefined){ }else if(hasPassort == undefined){
$scope.alertMsg = "Please select a Passport"; $scope.alertMsg = "Please select a Passport";
document.getElementById('hasPassort').focus(); document.getElementById('hasPassort').focus();
}else if(hasB1 == undefined){ }
else if(hasPassort == "Yes" && (passportExpiryDate == undefined || passportExpiryDate == "")){
$scope.alertMsg = "Please select the Passport Expiry Date:";
document.getElementById('passportExpiryDate').focus();
}
else if(hasB1 == undefined){
$scope.alertMsg = "Please select a Visa"; $scope.alertMsg = "Please select a Visa";
document.getElementById('hasB1').focus(); document.getElementById('hasB1').focus();
} }
else if(hasB1 == "Yes" && (b1ExpiryDate == undefined || b1ExpiryDate == "")){
$scope.alertMsg = "Please select the B1 Expiry Date";
document.getElementById('b1ExpiryDate').focus();
}
else if($scope.templateTitle != "Add" && $scope.exitDate == undefined && $scope.empStatus != "Active"){ else if($scope.templateTitle != "Add" && $scope.exitDate == undefined && $scope.empStatus != "Active"){
$scope.alertMsg = "Please select the exit date"; $scope.alertMsg = "Please select the exit date";
document.getElementById('hasB1').focus(); document.getElementById('hasB1').focus();
...@@ -467,7 +499,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -467,7 +499,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$timeout(function(){updateGrid($scope.templateTitle, record)},500); $timeout(function(){updateGrid($scope.templateTitle, record)},500);
} }
else{ else{
if(isDataUpdated() == true){ var dbRecord = {"employeeId":dataToPass.employeeId, "employeeName": dataToPass.employeeName, "gender": dataToPass.gender,"emailId": dataToPass.emailId,
"role": dataToPass.role, "empLocation": dataToPass.empLocation,"designation": dataToPass.designation,"functionalGroup": dataToPass.functionalGroup,
"empStatus": dataToPass.empStatus,"employmentType": dataToPass.employmentType,"dateOfJoining":new Date(dataToPass.dateOfJoining),
"dateOfBirth":new Date(dataToPass.dateOfBirth),"hasPassort":dataToPass.hasPassort,"hasB1":dataToPass.hasB1
};
if(myFactory.updateFormDataCheck($scope.myForm,dbRecord)){
addOrUpdateRole(record, $scope.templateTitle); addOrUpdateRole(record, $scope.templateTitle);
$timeout(function(){updateGrid($scope.templateTitle, record)},500); $timeout(function(){updateGrid($scope.templateTitle, record)},500);
} }
...@@ -501,10 +538,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -501,10 +538,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
FunctionalGroup:dataToPass.functionalGroup, FunctionalGroup:dataToPass.functionalGroup,
HasPassport:dataToPass.hasPassort, HasPassport:dataToPass.hasPassort,
HasB1Visa:dataToPass.hasB1, HasB1Visa:dataToPass.hasB1,
Dateofjoining: new Date(dataToPass.dateOfJoining), Dateofjoining: (dataToPass.dateOfJoining == null ) ? null : new Date(dataToPass.dateOfJoining),
//DateofBirth:dataToPass.dateOfBirth ? new Date(dataToPass.dateOfBirth) : '' DateofBirth: (dataToPass.dateOfBirth == null ) ? null : new Date(dataToPass.dateOfBirth),
DateofBirth: new Date(dataToPass.dateOfBirth) passportExpiryDate: (dataToPass.passportExpiryDate == null )? null :new Date(dataToPass.passportExpiryDate) ,
b1ExpiryDate: (dataToPass.b1ExpiryDate == null )? null :new Date(dataToPass.b1ExpiryDate)
} }
$scope.currentData={ $scope.currentData={
EmpId: $scope.empId, EmpId: $scope.empId,
...@@ -520,7 +557,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -520,7 +557,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
HasPassport:$scope.hasPassort, HasPassport:$scope.hasPassort,
HasB1Visa:$scope.hasB1, HasB1Visa:$scope.hasB1,
Dateofjoining:$scope.dateOfJoining, Dateofjoining:$scope.dateOfJoining,
DateofBirth:$scope.dateOfBirth DateofBirth:$scope.dateOfBirth,
passportExpiryDate: $scope.passportExpiryDate,
b1ExpiryDate: $scope.b1ExpiryDate,
} }
var predata=JSON.stringify($scope.previousData); var predata=JSON.stringify($scope.previousData);
......
...@@ -183,96 +183,51 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -183,96 +183,51 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$scope.closeSelectBox = function () { $scope.closeSelectBox = function () {
$mdSelect.hide(); $mdSelect.hide();
} }
isDataUpdated = function () {
if (dataToPass.action == "Update") { var getDeliveryManagersFromService = function(){
$scope.previousData = { var managerIds = [];
AccountID: dataToPass.accountId, dataToPass.deliveryManagers.forEach(function(manager){
AccountName: dataToPass.accountName, managerIds.push(manager.employeeId);
IndustryType: dataToPass.industryType, })
ClientAddress: dataToPass.clientAddress, return managerIds;
}
$scope.currentData = {
AccountID: $scope.accountId,
AccountName: $scope.accountName,
IndustryType: $scope.industryType,
ClientAddress: $scope.clientAddress
}
var predata = JSON.stringify($scope.previousData);
var curdata = JSON.stringify($scope.currentData);
var exsistingMangersList = dataToPass.deliveryManagers;
var currentMangersList = $scope.managersSelectedList;
var managerCheck = false;
if (exsistingMangersList.length === currentMangersList.length) {
var temp1 = [];
var temp2 = [];
for (var i in exsistingMangersList) {
temp1.push(exsistingMangersList[i].employeeId);
}
for (var j in currentMangersList) {
temp2.push(currentMangersList[j].employeeId);
}
for (var k = 0; k < exsistingMangersList.length; k++) {
if (temp2.indexOf(temp1[k]) > -1) {
managerCheck = true;
} else {
managerCheck = false;
}
}
}
else {
managerCheck = false;
}
if (predata === curdata && managerCheck) {
//$mdDialog.hide('Cancelled');
return false;
}
return true;
}
} }
var confirmationMsg = function(){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel: 'cancel'
})).then(function () {
$mdDialog.hide('Cancelled');
})
}
$scope.cancel = function () { $scope.cancel = function () {
var showConfirmDialog = false;
if (dataToPass.action == "Update") { if (dataToPass.action == "Add") {
if (isDataUpdated() != true) { var accountForm = myFactory.addFormDataCheck($scope.myForm);
if(Object.keys(accountForm).length == 0){
$mdDialog.hide('Cancelled'); $mdDialog.hide('Cancelled');
} }
else { else{
$mdDialog.show($mdDialog.confirm({ confirmationMsg();
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel: 'cancel'
})).then(function () {
$mdDialog.hide('Cancelled');
})
} }
} }
else{
if (dataToPass.action == "Add") { var dataRequired = {"accountName":dataToPass.accountName,"industryType":dataToPass.industryType,"clientAddress":dataToPass.clientAddress,"deliveryManagers":getDeliveryManagersFromService()};
var totalFields = $scope.myForm.$$controls; var isFormUpated = myFactory.updateFormDataCheck($scope.myForm,dataRequired);
for (key in totalFields) { if(isFormUpated == true){
// console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue) confirmationMsg();
if (totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
showConfirmDialog = true;
} }
} else{
if (showConfirmDialog) {
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel: 'cancel'
})).then(function () {
$mdDialog.hide('Cancelled'); $mdDialog.hide('Cancelled');
}) }
}
else {
$mdDialog.hide('Cancelled');
}
} }
} }
$scope.updateSearch = function (e) { $scope.updateSearch = function (e) {
e.stopPropagation(); e.stopPropagation();
$scope.getSelectedLead(); $scope.getSelectedLead();
...@@ -323,18 +278,20 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -323,18 +278,20 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
ev.stopPropagation(); ev.stopPropagation();
}); });
$scope.accountManagers = function(){
var employeeIdsArray = [];
for(i=0;i< $scope.managersSelectedList.length;i++){
employeeIdsArray[i] =$scope.managersSelectedList[i].employeeId;
}
return employeeIdsArray;
}
$scope.validateFields = function(action){ $scope.validateFields = function(action){
var managersSelectedList = $scope.managersSelectedList; var managersSelectedList = $scope.managersSelectedList;
var accountName = $scope.accountName; var accountName = $scope.accountName;
var industryType = $scope.industryType; var industryType = $scope.industryType;
var clientAddress = $scope.clientAddress; var clientAddress = $scope.clientAddress;
$scope.accountManagers = function(){
var employeeIdsArray = [];
for(i=0;i< $scope.managersSelectedList.length;i++){
employeeIdsArray[i] =$scope.managersSelectedList[i].employeeId;
}
return employeeIdsArray;
}
if(action == "Add"){ if(action == "Add"){
if(accountName == undefined || accountName == ""){ if(accountName == undefined || accountName == ""){
$scope.alertMsg = "Please enter the account Name"; $scope.alertMsg = "Please enter the account Name";
...@@ -360,6 +317,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -360,6 +317,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$timeout(function(){updateGrid($scope.templateTitle, record)},200); $timeout(function(){updateGrid($scope.templateTitle, record)},200);
} }
}else if(action == "Update"){ }else if(action == "Update"){
console.log($scope.myForm);
if(accountName == undefined || accountName == ""){ if(accountName == undefined || accountName == ""){
$scope.alertMsg = "Please enter the account Name"; $scope.alertMsg = "Please enter the account Name";
document.getElementById('accountName').focus(); document.getElementById('accountName').focus();
...@@ -379,19 +337,22 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -379,19 +337,22 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
else{ else{
$scope.alertMsg = ""; $scope.alertMsg = "";
var record = {"accountId":$scope.accountId, "accountName":$scope.accountName,"industryType":$scope.industryType,"clientAddress":$scope.clientAddress,"deliveryManagers":$scope.accountManagers()}; var record = {"accountId":$scope.accountId, "accountName":$scope.accountName,"industryType":$scope.industryType,"clientAddress":$scope.clientAddress,"deliveryManagers":$scope.accountManagers()};
record.id = $scope.parentData.id; var dataRequired = {"accountName":dataToPass.accountName,"industryType":dataToPass.industryType,"clientAddress":dataToPass.clientAddress,"deliveryManagers":getDeliveryManagersFromService()};
if (isDataUpdated() != true) { console.log($scope.myForm);
$mdDialog.show($mdDialog.alert({ var isFormUpated = myFactory.updateFormDataCheck($scope.myForm,dataRequired);
skipHide: true, if(isFormUpated == true){
title: 'Attention', addOrUpdateAccount(record, $scope.templateTitle, "U");
textContent: 'There is no data change to Update', $timeout(function () { updateGrid($scope.templateTitle, record) }, 200);
ok: 'ok' }
})) else{
} $mdDialog.show($mdDialog.alert({
else { skipHide: true,
addOrUpdateAccount(record, $scope.templateTitle, "U"); title: 'Attention',
$timeout(function () { updateGrid($scope.templateTitle, record) }, 200); textContent: 'There is no data change to Update',
} ok: 'ok'
}))
}
record.id = $scope.parentData.id;
} }
} }
}; };
......
...@@ -19,7 +19,7 @@ myApp.constant('appConfig', { ...@@ -19,7 +19,7 @@ myApp.constant('appConfig', {
appUri: "http://10.3.45.11:8080/myTeam/", appUri: "http://10.3.45.11:8080/myTeam/",
version:"1.0", version:"1.0",
empStartId:16001, empStartId:16001,
empEndId:16999, empEndId:99999,
sessionIdle: 900, sessionIdle: 900,
timeOut: 3, timeOut: 3,
keepAlive: 5 keepAlive: 5
...@@ -162,7 +162,62 @@ myApp.factory('myFactory', function() { ...@@ -162,7 +162,62 @@ myApp.factory('myFactory', function() {
function getProfileUrl() { function getProfileUrl() {
return profileUrl; return profileUrl;
} }
function isPagination(records){
if(records.length > 10){
return true;
}
return false;
}
// function addFormDataCheck(form){
// var obj = {};
// form.$$controls.forEach(function(field){
// if(field.$name != "" && field.$name != undefined && field.$viewValue != "" && field.$viewValue != undefined){
// obj[field.$name] = field.$viewValue ;
// }
// });
// return obj;
// }
function sortObjectBasedOnKeys(unordered){
var ordered = {};
Object.keys(unordered).sort().forEach(function(key) {
ordered[key] = unordered[key];
});
console.log(ordered);
return ordered;
}
function addFormDataCheck(form){
var obj = {};
var managerIds = [];
form.$$controls.forEach(function(field){
if(field.$name != "" && field.$name != undefined && field.$viewValue != "" && field.$viewValue != undefined){
if(Array.isArray(field.$viewValue)){
field.$viewValue.forEach(function(manager){
managerIds.push(manager.employeeId);
})
obj[field.$name] = managerIds ;
}
else{
obj[field.$name] = field.$viewValue ;
}
}
});
return obj;
}
function updateFormDataCheck(form,record){
var updatedForm = addFormDataCheck(form);
var sortedUpdatedForm = sortObjectBasedOnKeys(updatedForm);
var sortedRecord = sortObjectBasedOnKeys(record);
if(JSON.stringify(sortedUpdatedForm) == JSON.stringify(sortedRecord)){
return false;
}
return true;
}
return { return {
setEmpId : setEmpId, setEmpId : setEmpId,
getEmpId : getEmpId, getEmpId : getEmpId,
...@@ -197,7 +252,10 @@ myApp.factory('myFactory', function() { ...@@ -197,7 +252,10 @@ myApp.factory('myFactory', function() {
setTemplateUrl : setTemplateUrl, setTemplateUrl : setTemplateUrl,
getTemplateUrl : getTemplateUrl, getTemplateUrl : getTemplateUrl,
setProfileUrl : setProfileUrl, setProfileUrl : setProfileUrl,
getProfileUrl : getProfileUrl getProfileUrl : getProfileUrl,
isPagination : isPagination,
addFormDataCheck : addFormDataCheck,
updateFormDataCheck : updateFormDataCheck
} }
}); });
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<b >Industry Type</b></td> <b >Industry Type</b></td>
<td colspan="8"> <td colspan="8">
<md-select ng-model="industryType" <md-select ng-model="industryType"
md-selected-text="getIndustryTypeSelected()" id="industryType"> md-selected-text="getIndustryTypeSelected()" id="industryType" name="industryType" >
<md-optgroup label="Industry Type"> <md-option <md-optgroup label="Industry Type"> <md-option
ng-value="industryType" ng-repeat="industryType in industryTypesList">{{industryType}}</md-option> ng-value="industryType" ng-repeat="industryType in industryTypesList">{{industryType}}</md-option>
</md-optgroup> </md-select> </md-optgroup> </md-select>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<b >Client Address</b></td> <b >Client Address</b></td>
<td colspan="8"> <td colspan="8">
<!-- <md-input-container class="md-block"> --> <!-- <md-input-container class="md-block"> -->
<textarea ng-model="clientAddress" id="clientAddress" placeholder = "Please enter the client address" style="width:100%" md-select-on-focus></textarea> <textarea ng-model="clientAddress" id="clientAddress" name="clientAddress" placeholder = "Please enter the client address" style="width:100%" md-select-on-focus></textarea>
<!-- </md-input-container> --> <!-- </md-input-container> -->
</td> </td>
</tr> </tr>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</div> </div>
</div> </div>
<div style="display: block; float: left; width: 100%;"> <div style="display: block; float: left; width: 100%;">
<md-select ng-model="managersSelectedList" data-md-container-class="selectHeader" id="selectManager" multiple="" md-selected-text="getSelectedLead()" ng-change="persistSelections()"> <md-select ng-model="managersSelectedList" data-md-container-class="selectHeader" name="deliveryManagers" id="selectManager" multiple="" md-selected-text="getSelectedLead()" ng-change="persistSelections()">
<md-select-header class="selectHeaderChild header-spacing" layout="column"> <md-select-header class="selectHeaderChild header-spacing" layout="column">
<input ng-model="searchTerm" type="search" id="search" ng-keydown="updateSearch($event)" ng-model-options="{debounce: {'default': 500, 'blur': 0}}" placeholder="Please Search for a manager" class="searchBoxHeader demo-header-searchbox md-text search-spacingleft" /> <input ng-model="searchTerm" type="search" id="search" ng-keydown="updateSearch($event)" ng-model-options="{debounce: {'default': 500, 'blur': 0}}" placeholder="Please Search for a manager" class="searchBoxHeader demo-header-searchbox md-text search-spacingleft" />
<span class="glyphicon glyphicon-remove close-mdselect" ng-click="closeSelectBox()"></span> <span class="glyphicon glyphicon-remove close-mdselect" ng-click="closeSelectBox()"></span>
......
...@@ -22,19 +22,19 @@ ...@@ -22,19 +22,19 @@
<tr> <tr>
<td colspan="4"><b>Emp ID:</b><span class="mandatory"></span></td> <td colspan="4"><b>Emp ID:</b><span class="mandatory"></span></td>
<td colspan="8"><input type="text" class="form-control" <td colspan="8"><input type="text" class="form-control"
id="empId" name="empId" ng-model="empId" id="empId" name="employeeId" ng-model="empId"
placeholder="Employee ID" ng-blur="validateEmpId()" placeholder="Employee ID" ng-blur="validateEmpId()"
ng-disabled="isDisabled" /></td><!-- ng-blur="validateEmpId()'' --> ng-disabled="isDisabled" /></td><!-- ng-blur="validateEmpId()'' -->
<tr> <tr>
<tr> <tr>
<td colspan="4"><b>Employee Name:</b><span class="mandatory"></span></td> <td colspan="4"><b>Employee Name:</b><span class="mandatory"></span></td>
<td colspan="8"><input type="text" class="form-control" <td colspan="8"><input type="text" class="form-control"
id="empName" name="empName" ng-model="empName" id="empName" name="employeeName" ng-model="empName"
placeholder="Employee Name" ng-blur="validateEmpName()"/></td><!-- ng-blur="validateEmpName()"--> placeholder="Employee Name" ng-blur="validateEmpName()"/></td><!-- ng-blur="validateEmpName()"-->
</tr> </tr>
<tr> <tr>
<td colspan="-10"><b>Gender:</b><span class="mandatory"></span></td> <td colspan="-10"><b>Gender:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="gender" ng-blur="validateMessage()" <td colspan="8"><md-select ng-model="gender" ng-blur="validateMessage()" name="gender"
md-selected-text="getSelectedGender()" id="gender"> md-selected-text="getSelectedGender()" id="gender">
<md-option ng-model="gender" value="Male">Male </md-option> <md-option <md-option ng-model="gender" value="Male">Male </md-option> <md-option
ng-model="gender" value="Female">Female</md-option> </md-select></td> ng-model="gender" value="Female">Female</md-option> </md-select></td>
...@@ -43,22 +43,22 @@ ...@@ -43,22 +43,22 @@
<tr> <tr>
<td colspan="4"><b>Email:</b><span class="mandatory"></span></td> <td colspan="4"><b>Email:</b><span class="mandatory"></span></td>
<td colspan="8"><input type="text" class="form-control" <td colspan="8"><input type="text" class="form-control"
id="empEmail" name="empEmail" ng-model="empEmail" id="empEmail" name="emailId" ng-model="empEmail"
placeholder="Email ID" ng-blur="validateEmailId()" placeholder="Email ID" ng-blur="validateMessage('email')"
ng-disabled="isDisabled" style="text-transform: lowercase;"/></td><!--ng-blur="validateEmailId()"--> ng-disabled="isDisabled" style="text-transform: lowercase;"/></td><!--ng-blur="validateEmailId()"-->
</tr> </tr>
<tr> <tr>
<td colspan="4"><b>Date of Joining:</b><span class="mandatory"></span></td> <td colspan="4"><b>Date of Joining:</b><span class="mandatory"></span></td>
<td colspan="8"><md-datepicker ng-model="dateOfJoining" id="dateOfJoining" <td colspan="8"><md-datepicker ng-model="dateOfJoining" id="dateOfJoining"
md-placeholder="Date of Joining" md-min-date="minDate" id="dateOfBirth" name="dateOfJoining" md-placeholder="Date of Joining" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false" ng-blur="validateMessage()"></md-datepicker> md-max-date="maxDate" onkeydown="return false" ng-blur="validateMessage()"></md-datepicker>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="4"><b>Date of Birth:</b></td> <td colspan="4"><b>Date of Birth:</b></td>
<td colspan="8"><md-datepicker ng-model="dateOfBirth" <td colspan="8"><md-datepicker ng-model="dateOfBirth" id="dateOfBirth" name="dateOfBirth"
md-placeholder="Date of Birth" md-min-date="minDate" md-placeholder="Date of Birth" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false"></md-datepicker> md-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td> </td>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<tr ng-show="templateTitle != 'Add'"> <tr ng-show="templateTitle != 'Add'">
<td colspan="4"><b>Employment Status {{templateTitle}}:</b><span class="mandatory"></span></td> <td colspan="4"><b>Employment Status {{templateTitle}}:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="empStatus" <td colspan="8"><md-select ng-model="empStatus" name ="empStatus"
md-selected-text="getSelectedEmpStatus()" id="empStatus"> md-selected-text="getSelectedEmpStatus()" id="empStatus">
<md-optgroup label="Employment Status"> <md-option <md-optgroup label="Employment Status"> <md-option
ng-value="status" ng-repeat="status in empStatuses">{{status}}</md-option> ng-value="status" ng-repeat="status in empStatuses">{{status}}</md-option>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</tr> </tr>
<tr ng-show="empStatus == 'In Active'"> <tr ng-show="empStatus == 'In Active'">
<td colspan="4"><b>Employee Exit Date:</b><span class="mandatory"></span></td> <td colspan="4"><b>Employee Exit Date:</b><span class="mandatory"></span></td>
<td colspan="8"><md-datepicker ng-model="exitDate" <td colspan="8"><md-datepicker ng-model="exitDate" name="endDate"
md-placeholder="Exit Date" md-min-date="minDate" md-placeholder="Exit Date" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false"></md-datepicker> md-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td> </td>
...@@ -102,9 +102,9 @@ ...@@ -102,9 +102,9 @@
<tr> <tr>
<td colspan="4"><b>Functional Group:</b><span class="mandatory"></span></td> <td colspan="4"><b>Functional Group:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-blur="validateMessage()" ng-model="functionalGroup" <td colspan="8"><md-select ng-blur="validateMessage()" ng-model="functionalGroup"
md-selected-text="getSelectedFunctionalGroup()" md-selected-text="getSelectedFunctionalGroup()" name="functionalGroup"
id="functionalGroup"> <md-optgroup id="functionalGroup"> <md-optgroup
label="Functional Org"> <md-option label="Functional Group"> <md-option
ng-value="functionalGroup" ng-value="functionalGroup"
ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option> ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option>
</md-optgroup> </md-select></td> </md-optgroup> </md-select></td>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<tr> <tr>
<td colspan="4"><b>Designation:</b><span class="mandatory"></span></td> <td colspan="4"><b>Designation:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="designation" ng-blur="validateMessage()" <td colspan="8"><md-select ng-model="designation" ng-blur="validateMessage()" name="designation"
md-selected-text="getDesignationText()" id="designation"> md-selected-text="getDesignationText()" id="designation">
<md-optgroup label="designations"> <md-option <md-optgroup label="designations"> <md-option
ng-value="designation" ng-repeat="designation in designations">{{designation}}</md-option> ng-value="designation" ng-repeat="designation in designations">{{designation}}</md-option>
...@@ -121,8 +121,8 @@ ...@@ -121,8 +121,8 @@
</tr> </tr>
<tr> <tr>
<td colspan="4"><b>Work Location:</b><span class="mandatory"></span></td> <td colspan="4"><b>Work &nbsp;Location:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="empLocation" ng-blur="validateMessage()" <td colspan="8"><md-select ng-model="empLocation" ng-blur="validateMessage()" name="empLocation"
md-selected-text="getSelectedLocation()" id="empLocation"> md-selected-text="getSelectedLocation()" id="empLocation">
<md-optgroup label="locations"> <md-option <md-optgroup label="locations"> <md-option
ng-value="location" ng-repeat="location in locations">{{location}}</md-option> ng-value="location" ng-repeat="location in locations">{{location}}</md-option>
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<tr> <tr>
<td colspan="4"><b>Employment Type:</b><span class="mandatory"></span></td> <td colspan="4"><b>Employment Type:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="employmentType" ng-blur="validateMessage()" <td colspan="8"><md-select ng-model="employmentType" ng-blur="validateMessage()" name="employmentType"
md-selected-text="getSelectedEmploymentType()" md-selected-text="getSelectedEmploymentType()"
id="employmentType"> <md-optgroup id="employmentType"> <md-optgroup
label="Employment Type"> <md-option label="Employment Type"> <md-option
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
<tr> <tr>
<td colspan="4"><b>Org Role:</b><span class="mandatory"></span></td> <td colspan="4"><b>Org Role:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="empRole" ng-blur="validateMessage()" <td colspan="8"><md-select ng-model="empRole" ng-blur="validateMessage()"
md-selected-text="getSelectedRole()" id="empRole"> <md-optgroup md-selected-text="getSelectedRole()" name="role" id="empRole"> <md-optgroup
label="roles"> <md-option ng-value="role" label="roles"> <md-option ng-value="role"
ng-repeat="role in roles">{{role}}</md-option> </md-optgroup> </md-select></td> ng-repeat="role in roles">{{role}}</md-option> </md-optgroup> </md-select></td>
</tr> </tr>
...@@ -169,30 +169,30 @@ ...@@ -169,30 +169,30 @@
<tr> <tr>
<td colspan="1"><b>HasPassport:</b><span class="mandatory"></span></td> <td colspan="1"><b>HasPassport:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="hasPassort" ng-blur="validateMessage()" <td colspan="8"><md-select ng-model="hasPassort" ng-blur="validateMessage()"
id="hasPassort"> <md-option ng-model="hasPassort" id="hasPassort"> <md-option ng-model="hasPassort" name="hasPassort"
value="Yes">Yes </md-option> <md-option ng-model="hasPassort" value="Yes">Yes </md-option> <md-option ng-model="hasPassort"
value="No">No</md-option> </md-select></td> value="No">No</md-option> </md-select></td>
</tr> </tr>
<tr ng-if="hasPassort == 'Yes'"> <tr ng-show="hasPassort == 'Yes'">
<td colspan="4"><b>Passport Expiry Date:</b></td> <td colspan="4"><b>Passport Expiry Date:</b><span class="mandatory"></span></td>
<td colspan="8"><md-datepicker ng-model="passportExpiryDate" <td colspan="8"><md-datepicker ng-model="passportExpiryDate"
md-placeholder="Passport Expiry Date" md-min-date="minDate" id="passportExpiryDate" md-placeholder="Passport Expiry Date" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false"></md-datepicker> name="passportExpiryDate" md-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="1"><b>Has B1 Visa:</b><span class="mandatory"></span></td> <td colspan="1"><b>Has B1 Visa:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="hasB1" id="hasB1" ng-blur="validateMessage()"> <td colspan="8"><md-select ng-model="hasB1" id="hasB1" ng-blur="validateMessage()" name="hasB1">
<md-option ng-model="hasB1" value="Yes">Yes </md-option> <md-option <md-option ng-model="hasB1" value="Yes">Yes </md-option> <md-option
ng-model="hasB1" value="No">No</md-option> </md-select></td> ng-model="hasB1" value="No">No</md-option> </md-select></td>
</tr> </tr>
<tr ng-if="hasB1 == 'Yes'"> <tr ng-show="hasB1 == 'Yes'">
<td colspan="4"><b>B1 Expiry Date:</b></td> <td colspan="4"><b>B1 Expiry Date:</b><span class="mandatory"></span></td>
<td colspan="8"><md-datepicker ng-model="b1ExpiryDate" <td colspan="8"><md-datepicker ng-model="b1ExpiryDate" name="b1ExpiryDate"
md-placeholder="B1 Expiry Date" md-min-date="minDate" id="b1ExpiryDate" md-placeholder="B1 Expiry Date" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false"></md-datepicker> md-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td> </td>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment