diff --git a/app/partials/viewCompany/viewCompany.controller.js b/app/partials/viewCompany/viewCompany.controller.js index b515cb6..f0893b3 100644 --- a/app/partials/viewCompany/viewCompany.controller.js +++ b/app/partials/viewCompany/viewCompany.controller.js @@ -66,6 +66,7 @@ }) } + $scope.cancelStatus = function(){ $('#delete3').css('display', 'none'); $scope.companyData.activate = !$scope.companyData.activate; @@ -268,6 +269,8 @@ } $scope.showLoader = false; }) + + } @@ -479,5 +482,44 @@ $scope.cancelToogle = function(){ $('#toogleMail').css('display', 'none'); } + + $scope.checkboxStatus = function(value){ + console.log("checkbox",value) + $scope.showUpdateBtn = true; + } + + $scope.fuelercheckboxStatus = function(value){ + $('#fuelerchange').css('display', 'block'); + if(value == true){ + $scope.statusMessage = 'Please confirm! Enabling FuelerLinx for this customer will enable price distribution web services and disable price emails for the contacts in this company' + }else{ + $scope.statusMessage = 'Please confirm! Disabling FuelerLinx for this customer will disable price distribution web services into their FuelerLinx account. If you proceed then remember to enable price emails for the appropriate contacts in this company.' + } + + + } + + $scope.fuelerCancelStatus = function(){ + $('#fuelerchange').css('display', 'none'); + $scope.companyData.fuelerlinxCustomer = !$scope.companyData.fuelerlinxCustomer; + } + + $scope.fuelerAcceptStatus = function(){ + var statusData; + if($scope.companyData.fuelerlinxCustomer == false){ + statusData = "status=true"; + } else { + statusData = "status=false"; + } + ViewCompanyService.fuelerPricingChange(companyId, statusData).then(function(result) { + if(result.success){ + $('#fuelerchange').css('display', 'none'); + + $scope.editData(); + getContactList(); + + } + }) + } }]); \ No newline at end of file diff --git a/app/partials/viewCompany/viewCompany.html b/app/partials/viewCompany/viewCompany.html index 0afb36a..045fb3d 100644 --- a/app/partials/viewCompany/viewCompany.html +++ b/app/partials/viewCompany/viewCompany.html @@ -190,14 +190,14 @@
- Tenant/Base Customer + Tenant/Base Customer
- FuelerLinx Customer + FuelerLinx Customer
- CAA Member + CAA Member

@@ -632,7 +632,26 @@
- +
+
+
+ + + + + +
+ + +

{{statusMessage}}

+
+
+
+ + +
+
+
diff --git a/app/partials/viewCompany/viewCompany.service.js b/app/partials/viewCompany/viewCompany.service.js index 032ac6d..8b0246f 100644 --- a/app/partials/viewCompany/viewCompany.service.js +++ b/app/partials/viewCompany/viewCompany.service.js @@ -134,6 +134,22 @@ return deferred.promise; } + this.fuelerPricingChange = function(companyId, data){ + var deferred = $q.defer(); + $http({ + method : 'PUT', + url : BASE_URL.url +'/company/contact/disablePriceEmail/'+companyId, + data : data, + headers : {'Content-Type': 'application/json'}, + }) + .then(function (result){ + deferred.resolve(result.data); + },function (result){ + deferred.resolve(result.data); + }) + return deferred.promise; + } + this.updateContact = function(data) { var deferred = $q.defer();