Commit c387c185 authored by mduppanapudi-nisum-com's avatar mduppanapudi-nisum-com Committed by rbonthala-nisum-com

bug fixes in manage employee and manage project (#127)

parent 33d41f29
......@@ -151,8 +151,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data},
})
.then(function(result) {
if(result == "Add") showAlert('Role assigned successfully');
else if(result == "Update") showAlert('Role updated successfully');
if(result == "Add") showAlert('Employee assigned successfully');
else if(result == "Update") {
$scope.getUserRoles();
showAlert('Employee updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Role assigning/updation failed!!!');
});
......@@ -358,6 +361,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var hasB1 = $scope.hasB1;
var empStatus = $scope.empStatus;
var dateOfJoining = $scope.dateOfJoining;
var dateOfBirth = $scope.dateOfBirth;
if(searchId == ""){
$scope.alertMsg = "Employee Id is mandatory";
document.getElementById('empId').focus();
......@@ -379,12 +383,15 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}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 )){
$scope.alertMsg = "Please check your date of birth";
document.getElementById('dateOfBirth').focus();
}else if(empStatus == undefined){
$scope.alertMsg = "Please select a employee status";
document.getElementById('empStatus').focus();
}else if(empRole == undefined){
$scope.alertMsg = "Please select a role";
document.getElementById('empRole').focus();
}else if(functionalGroup == undefined){
$scope.alertMsg = "Please select a Functional Org";
document.getElementById('functionalGroup').focus();
}else if(designation == undefined){
$scope.alertMsg = "Please select a designation";
document.getElementById('designation').focus();
......@@ -394,9 +401,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}else if(employmentType == undefined){
$scope.alertMsg = "Please select a Employment Type";
document.getElementById('employmentType').focus();
}else if(functionalGroup == undefined){
$scope.alertMsg = "Please select a Functional Org";
document.getElementById('functionalGroup').focus();
}else if(empRole == undefined){
$scope.alertMsg = "Please select a role";
document.getElementById('empRole').focus();
}else if(hasPassort == undefined){
$scope.alertMsg = "Please select a Passport";
document.getElementById('hasPassort').focus();
......
......@@ -1062,6 +1062,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
else if (!(($scope.newBillingStartDate >= $scope.startDate) && ($scope.newBillingStartDate <= $scope.endDate)) && action == "Update"){
$scope.alertMsg = $scope.empBillableStatus + " start date should be in between start date and end date";
}else if($scope.endDate > dataToPass.projectEndDate){
$scope.alertMsg = "End date should not exceed project end date";
}
else {
$scope.alertMsg = "";
......
......@@ -51,7 +51,7 @@
<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"
md-placeholder="Date of Joining" md-min-date="minDate" id="dateOfBirth"
md-max-date="maxDate" onkeydown="return false"></md-datepicker>
</td>
</tr>
......@@ -73,7 +73,7 @@
</md-optgroup> </md-select></td>
</tr>
<tr ng-show="empStatus == 'In Active'">
<td colspan="4"><b>Employment Status:</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"
md-placeholder="Exit Date" md-min-date="minDate"
md-max-date="maxDate" onkeydown="return false"></md-datepicker>
......
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