From fd20aa6ce315cbb26e476c84b24dfd63f079912c Mon Sep 17 00:00:00 2001 From: Rishav Date: Wed, 10 May 2017 18:39:50 +0530 Subject: [PATCH] send confirmation mail code implemented and baseIco added --- app/partials/viewCompany/viewCompany.controller.js | 14 ++++++++++++++ app/partials/viewCompany/viewCompany.html | 22 +++++++++++++++++++++- app/partials/viewCompany/viewCompany.service.js | 16 ++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) 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(); -- 2.0.0