Commit 117ea07ec640f6e6b64d602a3a72dba592ed386d
1 parent
7b846d2e71
Exists in
master
agregada botonera de productos
Showing
2 changed files
with
23 additions
and
4 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -12,6 +12,7 @@ angular.module('focaCrearFactura').controller('facturaController', [ |
12 | 12 | $scope.tmpCantidad = Number; |
13 | 13 | $scope.tmpPrecio = Number; |
14 | 14 | $scope.botonera = crearFacturaService.getBotonera(); |
15 | + $scope.botoneraProductos = []; | |
15 | 16 | $scope.isNumber = angular.isNumber; |
16 | 17 | $scope.datepickerAbierto = false; |
17 | 18 | $scope.show = false; |
... | ... | @@ -416,18 +417,22 @@ angular.module('focaCrearFactura').controller('facturaController', [ |
416 | 417 | function getProductosByPlanilla(numeroPlanilla) { |
417 | 418 | |
418 | 419 | crearFacturaService.getProductosByPlanilla(numeroPlanilla).then(function (res) { |
419 | - | |
420 | + $scope.botoneraProductos.length = 0; | |
420 | 421 | res.data.forEach(function (producto) { |
421 | 422 | |
422 | - $scope.botonera.push({ | |
423 | + $scope.botoneraProductos.push({ | |
423 | 424 | label: producto.DetArt, |
424 | - image: 'productos.png' | |
425 | + image: 'buscarProductos.png' | |
425 | 426 | }); |
426 | 427 | |
427 | 428 | |
428 | 429 | crearFuncionesProductos(producto); |
429 | 430 | |
430 | 431 | }); |
432 | + $scope.botoneraProductos.push({ | |
433 | + label: 'BusquedaProductos', | |
434 | + image: 'buscarProductos.png' | |
435 | + }); | |
431 | 436 | }); |
432 | 437 | } |
433 | 438 |
src/views/factura.html
... | ... | @@ -17,7 +17,21 @@ |
17 | 17 | <div class="col-12 col-md-10 col-lg-10"> |
18 | 18 | <div class="row p-1 botonera-secundaria px-3 py-2"> |
19 | 19 | <div class="col-12"> |
20 | - <foca-botonera-facturador botones="botonera" extra="4" class="row"></foca-botonera-facturador> | |
20 | + <foca-botonera-facturador | |
21 | + botones="botonera" | |
22 | + max="botonera.length" | |
23 | + class="row"> | |
24 | + </foca-botonera-facturador> | |
25 | + </div> | |
26 | + </div> | |
27 | + <div ng-show="botoneraProductos.length > 0" class="row botonera-secundaria pb-3 px-3"> | |
28 | + <div class="col-12"> | |
29 | + <foca-botonera-productos | |
30 | + botones="botoneraProductos" | |
31 | + max="1" | |
32 | + class="row" | |
33 | + > | |
34 | + </foca-botonera-productos> | |
21 | 35 | </div> |
22 | 36 | </div> |
23 | 37 | <!-- PC --> |