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