Commit 8198ae90c88b5963d1e8fc265a602d34bffb5f25
1 parent
7530f73686
Exists in
master
code review
Showing
1 changed file
with
8 additions
and
11 deletions
Show diff stats
src/js/controllerHojaRuta.js
| ... | ... | @@ -70,20 +70,17 @@ angular.module('focaLogisticaPedidoRuta') |
| 70 | 70 | eliminarRemitos(remitosDel); |
| 71 | 71 | } |
| 72 | 72 | ); |
| 73 | - function eliminarRemitos(remitosDel) { | |
| 74 | - var nuevosRemitos = $filter('filter')($scope.remitos, {checked: !true}); | |
| 75 | - focaLogisticaPedidoRutaService.desasociarRemitos(remitosDel, $scope.vehiculo.id, | |
| 76 | - nuevosRemitos ? true : false).then(function() { | |
| 77 | - alertaEliminados(); | |
| 78 | - $scope.remitos = nuevosRemitos; | |
| 79 | - }); | |
| 80 | - } | |
| 81 | - function alertaEliminados() { | |
| 82 | - focaModalService.alert('Remitos desasociados con éxito'); | |
| 83 | - } | |
| 84 | 73 | }; |
| 85 | 74 | $scope.minimoUnoChecked = function() { |
| 86 | 75 | var remitosChequeados = $filter('filter')($scope.remitos, {checked: true}); |
| 87 | 76 | return !remitosChequeados.length; |
| 88 | 77 | }; |
| 78 | + function eliminarRemitos(remitosDel) { | |
| 79 | + var nuevosRemitos = $filter('filter')($scope.remitos, {checked: !true}); | |
| 80 | + focaLogisticaPedidoRutaService.desasociarRemitos(remitosDel, $scope.vehiculo.id, | |
| 81 | + nuevosRemitos ? true : false).then(function() { | |
| 82 | + focaModalService.alert('Remitos desasociados con éxito'); | |
| 83 | + $scope.remitos = nuevosRemitos; | |
| 84 | + }); | |
| 85 | + } | |
| 89 | 86 | }]); |