Commit 3a248931 authored by Venkatesh M's avatar Venkatesh M

Passport and visa validations updated

parent 924fb285
......@@ -483,15 +483,15 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.alertMsg = "Please select the Future Date for passport Expiry";
document.getElementById('passportExpiryDate').focus();
}
else if(hasB1 == undefined){
else if(hasPassort == "Yes" && hasPassort !== undefined && hasB1 == undefined){
$scope.alertMsg = "Please select a Visa";
document.getElementById('hasB1').focus();
}
else if(hasB1 == "Yes" && (b1ExpiryDate == undefined || b1ExpiryDate == "")){
else if(hasPassort == "Yes" && hasPassort !== undefined && hasB1 == "Yes" && (b1ExpiryDate == undefined || b1ExpiryDate == "")){
$scope.alertMsg = "Please select the B1 Expiry Date ";
document.getElementById('b1ExpiryDate').focus();
}
else if(hasB1 == "Yes" && (b1ExpiryDate < today)){
else if(hasPassort == "Yes" && hasPassort !== undefined && hasB1 == "Yes" && (b1ExpiryDate < today)){
$scope.alertMsg = "Please select the Future Date for B1 Expiry";
document.getElementById('b1ExpiryDate').focus();
}
......@@ -548,6 +548,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
if(obj.hasPassort != "Yes"){
delete obj['passportExpiryDate'];
delete obj['hasB1'];
delete obj['b1ExpiryDate'];
}
if(obj.empStatus == "Active"){
delete obj['endDate'];
......
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