Commit da05c127b2b6b54cc9d2b9cf6dbeadb375a082d8
Exists in
develop
Merge branch 'master' into 'develop'
Master(mpuebla) See merge request !11
Showing
2 changed files
Show diff stats
src/js/controller.js
... | ... | @@ -18,6 +18,7 @@ angular.module('focaBusquedaProductos') |
18 | 18 | $scope.primerBusqueda = false; |
19 | 19 | $scope.searchLoading = false; |
20 | 20 | $scope.soloMostrar = parametroProducto.soloMostrar; |
21 | + $scope.buscarTodos = parametroProducto.buscarTodos; | |
21 | 22 | $scope.useAllProducts = false; |
22 | 23 | //#region pagination variables |
23 | 24 | $scope.numPerPage = 10; |
... | ... | @@ -25,6 +26,17 @@ angular.module('focaBusquedaProductos') |
25 | 26 | $scope.filteredProductos = []; |
26 | 27 | $scope.currentPageProductos = []; |
27 | 28 | $scope.selectedProducto = -1; |
29 | + | |
30 | + init(); | |
31 | + | |
32 | + function init() { | |
33 | + | |
34 | + //Verifica si el modal mostrará todos los productos al abrirse. | |
35 | + if ($scope.buscarTodos) { | |
36 | + $scope.useAllProducts = !$scope.useAllProducts; | |
37 | + primera(); | |
38 | + } | |
39 | + } | |
28 | 40 | //#endregion |
29 | 41 | |
30 | 42 | //METODOS |
src/views/modal-busqueda-productos.html
... | ... | @@ -35,7 +35,12 @@ |
35 | 35 | <div class="row"> |
36 | 36 | <div class="col my-1 d-flex justify-content-end"> |
37 | 37 | <div class="custom-control custom-checkbox mt-auto"> |
38 | - <input type="checkbox" class="custom-control-input" id="check" ng-click="changeProductsData()"> | |
38 | + <input | |
39 | + type="checkbox" | |
40 | + class="custom-control-input" | |
41 | + id="check" | |
42 | + ng-click="changeProductsData()" | |
43 | + ng-checked="buscarTodos"> | |
39 | 44 | <label class="custom-control-label disable-selection" for="check"> |
40 | 45 | Buscar en todos los artículos disponibles |
41 | 46 | </label> |