Commit a18e70eeb596aa71707861aac995153687853349
1 parent
895c374da4
Exists in
master
and in
1 other branch
aplico foca-modal mail
Showing
1 changed file
with
18 additions
and
11 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -150,17 +150,24 @@ angular.module('focaModalFactura') |
| 150 | 150 | }; |
| 151 | 151 | |
| 152 | 152 | $scope.enviarMail = function(factura) { |
| 153 | - focaModalService | |
| 154 | - .prompt({ | |
| 155 | - titulo: 'Ingrese los emails separados por coma para enviar comprobante', | |
| 156 | - value: factura.cliente.MAIL | |
| 157 | - }) | |
| 158 | - .then(function(res) { | |
| 159 | - return focaModalFacturaService.enviarFacturaPorMail(res, factura); | |
| 160 | - }) | |
| 161 | - .then(function() { | |
| 162 | - focaModalService.alert('Mensaje enviado correctamente'); | |
| 163 | - }); | |
| 153 | + focaModalService.mail( | |
| 154 | + { | |
| 155 | + titulo: 'Enviar comprobante', | |
| 156 | + //TODO: CONFIGURAR DESCARGA | |
| 157 | + descarga: { | |
| 158 | + nombre: factura.numeroFactura + '.pdf', | |
| 159 | + url: '/mail/comprobante/descargar', | |
| 160 | + }, | |
| 161 | + envio: { | |
| 162 | + //TODO: TOMAR EMAIL DEL CLIENTE | |
| 163 | + mailCliente: 'jpinto@focasoftware.com', | |
| 164 | + url: '/mail/comprobante' | |
| 165 | + }, | |
| 166 | + options: { | |
| 167 | + factura: factura | |
| 168 | + } | |
| 169 | + } | |
| 170 | + ); | |
| 164 | 171 | }; |
| 165 | 172 | |
| 166 | 173 | function calcularPages(paginaActual) { |