Commit 1e517a46b473ccf37943dff3a80476c85c8ea8d6

Authored by Luigi
1 parent c751723719
Exists in master

fechas - validar articulos cisterna

src/js/controller.js
... ... @@ -118,6 +118,8 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
118 118 var isBotoneraDirty = $scope.botonera.find(function (boton) {
119 119 return boton.checked;
120 120 });
  121 +
  122 + config();
121 123  
122 124 if (isBotoneraDirty) {
123 125 $scope.$broadcast('cleanCabecera');
... ... @@ -150,7 +152,9 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
150 152 var isBotoneraDirty = $scope.botonera.find(function (boton) {
151 153 return boton.checked;
152 154 });
153   -
  155 +
  156 + config();
  157 +
154 158 if (isBotoneraDirty) {
155 159 $scope.$broadcast('cleanCabecera');
156 160 focaModalService.confirm('Se perderan los cambios')
... ... @@ -179,7 +183,9 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
179 183 var isBotoneraDirty = $scope.botonera.find(function (boton) {
180 184 return boton.checked;
181 185 });
182   -
  186 +
  187 + config();
  188 +
183 189 if (isBotoneraDirty) {
184 190 focaModalService.confirm('Se perderan los cambios')
185 191 .then(function () {
... ... @@ -948,6 +954,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
948 954 hojasRutas: function () { return hojasRutas; }
949 955 },
950 956 size: 'lg',
  957 + backdrop: false
951 958 }
952 959 );
953 960 return modalInstance.result.then(function (res) {
src/js/controllerDetalles.js
... ... @@ -49,8 +49,6 @@ angular.module('focaCrearHojaRuta')
49 49 },
50 50 ],
51 51 }).then(function (res) {
52   - console.log('Res: ', res);
53   -
54 52 var newArt =
55 53 {
56 54 id: 0,
... ... @@ -90,7 +88,7 @@ angular.module('focaCrearHojaRuta')
90 88 $scope.guardar = function () {
91 89  
92 90 var cisternasFilter = $scope.hojasRutas.vehiculo.cisternas.filter(function (cisterna) {
93   - return parseInt(cisterna.disponible) > 0;
  91 + return parseInt(cisterna.disponible) > 0 || cisterna.articuloSeleccionado;
94 92 });
95 93  
96 94