diff --git a/app/partials/viewCompany/viewCompany.controller.js b/app/partials/viewCompany/viewCompany.controller.js index fdc0bf4..256c1f0 100644 --- a/app/partials/viewCompany/viewCompany.controller.js +++ b/app/partials/viewCompany/viewCompany.controller.js @@ -202,4 +202,18 @@ } + $scope.sendMail = function(){ + ViewCompanyService.sendMail(companyId).then(function(result) { + if(result != null && result.success){ + toastr.success(''+result.success+'', { + closeButton: true + }) + }else{ + toastr.error(''+result.statusText+'', { + closeButton: true + }) + } + }) + } + }]); \ No newline at end of file diff --git a/app/partials/viewCompany/viewCompany.html b/app/partials/viewCompany/viewCompany.html index cf4bbe5..e6513c0 100644 --- a/app/partials/viewCompany/viewCompany.html +++ b/app/partials/viewCompany/viewCompany.html @@ -135,6 +135,8 @@

Company Details

+ +
@@ -210,7 +212,7 @@
- +
@@ -612,6 +614,24 @@ + + diff --git a/app/partials/viewCompany/viewCompany.service.js b/app/partials/viewCompany/viewCompany.service.js index 349ee24..cefd13f 100644 --- a/app/partials/viewCompany/viewCompany.service.js +++ b/app/partials/viewCompany/viewCompany.service.js @@ -54,6 +54,22 @@ return deferred.promise; } + this.sendMail = function(id) { + + var deferred = $q.defer(); + $http({ + method : 'POST', + url : BASE_URL.url +'/mailPriceToContacts/'+id, + 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();