Commit 736d9e53 authored by rammula-nisum-com's avatar rammula-nisum-com Committed by tdutta-nisum-com

MT_78_changes (#68)

parent e32e363e
......@@ -232,21 +232,25 @@ myApp.controller("domainController",
$scope.selectedEmployeeNames = [];
$scope.templateTitle = dataToPass.action;
$scope.accounts = myFactory.getAccounts();
var allAccounts = myFactory.getAccounts();
function getActiveAccounts(){
var activeAccounts = [];
for ( i in allAccounts){
console.log(allAccounts[i]);
if(allAccounts[i].status == "Y"){
activeAccounts.push(allAccounts[i]);
}
}
return activeAccounts;
}
$scope.accounts = getActiveAccounts();
$scope.getSelectedText = function() {
if ($scope.employeeModel !== undefined) {
return null;
} else {
return "Please select a Delivery Head";
}
}
$scope.getAccountText = function() {
if ($scope.AccountInfo !== undefined) {
......@@ -347,7 +351,8 @@ myApp.controller("domainController",
$scope.id = dataToPass.id;
$scope.domainId = dataToPass.domainId;
$scope.domainName = dataToPass.domainName;
$scope.AccountInfo = dataToPass.AccountName;
$scope.AccountInfo = {};
$scope.AccountInfo.accountName = dataToPass.AccountName;
$scope.AccountId = dataToPass.AccountId;
var accounts1 = myFactory.getAccounts();
for (var i = 0; i < accounts1.length; i++) {
......@@ -375,7 +380,7 @@ myApp.controller("domainController",
}else if(domainName == "" || undefined){
$scope.alertMsg = "Please enter a Domain Name";
document.getElementById('domainName').focus();
}else if(deliveryManagers == undefined){
}else if(deliveryManagers.length <= 0){
$scope.alertMsg = "Please select a deliveryManagers";
document.getElementById('selectDeliveryLeads').focus();
}else {
......
......@@ -88,7 +88,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function getAllAccounts(){
$http({
method : "GET",
url : appConfig.appUri + "user/getAccountsInfo"
url : appConfig.appUri + "user/getAccounts"
}).then(function mySuccess(response) {
myFactory.setAccounts(response.data);
}, function myError(response) {
......
......@@ -50,6 +50,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
url : appConfig.appUri + "account/accounts"
}).then(function mySuccess(response) {
$scope.gridOptions.data=response.data;
myFactory.setAccounts(response.data);
}, function myError(response) {
showAlert("Something went wrong while fetching data!!!");
$scope.gridOptions.data = [];
......
......@@ -40,7 +40,7 @@
</tr>
<tr>
<td colspan="4"><b>Delivery Head</b></td>
<td colspan="4"><b>Delivery Lead</b></td>
<td colspan="8" id="lead">
<div class="leads-data" ng-show="employeeModel.length > 0">
<div ng-repeat="item in employeeModel">
......
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