Commit 2de32ead93a455e5eaa88b25d4831132c4416732
1 parent
8b76f7d0e8
Exists in
master
and in
1 other branch
Agregada alerta de perdida de cambios cuando quiere seleccionar una nota pedido
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -96,6 +96,17 @@ angular.module('focaCrearRemito').controller('remitoController', |
96 | 96 | }, true); |
97 | 97 | |
98 | 98 | $scope.seleccionarNotaPedido = function () { |
99 | + if ($scope.remitoIsDirty) { | |
100 | + focaModalService.confirm("¿Desea continuar? Se perderan los cambios") | |
101 | + .then(function () { | |
102 | + $scope.getNotaPedidoModal(); | |
103 | + }); | |
104 | + } else { | |
105 | + $scope.getNotaPedidoModal() | |
106 | + } | |
107 | + } | |
108 | + | |
109 | + $scope.getNotaPedidoModal = function () { | |
99 | 110 | if (varlidarRemitoFacturado()) { |
100 | 111 | var modalInstance = $uibModal.open( |
101 | 112 | { |