Commit b907c59b authored by Soumya Gouri's avatar Soumya Gouri

added alert message

parent 6bd109e2
...@@ -193,7 +193,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -193,7 +193,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
showAlert('Employee updated successfully'); showAlert('Employee updated successfully');
} }
else if(result == "Cancelled") { else if(result == "Cancelled") {
$scope.getUserRoles();
} }
else { else {
showAlert('Role assigning/updation failed!!!'); showAlert('Role assigning/updation failed!!!');
...@@ -476,10 +476,17 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -476,10 +476,17 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
} }
$http(req).then(function mySuccess(response) { $http(req).then(function mySuccess(response) {
$scope.result = "Success"; $scope.result = "Success";
if(response.data.message == "Resource substatus updated successfully!"){ if(response.data.message == "Sub status end updated successfully"){
$scope.alertMsg=response.data.message; $mdDialog.show($mdDialog.alert({
skipHide: true,
textContent: response.data.message ,
ok: 'ok'
})).then(function () {
$scope.myForm.$setPristine();
})
}else{ }else{
$scope.alertMsg=""; $scope.alertMsg=response.data.message;
} }
}, function myError(response){ }, function myError(response){
$scope.result = "Error"; $scope.result = "Error";
......
...@@ -110,8 +110,8 @@ ...@@ -110,8 +110,8 @@
<tr ng-show="empSubStatus != null && empSubStatus != '' && empStatus == 'Active' && templateTitle != 'Add'"> <tr ng-show="empSubStatus != null && empSubStatus != '' && empStatus == 'Active' && templateTitle != 'Add'">
<td colspan="4"> <td colspan="4">
<md-button class="md-raised" ng-show="disableSubStatus" ng-click="endSubStatus()" style="margin-top:10px;width:88px;background: #3f51b5;color:white;"> <md-button class="md-raised" ng-show="disableSubStatus" ng-click="endSubStatus()" style="margin-top:10px;width:142px;background: #3f51b5;color:white;">
End </md-button> End Sub status </md-button>
</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