Commit 87eee491f4718c3c274f835758775a831a8c2835
1 parent
921fade2fe
Exists in
develop
Agregado componente botonera productos.
Showing
2 changed files
with
20 additions
and
0 deletions
Show diff stats
src/js/app.js
| 1 | angular.module('focaBotoneraFacturador', []) | 1 | angular.module('focaBotoneraFacturador', []) |
| 2 | .component('focaBotoneraFacturador', { | 2 | .component('focaBotoneraFacturador', { |
| 3 | templateUrl: 'src/views/botonera-facturador.html', | 3 | templateUrl: 'src/views/botonera-facturador.html', |
| 4 | controller: 'focaBotoneraFacturadorController', | 4 | controller: 'focaBotoneraFacturadorController', |
| 5 | bindings: { | 5 | bindings: { |
| 6 | max: '<', | 6 | max: '<', |
| 7 | botones: '<' | 7 | botones: '<' |
| 8 | } | 8 | } |
| 9 | }) | 9 | }) |
| 10 | .component('focaBotoneraFormaPago', { | 10 | .component('focaBotoneraFormaPago', { |
| 11 | templateUrl: 'src/views/botonera-forma-pago.html', | 11 | templateUrl: 'src/views/botonera-forma-pago.html', |
| 12 | controller: 'focaBotoneraTarjetasController', | 12 | controller: 'focaBotoneraTarjetasController', |
| 13 | bindings: { | 13 | bindings: { |
| 14 | botones: '<', | 14 | botones: '<', |
| 15 | max: '<' | 15 | max: '<' |
| 16 | } | 16 | } |
| 17 | }) | 17 | }) |
| 18 | .component('focaBotoneraTarjetas', { | 18 | .component('focaBotoneraTarjetas', { |
| 19 | templateUrl: 'src/views/botonera-tarjetas.html', | 19 | templateUrl: 'src/views/botonera-tarjetas.html', |
| 20 | controller: 'focaBotoneraTarjetasController', | 20 | controller: 'focaBotoneraTarjetasController', |
| 21 | bindings: { | 21 | bindings: { |
| 22 | botones: '<', | 22 | botones: '<', |
| 23 | max: '<' | 23 | max: '<' |
| 24 | } | 24 | } |
| 25 | }) | ||
| 26 | .component('focaBotoneraProductos', { | ||
| 27 | templateUrl: 'src/views/botonera-productos.html', | ||
| 28 | controller: 'focaBotoneraTarjetasController', | ||
| 29 | bindings: { | ||
| 30 | botones: '<', | ||
| 31 | max: '<' | ||
| 32 | } | ||
| 25 | }); | 33 | }); |
| 26 | 34 |
src/views/botonera-productos.html
| File was created | 1 | <div | |
| 2 | class="col-6 col-sm-3 p-2" | ||
| 3 | ng-repeat="boton in botones track by $index" | ||
| 4 | ng-class="{'d-md-grid': boton == ''}"> | ||
| 5 | <button | ||
| 6 | type="button" | ||
| 7 | class="btn btn-block btn-producto rounded border border-light p-0" | ||
| 8 | ng-click="(boton != '') ? ejecutarFuncion(boton.label) : null;" | ||
| 9 | > | ||
| 10 | <img ng-src="./img/{{boton.image}}" alt=""> | ||
| 11 | </button> | ||
| 12 | </div> | ||
| 13 |