Commit 89f471c92c4c1cd26ee061316307d3e2e0277bf1
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !7
Showing
3 changed files
Show diff stats
package.json
... | ... | @@ -20,13 +20,13 @@ |
20 | 20 | "author": "Foca Software", |
21 | 21 | "license": "ISC", |
22 | 22 | "dependencies": { |
23 | - "angular": "^1.7.7", | |
23 | + "angular": "^1.7.8", | |
24 | 24 | "angular-chart.js": "1.1.1", |
25 | - "angular-cookies": "^1.7.7", | |
26 | - "angular-i18n": "^1.7.7", | |
25 | + "angular-cookies": "^1.7.8", | |
26 | + "angular-i18n": "^1.7.8", | |
27 | 27 | "angular-ladda": "^0.4.3", |
28 | - "angular-route": "^1.7.7", | |
29 | - "angular-sanitize": "^1.7.7", | |
28 | + "angular-route": "^1.7.8", | |
29 | + "angular-sanitize": "^1.7.8", | |
30 | 30 | "angular-ui-swiper": "^2.3.8", |
31 | 31 | "bootstrap": "^4.3.1", |
32 | 32 | "chart.js": "2.7.3", |
... | ... | @@ -56,11 +56,8 @@ |
56 | 56 | "foca-login": "git+http://git.focasoftware.com/npm/foca-login.git", |
57 | 57 | "foca-logistica-pedido-ruta": "git+http://git.focasoftware.com/npm/foca-logistica-pedido-ruta.git", |
58 | 58 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git", |
59 | - "foca-modal-banco": "git+http://git.focasoftware.com/npm/foca-modal-banco.git", | |
60 | 59 | "foca-modal-busqueda-productos": "git+http://git.focasoftware.com/npm/foca-modal-busqueda-productos.git", |
61 | 60 | "foca-modal-cheque": "git+http://git.focasoftware.com/npm/foca-modal-cheque.git", |
62 | - "foca-modal-chofer": "git+http://git.focasoftware.com/npm/foca-modal-chofer.git", | |
63 | - "foca-modal-cobrador": "git+http://git.focasoftware.com/npm/foca-modal-cobrador.git", | |
64 | 61 | "foca-modal-cobranza": "git+http://git.focasoftware.com/npm/foca-modal-cobranza.git", |
65 | 62 | "foca-modal-cotizacion": "git+http://git.focasoftware.com/npm/foca-modal-cotizacion.git", |
66 | 63 | "foca-modal-detalle-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-modal-detalle-hoja-ruta.git", |
... | ... | @@ -71,20 +68,13 @@ |
71 | 68 | "foca-modal-factura-detalle": "git+http://git.focasoftware.com/npm/foca-modal-factura-detalle.git", |
72 | 69 | "foca-modal-flete": "git+http://git.focasoftware.com/npm/foca-modal-flete.git", |
73 | 70 | "foca-modal-lista-precio": "git+http://git.focasoftware.com/npm/foca-modal-lista-precio.git", |
74 | - "foca-modal-localidad": "git+http://git.focasoftware.com/npm/foca-modal-localidad.git", | |
75 | 71 | "foca-modal-login": "git+http://git.focasoftware.com/npm/foca-modal-login.git", |
76 | - "foca-modal-moneda": "git+http://git.focasoftware.com/npm/foca-modal-moneda.git", | |
77 | 72 | "foca-modal-nota-pedido": "git+http://git.focasoftware.com/npm/foca-modal-nota-pedido.git", |
78 | 73 | "foca-modal-precio-condiciones": "git+http://git.focasoftware.com/npm/foca-modal-precio-condiciones.git", |
79 | - "foca-modal-proveedor": "git+http://git.focasoftware.com/npm/foca-modal-proveedor.git", | |
80 | - "foca-modal-provincia": "git+http://git.focasoftware.com/npm/foca-modal-provincia.git", | |
81 | 74 | "foca-modal-punto-descarga": "git+http://git.focasoftware.com/npm/foca-modal-punto-descarga.git", |
82 | 75 | "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git", |
83 | 76 | "foca-modal-tarifa-flete": "git+http://git.focasoftware.com/npm/foca-modal-tarifa-flete.git", |
84 | - "foca-modal-transportista": "git+http://git.focasoftware.com/npm/foca-modal-transportista.git", | |
85 | 77 | "foca-modal-unidad-medida": "git+http://git.focasoftware.com/npm/foca-modal-unidad-medida.git", |
86 | - "foca-modal-vehiculo": "git+http://git.focasoftware.com/npm/foca-modal-vehiculo.git", | |
87 | - "foca-modal-vendedores": "git+http://git.focasoftware.com/npm/foca-modal-vendedores.git", | |
88 | 78 | "foca-nombre-empresa": "git+http://git.focasoftware.com/npm/foca-nombre-empresa.git", |
89 | 79 | "foca-seguimiento": "git+http://git.focasoftware.com/npm/foca-seguimiento.git", |
90 | 80 | "foca-sqlite": "git+http://git.focasoftware.com/npm/foca-sqlite.git", |
... | ... | @@ -92,7 +82,7 @@ |
92 | 82 | "font-awesome": "^4.7.0", |
93 | 83 | "gulp-angular-templatecache": "^2.2.1", |
94 | 84 | "gulp-htmlmin": "^5.0.1", |
95 | - "gulp-uglify": "^3.0.1", | |
85 | + "gulp-sequence": "^1.0.0", | |
96 | 86 | "gulp-uglify-es": "^1.0.4", |
97 | 87 | "jquery": "^3.3.1", |
98 | 88 | "ladda": "1.0.6", |
... | ... | @@ -112,7 +102,7 @@ |
112 | 102 | "gulp-rename": "^1.4.0", |
113 | 103 | "gulp-replace": "^1.0.0", |
114 | 104 | "gulp-sass": "^4.0.1", |
115 | - "gulp-uglify": "^1.0.4", | |
105 | + "gulp-uglify": "^3.0.2", | |
116 | 106 | "gulp-watch": "^5.0.1", |
117 | 107 | "jasmine-core": "^3.2.1", |
118 | 108 | "jshint": "^2.10.1", |
src/js/controller.js
... | ... | @@ -4,24 +4,28 @@ angular.module('appWrapperDemo') |
4 | 4 | '$rootScope', |
5 | 5 | '$timeout', |
6 | 6 | 'focaSqliteService', |
7 | - 'API_ENDPOINT', | |
8 | 7 | 'focaModalService', |
9 | - function($scope, $rootScope, $timeout, focaSqliteService, API_ENDPOINT, focaModalService) { | |
8 | + 'API_ENDPOINT', | |
9 | + '$localStorage', | |
10 | + function($scope, $rootScope, $timeout, focaSqliteService, focaModalService, API_ENDPOINT, $localStorage) { | |
10 | 11 | document.addEventListener('deviceready', function() { |
11 | 12 | focaSqliteService.openDataBase(); |
12 | 13 | }); |
13 | 14 | |
14 | 15 | if (!API_ENDPOINT.URL) { |
15 | - API_ENDPOINT.getUrl().then(success, error); | |
16 | + API_ENDPOINT.getUrl().then(success, err); | |
16 | 17 | } |
17 | 18 | |
18 | 19 | function success(res) { |
20 | + | |
19 | 21 | API_ENDPOINT.setUrl(res.data); |
20 | 22 | } |
21 | - function error() { | |
22 | - focaModalService.alert('La terminal no esta configurada correctamente'); | |
23 | - } | |
23 | + function err() { | |
24 | 24 | |
25 | + $timeout(function() { | |
26 | + focaModalService.alert('Terminal no configurada: \n' + $localStorage.terminalKey); | |
27 | + }, 1000); | |
28 | + } | |
25 | 29 | $scope.usarTeclado = false; |
26 | 30 | $rootScope.$broadcast('usarTeclado', false); |
27 | 31 | $scope.mostrarTeclado = false; |
src/js/service.js
1 | 1 | angular.module('appWrapperDemo') |
2 | -.factory('API_ENDPOINT', [ | |
3 | - '$http', | |
4 | - '$localStorage', | |
5 | - 'ENDPOINT_BASE', | |
6 | - function($http, $localStorage, ENDPOINT_BASE) { | |
7 | - | |
8 | - var direccion = ENDPOINT_BASE; | |
9 | - | |
10 | - return { | |
11 | - URL: $localStorage.urlEndPoint, | |
12 | - setUrl: function(url) { | |
13 | - this.URL = url; | |
14 | - $localStorage.urlEndPoint = url; | |
15 | - }, | |
16 | - getUrl: function() { | |
17 | - return $http.get(direccion + '/terminal/consultar'); | |
18 | - } | |
19 | - }; | |
20 | -}]); | |
2 | + .factory('API_ENDPOINT', [ | |
3 | + '$http', | |
4 | + '$localStorage', | |
5 | + 'ENDPOINT_BASE', | |
6 | + function($http, $localStorage, ENDPOINT_BASE) { | |
7 | + return { | |
8 | + URL: $localStorage.urlEndPoint, | |
9 | + ENDPOINT_BASE: ENDPOINT_BASE, | |
10 | + setUrl: function(url) { | |
11 | + this.URL = url; | |
12 | + $localStorage.urlEndPoint = url; | |
13 | + }, | |
14 | + getUrl: function() { | |
15 | + return $http.get(this.ENDPOINT_BASE + '/terminal/consultar'); | |
16 | + } | |
17 | + }; | |
18 | + }]); |