Error message when there is no domain for selected account

parent 9075e91b
...@@ -773,7 +773,16 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -773,7 +773,16 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
return "Please select project status"; return "Please select project status";
} }
}; };
var noDomainError = function(){
$mdDialog.show($mdDialog.alert({
title: 'Error',
skipHide: true,
textContent: 'No domain added to this account',
ok: 'ok'
}));
};
function getDomainsAssoicatedToAccount(id,action){ function getDomainsAssoicatedToAccount(id,action){
$http({ $http({
method : "GET", method : "GET",
...@@ -784,9 +793,11 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -784,9 +793,11 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.domains = result; $scope.domains = result;
} }
else{ else{
$scope.domains = [ // $scope.domains = [
{domainName: $scope.account.accountName} // {domainName: $scope.account.accountName}
] // ]
noDomainError();
$scope.domains = [];
} }
if(action == "Update"){ if(action == "Update"){
setDomain(action); setDomain(action);
......
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