diff --git a/app/partials/customers/customers.controller.js b/app/partials/customers/customers.controller.js index 433037a..eb61fbc 100644 --- a/app/partials/customers/customers.controller.js +++ b/app/partials/customers/customers.controller.js @@ -135,6 +135,10 @@ $scope.removeValidation = function(){ $scope.showCompanyError = false; $('.companyNameInput').removeClass('customErrorInput'); + if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { + $('.companyNameInput').addClass('customErrorInput'); + $scope.showCompanyError = true; + } } $scope.removeMarginValidation = function(){ @@ -270,10 +274,9 @@ $scope.showLoader = false; }) } - - $scope.getCompanyName = function(parm){ - $scope.showLoader = true; - CustomersService.getCompanyName(parm).then(function(result) { + getCompanyName(); + function getCompanyName(){ + CustomersService.getCompanyName().then(function(result) { $scope.compNameList = result; }) } diff --git a/app/partials/customers/customers.html b/app/partials/customers/customers.html index 5b33eee..95ab363 100644 --- a/app/partials/customers/customers.html +++ b/app/partials/customers/customers.html @@ -179,7 +179,8 @@