Commit b3e4da4bcc66625daa279c808ddb5d8a6950091d
1 parent
87308d050e
Exists in
master
Agregado boton Pagar
Showing
2 changed files
with
3 additions
and
0 deletions
Show diff stats
package.json
1 | { | 1 | { |
2 | "name": "foca-botonera-principal", | 2 | "name": "foca-botonera-principal", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "Botonera principal", | 4 | "description": "Botonera principal", |
5 | "scripts": { | 5 | "scripts": { |
6 | "refresh": "gulp uglify && cp tmp/foca-botonera-principal.js ../wrapper-demo/node_modules/foca-botonera-principal/dist/foca-botonera-principal.min.js", | ||
7 | "frefresh": "gulp uglify && cp tmp/foca-botonera-principal.js ../wrapper-facturador/node_modules/foca-botonera-principal/dist/foca-botonera-principal.min.js", | ||
6 | "test": "echo \"Error: no test specified\" && exit 1", | 8 | "test": "echo \"Error: no test specified\" && exit 1", |
7 | "gulp-pre-commit": "gulp pre-commit", | 9 | "gulp-pre-commit": "gulp pre-commit", |
8 | "compile": "gulp uglify", | 10 | "compile": "gulp uglify", |
9 | "postinstall": "npm run compile && gulp clean-post-install", | 11 | "postinstall": "npm run compile && gulp clean-post-install", |
10 | "install-dev": "npm install -D angular bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4" | 12 | "install-dev": "npm install -D angular bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4" |
11 | }, | 13 | }, |
12 | "pre-commit": [ | 14 | "pre-commit": [ |
13 | "gulp-pre-commit" | 15 | "gulp-pre-commit" |
14 | ], | 16 | ], |
15 | "repository": { | 17 | "repository": { |
16 | "type": "git", | 18 | "type": "git", |
17 | "url": "https://debo.suite.repo/modulos-npm/foca-botonera-principal" | 19 | "url": "https://debo.suite.repo/modulos-npm/foca-botonera-principal" |
18 | }, | 20 | }, |
19 | "author": "Foca Software", | 21 | "author": "Foca Software", |
20 | "license": "ISC", | 22 | "license": "ISC", |
21 | "peerDependencies": { | 23 | "peerDependencies": { |
22 | "angular": "^1.7.4", | 24 | "angular": "^1.7.4", |
23 | "bootstrap": "^4.1.3", | 25 | "bootstrap": "^4.1.3", |
24 | "font-awesome": "^4.7.0", | 26 | "font-awesome": "^4.7.0", |
25 | "ui-bootstrap4": "^3.0.4", | 27 | "ui-bootstrap4": "^3.0.4", |
26 | "gulp": "^3.9.1", | 28 | "gulp": "^3.9.1", |
27 | "gulp-angular-templatecache": "^2.2.1", | 29 | "gulp-angular-templatecache": "^2.2.1", |
28 | "gulp-concat": "^2.6.1", | 30 | "gulp-concat": "^2.6.1", |
29 | "gulp-connect": "^5.6.1", | 31 | "gulp-connect": "^5.6.1", |
30 | "gulp-htmlmin": "^5.0.1", | 32 | "gulp-htmlmin": "^5.0.1", |
31 | "gulp-rename": "^1.4.0", | 33 | "gulp-rename": "^1.4.0", |
32 | "gulp-replace": "^1.0.0", | 34 | "gulp-replace": "^1.0.0", |
33 | "gulp-uglify": "^3.0.1", | 35 | "gulp-uglify": "^3.0.1", |
34 | "jquery": "^3.3.1", | 36 | "jquery": "^3.3.1", |
35 | "pump": "^3.0.0", | 37 | "pump": "^3.0.0", |
36 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git" | 38 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git" |
37 | }, | 39 | }, |
38 | "devDependencies": { | 40 | "devDependencies": { |
39 | "angular": "^1.7.5", | 41 | "angular": "^1.7.5", |
40 | "bootstrap": "^4.1.3", | 42 | "bootstrap": "^4.1.3", |
41 | "font-awesome": "^4.7.0", | 43 | "font-awesome": "^4.7.0", |
42 | "gulp": "^3.9.1", | 44 | "gulp": "^3.9.1", |
43 | "gulp-angular-templatecache": "^2.2.2", | 45 | "gulp-angular-templatecache": "^2.2.2", |
44 | "gulp-clean": "^0.4.0", | 46 | "gulp-clean": "^0.4.0", |
45 | "gulp-concat": "^2.6.1", | 47 | "gulp-concat": "^2.6.1", |
46 | "gulp-connect": "^5.6.1", | 48 | "gulp-connect": "^5.6.1", |
47 | "gulp-htmlmin": "^5.0.1", | 49 | "gulp-htmlmin": "^5.0.1", |
48 | "gulp-jshint": "^2.1.0", | 50 | "gulp-jshint": "^2.1.0", |
49 | "gulp-rename": "^1.4.0", | 51 | "gulp-rename": "^1.4.0", |
50 | "gulp-replace": "^1.0.0", | 52 | "gulp-replace": "^1.0.0", |
51 | "gulp-uglify": "^3.0.1", | 53 | "gulp-uglify": "^3.0.1", |
52 | "jasmine-core": "^3.3.0", | 54 | "jasmine-core": "^3.3.0", |
53 | "jquery": "^3.3.1", | 55 | "jquery": "^3.3.1", |
54 | "jshint": "^2.9.6", | 56 | "jshint": "^2.9.6", |
55 | "pre-commit": "^1.2.2", | 57 | "pre-commit": "^1.2.2", |
56 | "pump": "^3.0.0", | 58 | "pump": "^3.0.0", |
57 | "ui-bootstrap4": "^3.0.5", | 59 | "ui-bootstrap4": "^3.0.5", |
58 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git" | 60 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git" |
59 | } | 61 | } |
60 | } | 62 | } |
61 | 63 |
src/js/controller.js
1 | angular.module('focaBotoneraPrincipal') | 1 | angular.module('focaBotoneraPrincipal') |
2 | .controller('focaBotoneraPrincipalController', [ | 2 | .controller('focaBotoneraPrincipalController', [ |
3 | '$scope', '$rootScope', '$timeout', '$location', '$localStorage', | 3 | '$scope', '$rootScope', '$timeout', '$location', '$localStorage', |
4 | 'botones', 'focaModalService', 'APP', 'focaBotoneraLateralService', | 4 | 'botones', 'focaModalService', 'APP', 'focaBotoneraLateralService', |
5 | function($scope, $rootScope, $timeout, $location, $localStorage, | 5 | function($scope, $rootScope, $timeout, $location, $localStorage, |
6 | botones, focaModalService, APP, focaBotoneraLateralService) { | 6 | botones, focaModalService, APP, focaBotoneraLateralService) { |
7 | $scope.paginas = []; | 7 | $scope.paginas = []; |
8 | var botonesPorPagina = 10; | 8 | var botonesPorPagina = 10; |
9 | if(APP === 'distribuidor' || APP === 'transportista') { | 9 | if(APP === 'distribuidor' || APP === 'transportista') { |
10 | botonesPorPagina = 3; | 10 | botonesPorPagina = 3; |
11 | } | 11 | } |
12 | for(var i = 0; i < botones.data.length; i += botonesPorPagina){ | 12 | for(var i = 0; i < botones.data.length; i += botonesPorPagina){ |
13 | $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); | 13 | $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); |
14 | } | 14 | } |
15 | 15 | ||
16 | focaBotoneraLateralService.showGuardar(false); | 16 | focaBotoneraLateralService.showGuardar(false); |
17 | focaBotoneraLateralService.showPagar(false); | ||
17 | focaBotoneraLateralService.showPausar(false); | 18 | focaBotoneraLateralService.showPausar(false); |
18 | focaBotoneraLateralService.showSalir(false); | 19 | focaBotoneraLateralService.showSalir(false); |
19 | focaBotoneraLateralService.showCancelar(false); | 20 | focaBotoneraLateralService.showCancelar(false); |
20 | 21 | ||
21 | $scope.irA = function(accion) { | 22 | $scope.irA = function(accion) { |
22 | $location.path(accion); | 23 | $location.path(accion); |
23 | }; | 24 | }; |
24 | 25 | ||
25 | $scope.logout = function() { | 26 | $scope.logout = function() { |
26 | $location.path('/logout'); | 27 | $location.path('/logout'); |
27 | }; | 28 | }; |
28 | 29 | ||
29 | $scope.showTerminal = function() { | 30 | $scope.showTerminal = function() { |
30 | var key = $localStorage.terminalKey; | 31 | var key = $localStorage.terminalKey; |
31 | focaModalService.alert('SU TERMINAL ES: ' + key); | 32 | focaModalService.alert('SU TERMINAL ES: ' + key); |
32 | }; | 33 | }; |
33 | } | 34 | } |
34 | ]); | 35 | ]); |
35 | 36 |