Commit 5fc8bf076bbe6704a7dc67cc8274b1495d56a348

Authored by Benjamin Rodriguez
1 parent 18d6c97a66
Exists in master and in 2 other branches develop, lab

elimino tarea pausada al guardar o salir

Showing 1 changed file with 8 additions and 16 deletions   Show diff stats
src/js/controller.js
... ... @@ -298,14 +298,6 @@ angular.module('focaCrearRemito').controller('remitoController',
298 298 focaBotoneraLateralService.startGuardar();
299 299 $scope.saveLoading = true;
300 300 var ar = JSON.parse($localStorage.rutas);
301   - function removeItemFromArr ( arr, item ) {
302   - var i = arr.indexOf( item );
303   -
304   - if ( i !== -1 ) {
305   - arr.splice( i, 1 );
306   - }
307   - }
308   -
309 301 removeItemFromArr( ar, 'venta-remito/crear' );
310 302 $localStorage.rutas = JSON.stringify(ar);
311 303  
... ... @@ -1080,6 +1072,14 @@ angular.module('focaCrearRemito').controller('remitoController',
1080 1072 }
1081 1073 }
1082 1074  
  1075 + function removeItemFromArr ( arr, item ) {
  1076 + var i = arr.indexOf( item );
  1077 +
  1078 + if ( i !== -1 ) {
  1079 + arr.splice( i, 1 );
  1080 + }
  1081 + }
  1082 +
1083 1083 function salir() {
1084 1084 var confirmacion = false;
1085 1085  
... ... @@ -1094,14 +1094,6 @@ angular.module('focaCrearRemito').controller('remitoController',
1094 1094 if (data) {
1095 1095 $location.path('/');
1096 1096 var ar = JSON.parse($localStorage.rutas);
1097   - function removeItemFromArr ( arr, item ) {
1098   - var i = arr.indexOf( item );
1099   -
1100   - if ( i !== -1 ) {
1101   - arr.splice( i, 1 );
1102   - }
1103   - }
1104   -
1105 1097 removeItemFromArr( ar, 'venta-remito/crear' );
1106 1098 $localStorage.rutas = JSON.stringify(ar);
1107 1099 }