Commit 6723c0403e22b1ba98fe9ccda4c06985c0830c85
1 parent
ddce87f264
Exists in
master
agrego foca-botonera-facturador
Showing
4 changed files
with
12 additions
and
34 deletions
Show diff stats
package.json
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | "compile": "gulp uglify", |
9 | 9 | "gulp-pre-commit": "gulp pre-commit", |
10 | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
11 | - "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+https://debo.suite.repo/modulos-npm/foca-directivas.git git+https://debo.suite.repo/modulos-npm/foca-modal-remito.git" | |
11 | + "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+http://git.focasoftware.com/npm/foca-botonera-facturador.git git+http://git.focasoftware.com/npm/foca-directivas.git git+http://git.focasoftware.com/npm/foca-modal-remito.git" | |
12 | 12 | }, |
13 | 13 | "pre-commit": [ |
14 | 14 | "gulp-pre-commit" |
... | ... | @@ -24,8 +24,9 @@ |
24 | 24 | "angular-ladda": "^0.4.3", |
25 | 25 | "angular-route": "^1.7.5", |
26 | 26 | "bootstrap": "^4.1.3", |
27 | - "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", | |
28 | - "foca-modal-remito": "git+https://debo.suite.repo/modulos-npm/foca-modal-remito.git", | |
27 | + "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git", | |
28 | + "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", | |
29 | + "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git", | |
29 | 30 | "font-awesome": "^4.7.0", |
30 | 31 | "gulp": "^3.9.1", |
31 | 32 | "gulp-angular-templatecache": "^2.2.5", |
src/js/controller.js
... | ... | @@ -2,19 +2,8 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
2 | 2 | [ |
3 | 3 | '$scope', '$uibModal', '$location', '$filter', 'crearHojaRutaService', 'focaModalService', |
4 | 4 | function($scope, $uibModal, $location, $filter, crearHojaRutaService, focaModalService) { |
5 | - $scope.botonera = [ | |
6 | - {texto: 'Transportista', imagen: '../img/abmPrecios.png', | |
7 | - accion: function() {$scope.seleccionarProveedor();}}, | |
8 | - {texto: 'Chofer', imagen: '../img/abmPrecios.png', | |
9 | - accion: function() {$scope.seleccionarChofer();}}, | |
10 | - {texto: 'Vehículo', imagen: '../img/abmPrecios.png', | |
11 | - accion: function() {$scope.seleccionarVehiculo();}}, | |
12 | - {texto: 'Tarifario', imagen: '../img/abmPrecios.png', | |
13 | - accion: function() {$scope.seleccionarTarifario();}}, | |
14 | - {texto: 'Remitos', imagen: '../img/abmPrecios.png', | |
15 | - accion: function() {$scope.seleccionarRemito();}}, | |
16 | - {texto: '', accion: function() {}} | |
17 | - ]; | |
5 | + | |
6 | + $scope.botonera = crearHojaRutaService.getBotonera(); | |
18 | 7 | $scope.datepickerAbierto = false; |
19 | 8 | |
20 | 9 | $scope.show = false; |
... | ... | @@ -181,7 +170,7 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
181 | 170 | ); |
182 | 171 | }; |
183 | 172 | |
184 | - $scope.seleccionarProveedor = function() { | |
173 | + $scope.seleccionarTransportista = function() { | |
185 | 174 | var modalInstance = $uibModal.open( |
186 | 175 | { |
187 | 176 | ariaLabelledBy: 'Busqueda de Transportista', |
... | ... | @@ -273,7 +262,7 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
273 | 262 | ); |
274 | 263 | }; |
275 | 264 | |
276 | - $scope.seleccionarRemito = function() { | |
265 | + $scope.seleccionarRemitos = function() { | |
277 | 266 | var modalInstance = $uibModal.open( |
278 | 267 | { |
279 | 268 | ariaLabelledBy: 'Busqueda de Remito', |
src/js/service.js
... | ... | @@ -54,6 +54,9 @@ angular.module('focaCrearHojaRuta') |
54 | 54 | }, |
55 | 55 | getNumeroHojaRuta: function() { |
56 | 56 | return $http.get(route + '/hoja-ruta/numero-siguiente'); |
57 | + }, | |
58 | + getBotonera: function() { | |
59 | + return ['Transportista', 'Chofer', 'Vehiculo', 'Tarifario', 'Remitos']; | |
57 | 60 | } |
58 | 61 | }; |
59 | 62 | }]); |
src/views/hoja-ruta.html
... | ... | @@ -74,22 +74,7 @@ |
74 | 74 | <div class="col-12 col-md-10 border border-light rounded"> |
75 | 75 | <div class="row px-5 py-2 botonera-secundaria"> |
76 | 76 | <div class="col-12"> |
77 | - <div class="row"> | |
78 | - <div | |
79 | - class="col-6 col-sm-2 px-1 py-1 m-auto m-md-0" | |
80 | - ng-repeat="boton in botonera" | |
81 | - ng-class="{'d-none d-md-grid': boton.texto == ''}"> | |
82 | - <button | |
83 | - type="button" | |
84 | - class="btn btn-default btn-block btn-xs text-center py-1 rounded border border-light" | |
85 | - ng-click="boton.accion()" | |
86 | - ng-class="{'d-sm-block h-100': boton.texto == ''}" | |
87 | - > | |
88 | - <img src="{{boton.imagen}}" alt="" ng-if="boton.imagen"> | |
89 | - <span>{{boton.texto}}</span> | |
90 | - </button> | |
91 | - </div> | |
92 | - </div> | |
77 | + <foca-botonera-facturador botones="botonera" extra="1" class="row"></foca-botonera-facturador> | |
93 | 78 | </div> |
94 | 79 | </div> |
95 | 80 | <!-- PC --> |