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, $
$scope.parentData.hasB1 = row.entity.hasB1;
$scope.parentData.passportExpiryDate = row.entity.passportExpiryDate;
$scope.parentData.b1ExpiryDate = row.entity.b1ExpiryDate;
$scope.parentData.endDate = row.entity.endDate;
if(action == "Update")
$scope.assignRole(action, $scope.parentData);
else if(action == "Delete")
......@@ -235,13 +236,14 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.employmentType = dataToPass.employmentType;
$scope.domain = dataToPass.domain;
$scope.designation = dataToPass.designation;
$scope.dateOfJoining = new Date(dataToPass.dateOfJoining);
$scope.dateOfBirth = new Date(dataToPass.dateOfBirth);
$scope.dateOfJoining = (dataToPass.dateOfJoining == null) ? null : new Date(dataToPass.dateOfJoining);
$scope.dateOfBirth = (dataToPass.dateOfBirth == null) ? null : new Date(dataToPass.dateOfBirth);
$scope.isDisabled = true;
$scope.hasPassort = dataToPass.hasPassort;
$scope.hasB1 = dataToPass.hasB1;
$scope.passportExpiryDate = new Date(dataToPass.passportExpiryDate);
$scope.b1ExpiryDate = new Date(dataToPass.b1ExpiryDate);
$scope.passportExpiryDate = (dataToPass.passportExpiryDate == null) ? null : new Date(dataToPass.passportExpiryDate);
$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.roles = myFactory.getRoles();
......@@ -275,7 +277,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
if ($scope.functionalGroup !== undefined) {
return $scope.functionalGroup;
} else {
return "Please select a Functional Org";
return "Please select a Functional Group";
}
};
$scope.getSelectedEmploymentType = function(){
......@@ -332,8 +334,23 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
}
$scope.validateMessage = function() {
$scope.errorMessage = false;
$scope.validateMessage = function(type) {
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(){
......@@ -395,6 +412,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var empStatus = $scope.empStatus;
var dateOfJoining = $scope.dateOfJoining;
var dateOfBirth = $scope.dateOfBirth;
var b1ExpiryDate = $scope.b1ExpiryDate;
var passportExpiryDate = $scope.passportExpiryDate;
if(searchId == ""){
$scope.alertMsg = "Employee Id is mandatory";
document.getElementById('empId').focus();
......@@ -416,7 +435,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}else if(empEmail == "") {
$scope.alertMsg = "Email ID is mandatory";
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";
document.getElementById('dateOfJoining').focus();
}else if(dateOfBirth != undefined && !(today.getFullYear() - dateOfBirth.getFullYear() > 20 )){
......@@ -443,10 +466,19 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}else if(hasPassort == undefined){
$scope.alertMsg = "Please select a Passport";
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";
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"){
$scope.alertMsg = "Please select the exit date";
document.getElementById('hasB1').focus();
......@@ -467,7 +499,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$timeout(function(){updateGrid($scope.templateTitle, record)},500);
}
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);
$timeout(function(){updateGrid($scope.templateTitle, record)},500);
}
......@@ -501,10 +538,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
FunctionalGroup:dataToPass.functionalGroup,
HasPassport:dataToPass.hasPassort,
HasB1Visa:dataToPass.hasB1,
Dateofjoining: new Date(dataToPass.dateOfJoining),
//DateofBirth:dataToPass.dateOfBirth ? new Date(dataToPass.dateOfBirth) : ''
DateofBirth: new Date(dataToPass.dateOfBirth)
Dateofjoining: (dataToPass.dateOfJoining == null ) ? null : new Date(dataToPass.dateOfJoining),
DateofBirth: (dataToPass.dateOfBirth == null ) ? null : new Date(dataToPass.dateOfBirth),
passportExpiryDate: (dataToPass.passportExpiryDate == null )? null :new Date(dataToPass.passportExpiryDate) ,
b1ExpiryDate: (dataToPass.b1ExpiryDate == null )? null :new Date(dataToPass.b1ExpiryDate)
}
$scope.currentData={
EmpId: $scope.empId,
......@@ -520,7 +557,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
HasPassport:$scope.hasPassort,
HasB1Visa:$scope.hasB1,
Dateofjoining:$scope.dateOfJoining,
DateofBirth:$scope.dateOfBirth
DateofBirth:$scope.dateOfBirth,
passportExpiryDate: $scope.passportExpiryDate,
b1ExpiryDate: $scope.b1ExpiryDate,
}
var predata=JSON.stringify($scope.previousData);
......
......@@ -183,96 +183,51 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$scope.closeSelectBox = function () {
$mdSelect.hide();
}
isDataUpdated = function () {
if (dataToPass.action == "Update") {
$scope.previousData = {
AccountID: dataToPass.accountId,
AccountName: dataToPass.accountName,
IndustryType: dataToPass.industryType,
ClientAddress: dataToPass.clientAddress,
}
$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 getDeliveryManagersFromService = function(){
var managerIds = [];
dataToPass.deliveryManagers.forEach(function(manager){
managerIds.push(manager.employeeId);
})
return managerIds;
}
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 () {
var showConfirmDialog = false;
if (dataToPass.action == "Update") {
if (isDataUpdated() != true) {
if (dataToPass.action == "Add") {
var accountForm = myFactory.addFormDataCheck($scope.myForm);
if(Object.keys(accountForm).length == 0){
$mdDialog.hide('Cancelled');
}
else {
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel: 'cancel'
})).then(function () {
$mdDialog.hide('Cancelled');
})
else{
confirmationMsg();
}
}
if (dataToPass.action == "Add") {
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
// console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if (totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
showConfirmDialog = true;
else{
var dataRequired = {"accountName":dataToPass.accountName,"industryType":dataToPass.industryType,"clientAddress":dataToPass.clientAddress,"deliveryManagers":getDeliveryManagersFromService()};
var isFormUpated = myFactory.updateFormDataCheck($scope.myForm,dataRequired);
if(isFormUpated == true){
confirmationMsg();
}
}
if (showConfirmDialog) {
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel: 'cancel'
})).then(function () {
else{
$mdDialog.hide('Cancelled');
})
}
else {
$mdDialog.hide('Cancelled');
}
}
}
}
$scope.updateSearch = function (e) {
e.stopPropagation();
$scope.getSelectedLead();
......@@ -323,18 +278,20 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
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){
var managersSelectedList = $scope.managersSelectedList;
var accountName = $scope.accountName;
var industryType = $scope.industryType;
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(accountName == undefined || accountName == ""){
$scope.alertMsg = "Please enter the account Name";
......@@ -360,6 +317,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$timeout(function(){updateGrid($scope.templateTitle, record)},200);
}
}else if(action == "Update"){
console.log($scope.myForm);
if(accountName == undefined || accountName == ""){
$scope.alertMsg = "Please enter the account Name";
document.getElementById('accountName').focus();
......@@ -379,19 +337,22 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
else{
$scope.alertMsg = "";
var record = {"accountId":$scope.accountId, "accountName":$scope.accountName,"industryType":$scope.industryType,"clientAddress":$scope.clientAddress,"deliveryManagers":$scope.accountManagers()};
record.id = $scope.parentData.id;
if (isDataUpdated() != true) {
$mdDialog.show($mdDialog.alert({
skipHide: true,
title: 'Attention',
textContent: 'There is no data change to Update',
ok: 'ok'
}))
}
else {
addOrUpdateAccount(record, $scope.templateTitle, "U");
$timeout(function () { updateGrid($scope.templateTitle, record) }, 200);
}
var dataRequired = {"accountName":dataToPass.accountName,"industryType":dataToPass.industryType,"clientAddress":dataToPass.clientAddress,"deliveryManagers":getDeliveryManagersFromService()};
console.log($scope.myForm);
var isFormUpated = myFactory.updateFormDataCheck($scope.myForm,dataRequired);
if(isFormUpated == true){
addOrUpdateAccount(record, $scope.templateTitle, "U");
$timeout(function () { updateGrid($scope.templateTitle, record) }, 200);
}
else{
$mdDialog.show($mdDialog.alert({
skipHide: true,
title: 'Attention',
textContent: 'There is no data change to Update',
ok: 'ok'
}))
}
record.id = $scope.parentData.id;
}
}
};
......
......@@ -19,7 +19,7 @@ myApp.constant('appConfig', {
appUri: "http://10.3.45.11:8080/myTeam/",
version:"1.0",
empStartId:16001,
empEndId:16999,
empEndId:99999,
sessionIdle: 900,
timeOut: 3,
keepAlive: 5
......@@ -162,7 +162,62 @@ myApp.factory('myFactory', function() {
function getProfileUrl() {
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 {
setEmpId : setEmpId,
getEmpId : getEmpId,
......@@ -197,7 +252,10 @@ myApp.factory('myFactory', function() {
setTemplateUrl : setTemplateUrl,
getTemplateUrl : getTemplateUrl,
setProfileUrl : setProfileUrl,
getProfileUrl : getProfileUrl
getProfileUrl : getProfileUrl,
isPagination : isPagination,
addFormDataCheck : addFormDataCheck,
updateFormDataCheck : updateFormDataCheck
}
});
......
......@@ -30,7 +30,7 @@
<b >Industry Type</b></td>
<td colspan="8">
<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
ng-value="industryType" ng-repeat="industryType in industryTypesList">{{industryType}}</md-option>
</md-optgroup> </md-select>
......@@ -41,7 +41,7 @@
<b >Client Address</b></td>
<td colspan="8">
<!-- <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> -->
</td>
</tr>
......@@ -55,7 +55,7 @@
</div>
</div>
<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">
<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>
......
......@@ -22,19 +22,19 @@
<tr>
<td colspan="4"><b>Emp ID:</b><span class="mandatory"></span></td>
<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()"
ng-disabled="isDisabled" /></td><!-- ng-blur="validateEmpId()'' -->
<tr>
<tr>
<td colspan="4"><b>Employee Name:</b><span class="mandatory"></span></td>
<td colspan="8"><input type="text" class="form-control"
id="empName" name="empName" ng-model="empName"
<td colspan="8"><input type="text" class="form-control"
id="empName" name="employeeName" ng-model="empName"
placeholder="Employee Name" ng-blur="validateEmpName()"/></td><!-- ng-blur="validateEmpName()"-->
</tr>
<tr>
<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-option ng-model="gender" value="Male">Male </md-option> <md-option
ng-model="gender" value="Female">Female</md-option> </md-select></td>
......@@ -43,22 +43,22 @@
<tr>
<td colspan="4"><b>Email:</b><span class="mandatory"></span></td>
<td colspan="8"><input type="text" class="form-control"
id="empEmail" name="empEmail" ng-model="empEmail"
placeholder="Email ID" ng-blur="validateEmailId()"
id="empEmail" name="emailId" ng-model="empEmail"
placeholder="Email ID" ng-blur="validateMessage('email')"
ng-disabled="isDisabled" style="text-transform: lowercase;"/></td><!--ng-blur="validateEmailId()"-->
</tr>
<tr>
<td colspan="4"><b>Date of Joining:</b><span class="mandatory"></span></td>
<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>
</td>
</tr>
<tr>
<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-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td>
......@@ -66,7 +66,7 @@
<tr ng-show="templateTitle != 'Add'">
<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-optgroup label="Employment Status"> <md-option
ng-value="status" ng-repeat="status in empStatuses">{{status}}</md-option>
......@@ -74,7 +74,7 @@
</tr>
<tr ng-show="empStatus == 'In Active'">
<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-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td>
......@@ -102,9 +102,9 @@
<tr>
<td colspan="4"><b>Functional Group:</b><span class="mandatory"></span></td>
<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
label="Functional Org"> <md-option
label="Functional Group"> <md-option
ng-value="functionalGroup"
ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option>
</md-optgroup> </md-select></td>
......@@ -113,7 +113,7 @@
<tr>
<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-optgroup label="designations"> <md-option
ng-value="designation" ng-repeat="designation in designations">{{designation}}</md-option>
......@@ -121,8 +121,8 @@
</tr>
<tr>
<td colspan="4"><b>Work Location:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="empLocation" ng-blur="validateMessage()"
<td colspan="4"><b>Work &nbsp;Location:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="empLocation" ng-blur="validateMessage()" name="empLocation"
md-selected-text="getSelectedLocation()" id="empLocation">
<md-optgroup label="locations"> <md-option
ng-value="location" ng-repeat="location in locations">{{location}}</md-option>
......@@ -131,7 +131,7 @@
<tr>
<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()"
id="employmentType"> <md-optgroup
label="Employment Type"> <md-option
......@@ -161,7 +161,7 @@
<tr>
<td colspan="4"><b>Org Role:</b><span class="mandatory"></span></td>
<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"
ng-repeat="role in roles">{{role}}</md-option> </md-optgroup> </md-select></td>
</tr>
......@@ -169,30 +169,30 @@
<tr>
<td colspan="1"><b>HasPassport:</b><span class="mandatory"></span></td>
<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="No">No</md-option> </md-select></td>
</tr>
<tr ng-if="hasPassort == 'Yes'">
<td colspan="4"><b>Passport Expiry Date:</b></td>
<tr ng-show="hasPassort == 'Yes'">
<td colspan="4"><b>Passport Expiry Date:</b><span class="mandatory"></span></td>
<td colspan="8"><md-datepicker ng-model="passportExpiryDate"
md-placeholder="Passport Expiry Date" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false"></md-datepicker>
id="passportExpiryDate" md-placeholder="Passport Expiry Date" md-min-date="minDate"
name="passportExpiryDate" md-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td>
</tr>
<tr>
<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
ng-model="hasB1" value="No">No</md-option> </md-select></td>
</tr>
<tr ng-if="hasB1 == 'Yes'">
<td colspan="4"><b>B1 Expiry Date:</b></td>
<td colspan="8"><md-datepicker ng-model="b1ExpiryDate"
md-placeholder="B1 Expiry Date" md-min-date="minDate"
<tr ng-show="hasB1 == 'Yes'">
<td colspan="4"><b>B1 Expiry Date:</b><span class="mandatory"></span></td>
<td colspan="8"><md-datepicker ng-model="b1ExpiryDate" name="b1ExpiryDate"
id="b1ExpiryDate" md-placeholder="B1 Expiry Date" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td>
</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