Commit bc01eac4db443fa488a3c9b6f7df3a9d62cfe33b
1 parent
a65d046f3d
Exists in
master
and in
2 other branches
Agregada validacion para articulos descargados.
Showing
2 changed files
with
8 additions
and
0 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -141,6 +141,13 @@ angular.module('focaHojaRuta') |
141 | 141 | console.log(data); |
142 | 142 | }); |
143 | 143 | }; |
144 | + $scope.articulosDescargados = function (articulosRemito) { | |
145 | + for (var i = 0; i < articulosRemito.length; i++) { | |
146 | + if (articulosRemito[i].cantidadDescargada > 0) continue; | |
147 | + else return false; | |
148 | + } | |
149 | + return true; | |
150 | + }; | |
144 | 151 | $rootScope.$on('estadoRed', function (event, value) { |
145 | 152 | $scope.estadoRed = value; |
146 | 153 | }); |
src/views/lista-hoja-ruta.html
... | ... | @@ -91,6 +91,7 @@ |
91 | 91 | <i class="fa fa-search" aria-hidden="true"></i> |
92 | 92 | </button> |
93 | 93 | <button |
94 | + ng-show="articulosDescargados(remito.articulosRemito)" | |
94 | 95 | class="btn btn-secondary my-1 rounded" |
95 | 96 | type="button"> |
96 | 97 | <i class="fa fa-check fa-lg text-success" aria-hidden="true"></i> |