Commit 3629b3e8018d7364ae99e565674ab772bd89efea
Exists in
master
Merge branch 'master' into 'develop'
Master(efernandez) See merge request !12
Showing
1 changed file
Show diff stats
src/js/controller.js
| ... | ... | @@ -654,23 +654,27 @@ angular.module('focaCrearFactura').controller('facturaController', [ |
| 654 | 654 | |
| 655 | 655 | return new Promise(function (resolve, reject) { |
| 656 | 656 | |
| 657 | - focaModalService | |
| 658 | - .prompt({ | |
| 659 | - titulo: 'Indique Contraseña', | |
| 660 | - value: '' | |
| 661 | - }) | |
| 662 | - .then(function (contraseña) { | |
| 657 | + function openPrompt() { | |
| 658 | + return focaModalService | |
| 659 | + .prompt({ | |
| 660 | + titulo: 'Indique Contraseña', | |
| 661 | + value: '' | |
| 662 | + }) | |
| 663 | + .then(function (contraseña) { | |
| 663 | 664 | |
| 664 | - if (contraseña !== vendedor.ClaVen.trim()) { | |
| 665 | + if (contraseña !== vendedor.ClaVen.trim()) { | |
| 665 | 666 | |
| 666 | - focaModalService.alert('Clave incorrecta').then(function () { | |
| 667 | - indicarPassword(vendedor); | |
| 668 | - }); | |
| 669 | - } else { | |
| 670 | - resolve(); | |
| 671 | - } | |
| 672 | - }) | |
| 673 | - .catch(reject); | |
| 667 | + focaModalService.alert('Clave incorrecta').then(function () { | |
| 668 | + openPrompt(vendedor); | |
| 669 | + }); | |
| 670 | + } else { | |
| 671 | + resolve(); | |
| 672 | + } | |
| 673 | + }) | |
| 674 | + .catch(reject);; | |
| 675 | + } | |
| 676 | + | |
| 677 | + openPrompt() | |
| 674 | 678 | }); |
| 675 | 679 | } |
| 676 | 680 |