modified as per service changes

parent 77deca1b
......@@ -1231,11 +1231,11 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
else {
addOrUpdateProject(record, $scope.templateTitle);
$timeout(function () { updateGrid($scope.templateTitle, record) }, 500);
// $timeout(function () { updateGrid($scope.templateTitle, record) }, 500);
}
}else{
addOrUpdateProject(record, $scope.templateTitle);
$timeout(function () { updateGrid($scope.templateTitle, record) }, 500);
// $timeout(function () { updateGrid($scope.templateTitle, record) }, 500);
}
}}
$scope.cancel = function () {
......@@ -1531,7 +1531,20 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
data: record
}
$http(req).then(function mySuccess(response) {
$scope.result = "Success";
console.log(response.data);
if(response.data.message == "Project name already exist !!! try with new"){
$mdDialog.show($mdDialog.alert({
skipHide: true,
title:'Attention',
textContent: response.data.message,
ok: 'ok'
}));
}
else{
$scope.result = "Success";
$timeout(function () { updateGrid($scope.templateTitle, record) }, 500);
}
}, function myError(response) {
$scope.result = "Error";
});
......
......@@ -63,7 +63,9 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$scope.gridOptions.data[i].status = "Active";
}else if(response.data[i].status == 'N'){
$scope.gridOptions.data[i].status = "InActive";
}
}else if(response.data[i].status == 'B'){
$scope.gridOptions.data[i].status = "Bench";
}
}
}, function myError(response) {
showAlert("Something went wrong while fetching data!!!");
......
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