Commit 02ed9ea9f36236f0dd73335eb0a94c654612f1fd
1 parent
76cf247695
Exists in
master
agrego foca-botonera-facturador
Showing
5 changed files
with
9 additions
and
31 deletions
Show diff stats
index.html
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 | <script src="node_modules/ladda/dist/ladda.min.js"></script> |
19 | 19 | <script src="node_modules/angular-ladda/dist/angular-ladda.min.js"></script> |
20 | 20 | |
21 | + <script src="node_modules/foca-botonera-facturador/dist/foca-botonera-facturador.min.js"></script> | |
21 | 22 | <script src="node_modules/foca-directivas/dist/foca-directivas.min.js"></script> |
22 | 23 | <script src="node_modules/foca-modal/dist/foca-modal.min.js"></script> |
23 | 24 | <script src="node_modules/foca-directivas/dist/foca-directivas.min.js"></script> |
package.json
... | ... | @@ -24,6 +24,7 @@ |
24 | 24 | "angular-ladda": "^0.4.3", |
25 | 25 | "angular-route": "^1.7.5", |
26 | 26 | "bootstrap": "^4.1.3", |
27 | + "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git", | |
27 | 28 | "foca-busqueda-cliente": "git+http://git.focasoftware.com/npm/foca-busqueda-cliente.git", |
28 | 29 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", |
29 | 30 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git", |
src/js/controller.js
... | ... | @@ -11,19 +11,7 @@ angular.module('focaCrearCobranza') .controller('cobranzaController', |
11 | 11 | function($scope, $uibModal, $location, $filter, focaCrearCobranzaService, focaModalService, |
12 | 12 | $cookies, focaSeguimientoService) |
13 | 13 | { |
14 | - $scope.botonera = [ | |
15 | - {texto: 'Cliente', imagen: '../img/abmPrecios.png', | |
16 | - accion: function() {$scope.seleccionarCliente();}}, | |
17 | - {texto: 'Cobrador', imagen: '../img/abmPrecios.png', | |
18 | - accion: function() {$scope.seleccionarCobrador();}}, | |
19 | - {texto: 'Comprobantes', imagen: '../img/abmPrecios.png', | |
20 | - accion: function() {$scope.swichDeuda();}}, | |
21 | - {texto: 'Cobros', imagen: '../img/abmPrecios.png', | |
22 | - accion: function() {$scope.swichCobro();}}, | |
23 | - {texto: 'Moneda', imagen: '../img/abmPrecios.png', | |
24 | - accion: function() {$scope.seleccionarMoneda();}}, | |
25 | - {texto: '', accion: function() {}}, | |
26 | - ]; | |
14 | + $scope.botonera = focaCrearCobranzaService.getBotonera(); | |
27 | 15 | $scope.datepickerAbierto = false; |
28 | 16 | $scope.cobroDeuda = true; |
29 | 17 | $scope.show = false; |
... | ... | @@ -248,11 +236,11 @@ angular.module('focaCrearCobranza') .controller('cobranzaController', |
248 | 236 | ); |
249 | 237 | }; |
250 | 238 | |
251 | - $scope.swichCobro = function() { | |
239 | + $scope.seleccionarCobros = function() { | |
252 | 240 | $scope.cobroDeuda = false; |
253 | 241 | }; |
254 | 242 | |
255 | - $scope.swichDeuda = function() { | |
243 | + $scope.seleccionarComprobantes = function() { | |
256 | 244 | $scope.cobroDeuda = true; |
257 | 245 | }; |
258 | 246 |
src/js/service.js
... | ... | @@ -12,6 +12,9 @@ angular.module('focaCrearCobranza') |
12 | 12 | }, |
13 | 13 | guardarCobranza: function(cobranza) { |
14 | 14 | return $http.post(API_ENDPOINT.URL + '/recibo/guardar', cobranza); |
15 | + }, | |
16 | + getBotonera: function() { | |
17 | + return ['Cliente', 'Cobrador', 'Comprobantes', 'Cobros', 'Moneda']; | |
15 | 18 | } |
16 | 19 | }; |
17 | 20 | }]); |
src/views/cobranza.html
... | ... | @@ -80,22 +80,7 @@ |
80 | 80 | <div class="col-12 col-md-10 border border-light rounded"> |
81 | 81 | <div class="row px-5 py-2 botonera-secundaria"> |
82 | 82 | <div class="col-12"> |
83 | - <div class="row"> | |
84 | - <div | |
85 | - class="col-6 col-sm-2 px-1 py-1 m-auto m-md-0" | |
86 | - ng-repeat="boton in botonera" | |
87 | - ng-class="{'d-none d-md-grid': boton.texto == ''}"> | |
88 | - <button | |
89 | - type="button" | |
90 | - class="btn btn-default btn-block btn-xs text-center py-1 rounded border border-light" | |
91 | - ng-click="boton.accion()" | |
92 | - ng-class="{'d-sm-block h-100': boton.texto == ''}" | |
93 | - > | |
94 | - <img src="{{boton.imagen}}" alt="" ng-if="boton.imagen"> | |
95 | - <span>{{boton.texto}}</span> | |
96 | - </button> | |
97 | - </div> | |
98 | - </div> | |
83 | + <foca-botonera-facturador botones="botonera" extra="1" class="row"></foca-botonera-facturador> | |
99 | 84 | </div> |
100 | 85 | </div> |
101 | 86 | <!-- PC --> |