Commit dffb9a67d7c23f64f4680019bc6047b1ebd4ccac

Authored by Eric
1 parent 0b0782569a
Exists in master

broadcast

... ... @@ -31,61 +31,61 @@
31 31 "angular-ui-swiper": "^2.3.8",
32 32 "bootstrap": "^4.3.1",
33 33 "chart.js": "2.7.3",
34   - "foca-abm-chofer": "git+http://git.focasoftware.com/npm/foca-abm-chofer.git#develop",
35   - "foca-abm-plazo-pago": "git+http://git.focasoftware.com/npm/foca-abm-plazo-pago.git#develop",
36   - "foca-abm-precios-condiciones": "git+http://git.focasoftware.com/npm/foca-abm-precios-condiciones.git#develop",
37   - "foca-abm-vehiculo": "git+http://git.focasoftware.com/npm/foca-abm-vehiculo.git#develop",
38   - "foca-abm-vendedor-cobrador": "git+http://git.focasoftware.com/npm/foca-abm-vendedor-cobrador.git#develop",
39   - "foca-activar-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-activar-hoja-ruta.git#develop",
40   - "foca-admin-seguimiento": "git+http://git.focasoftware.com/npm/foca-admin-seguimiento.git#develop",
41   - "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git#develop",
42   - "foca-botonera-lateral": "git+http://git.focasoftware.com/npm/foca-botonera-lateral.git#develop",
43   - "foca-botonera-principal": "git+http://git.focasoftware.com/npm/foca-botonera-principal.git#develop",
44   - "foca-busqueda-cliente": "git+http://git.focasoftware.com/npm/foca-busqueda-cliente.git#develop",
45   - "foca-cabecera-facturador": "git+http://git.focasoftware.com/npm/foca-cabecera-facturador.git#develop",
46   - "foca-configuracion": "git+http://git.focasoftware.com/npm/foca-configuracion.git#develop",
47   - "foca-crear-cobranza": "git+http://git.focasoftware.com/npm/foca-crear-cobranza.git#develop",
48   - "foca-crear-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-crear-hoja-ruta.git#develop",
49   - "foca-crear-login": "git+http://git.focasoftware.com/npm/foca-crear-login.git#develop",
50   - "foca-crear-nota-pedido": "git+http://git.focasoftware.com/npm/foca-crear-nota-pedido.git#develop",
51   - "foca-crear-remito": "git+http://git.focasoftware.com/npm/foca-crear-remito.git#develop",
52   - "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git#develop",
53   - "foca-estado-cisternas": "git+http://git.focasoftware.com/npm/foca-estado-cisternas.git#develop",
54   - "foca-filtros": "git+http://git.focasoftware.com/npm/foca-filtros.git#develop",
55   - "foca-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-hoja-ruta.git#develop",
56   - "foca-login": "git+http://git.focasoftware.com/npm/foca-login.git#develop",
57   - "foca-logistica-pedido-ruta": "git+http://git.focasoftware.com/npm/foca-logistica-pedido-ruta.git#develop",
58   - "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git#develop",
59   - "foca-modal-busqueda-productos": "git+http://git.focasoftware.com/npm/foca-modal-busqueda-productos.git#develop",
60   - "foca-modal-cheque": "git+http://git.focasoftware.com/npm/foca-modal-cheque.git#develop",
61   - "foca-modal-cobranza": "git+http://git.focasoftware.com/npm/foca-modal-cobranza.git#develop",
62   - "foca-modal-cotizacion": "git+http://git.focasoftware.com/npm/foca-modal-cotizacion.git#develop",
63   - "foca-modal-detalle-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-modal-detalle-hoja-ruta.git#develop",
64   - "foca-modal-detalles": "git+http://git.focasoftware.com/npm/foca-modal-detalles.git#develop",
65   - "foca-modal-domicilio": "git+http://git.focasoftware.com/npm/foca-modal-domicilio.git#develop",
66   - "foca-modal-efectivo": "git+http://git.focasoftware.com/npm/foca-modal-efectivo.git#develop",
67   - "foca-modal-factura": "git+http://git.focasoftware.com/npm/foca-modal-factura.git#develop",
68   - "foca-modal-factura-detalle": "git+http://git.focasoftware.com/npm/foca-modal-factura-detalle.git#develop",
69   - "foca-modal-flete": "git+http://git.focasoftware.com/npm/foca-modal-flete.git#develop",
70   - "foca-modal-lista-precio": "git+http://git.focasoftware.com/npm/foca-modal-lista-precio.git#develop",
71   - "foca-modal-login": "git+http://git.focasoftware.com/npm/foca-modal-login.git#develop",
72   - "foca-modal-nota-pedido": "git+http://git.focasoftware.com/npm/foca-modal-nota-pedido.git#develop",
73   - "foca-modal-precio-condiciones": "git+http://git.focasoftware.com/npm/foca-modal-precio-condiciones.git#develop",
74   - "foca-modal-punto-descarga": "git+http://git.focasoftware.com/npm/foca-modal-punto-descarga.git#develop",
75   - "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git#develop",
76   - "foca-modal-resumen-cuenta": "git+http://git.focasoftware.com/npm/foca-modal-resumen-cuenta.git#develop",
77   - "foca-modal-tarifa-flete": "git+http://git.focasoftware.com/npm/foca-modal-tarifa-flete.git#develop",
78   - "foca-modal-unidad-medida": "git+http://git.focasoftware.com/npm/foca-modal-unidad-medida.git#develop",
79   - "foca-nombre-empresa": "git+http://git.focasoftware.com/npm/foca-nombre-empresa.git#develop",
80   - "foca-seguimiento": "git+http://git.focasoftware.com/npm/foca-seguimiento.git#develop",
81   - "foca-sqlite": "git+http://git.focasoftware.com/npm/foca-sqlite.git#develop",
82   - "foca-teclado": "git+http://git.focasoftware.com/npm/foca-teclado.git#develop",
  34 + "foca-abm-chofer": "git+http://git.focasoftware.com/npm/foca-abm-chofer.git",
  35 + "foca-abm-plazo-pago": "git+http://git.focasoftware.com/npm/foca-abm-plazo-pago.git",
  36 + "foca-abm-precios-condiciones": "git+http://git.focasoftware.com/npm/foca-abm-precios-condiciones.git",
  37 + "foca-abm-vehiculo": "git+http://git.focasoftware.com/npm/foca-abm-vehiculo.git",
  38 + "foca-abm-vendedor-cobrador": "git+http://git.focasoftware.com/npm/foca-abm-vendedor-cobrador.git",
  39 + "foca-activar-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-activar-hoja-ruta.git",
  40 + "foca-admin-seguimiento": "git+http://git.focasoftware.com/npm/foca-admin-seguimiento.git",
  41 + "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git",
  42 + "foca-botonera-lateral": "git+http://git.focasoftware.com/npm/foca-botonera-lateral.git",
  43 + "foca-botonera-principal": "git+http://git.focasoftware.com/npm/foca-botonera-principal.git",
  44 + "foca-busqueda-cliente": "git+http://git.focasoftware.com/npm/foca-busqueda-cliente.git",
  45 + "foca-cabecera-facturador": "git+http://git.focasoftware.com/npm/foca-cabecera-facturador.git",
  46 + "foca-configuracion": "git+http://git.focasoftware.com/npm/foca-configuracion.git",
  47 + "foca-crear-cobranza": "git+http://git.focasoftware.com/npm/foca-crear-cobranza.git",
  48 + "foca-crear-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-crear-hoja-ruta.git",
  49 + "foca-crear-login": "git+http://git.focasoftware.com/npm/foca-crear-login.git",
  50 + "foca-crear-nota-pedido": "git+http://git.focasoftware.com/npm/foca-crear-nota-pedido.git",
  51 + "foca-crear-remito": "git+http://git.focasoftware.com/npm/foca-crear-remito.git",
  52 + "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git",
  53 + "foca-estado-cisternas": "git+http://git.focasoftware.com/npm/foca-estado-cisternas.git",
  54 + "foca-filtros": "git+http://git.focasoftware.com/npm/foca-filtros.git",
  55 + "foca-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-hoja-ruta.git",
  56 + "foca-login": "git+http://git.focasoftware.com/npm/foca-login.git",
  57 + "foca-logistica-pedido-ruta": "git+http://git.focasoftware.com/npm/foca-logistica-pedido-ruta.git",
  58 + "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git",
  59 + "foca-modal-busqueda-productos": "git+http://git.focasoftware.com/npm/foca-modal-busqueda-productos.git",
  60 + "foca-modal-cheque": "git+http://git.focasoftware.com/npm/foca-modal-cheque.git",
  61 + "foca-modal-cobranza": "git+http://git.focasoftware.com/npm/foca-modal-cobranza.git",
  62 + "foca-modal-cotizacion": "git+http://git.focasoftware.com/npm/foca-modal-cotizacion.git",
  63 + "foca-modal-detalle-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-modal-detalle-hoja-ruta.git",
  64 + "foca-modal-detalles": "git+http://git.focasoftware.com/npm/foca-modal-detalles.git",
  65 + "foca-modal-domicilio": "git+http://git.focasoftware.com/npm/foca-modal-domicilio.git",
  66 + "foca-modal-efectivo": "git+http://git.focasoftware.com/npm/foca-modal-efectivo.git",
  67 + "foca-modal-factura": "git+http://git.focasoftware.com/npm/foca-modal-factura.git",
  68 + "foca-modal-factura-detalle": "git+http://git.focasoftware.com/npm/foca-modal-factura-detalle.git",
  69 + "foca-modal-flete": "git+http://git.focasoftware.com/npm/foca-modal-flete.git",
  70 + "foca-modal-lista-precio": "git+http://git.focasoftware.com/npm/foca-modal-lista-precio.git",
  71 + "foca-modal-login": "git+http://git.focasoftware.com/npm/foca-modal-login.git",
  72 + "foca-modal-nota-pedido": "git+http://git.focasoftware.com/npm/foca-modal-nota-pedido.git",
  73 + "foca-modal-precio-condiciones": "git+http://git.focasoftware.com/npm/foca-modal-precio-condiciones.git",
  74 + "foca-modal-punto-descarga": "git+http://git.focasoftware.com/npm/foca-modal-punto-descarga.git",
  75 + "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git",
  76 + "foca-modal-resumen-cuenta": "git+http://git.focasoftware.com/npm/foca-modal-resumen-cuenta.git",
  77 + "foca-modal-tarifa-flete": "git+http://git.focasoftware.com/npm/foca-modal-tarifa-flete.git",
  78 + "foca-modal-unidad-medida": "git+http://git.focasoftware.com/npm/foca-modal-unidad-medida.git",
  79 + "foca-nombre-empresa": "git+http://git.focasoftware.com/npm/foca-nombre-empresa.git",
  80 + "foca-seguimiento": "git+http://git.focasoftware.com/npm/foca-seguimiento.git",
  81 + "foca-sqlite": "git+http://git.focasoftware.com/npm/foca-sqlite.git",
  82 + "foca-teclado": "git+http://git.focasoftware.com/npm/foca-teclado.git",
83 83 "font-awesome": "^4.7.0",
84 84 "gulp-angular-templatecache": "^2.2.1",
85 85 "gulp-htmlmin": "^5.0.1",
86 86 "gulp-sequence": "^1.0.0",
87 87 "gulp-uglify-es": "^1.0.4",
88   - "jquery": "^3.3.1",
  88 + "jquery": "^3.4.0",
89 89 "ladda": "1.0.6",
90 90 "leaflet": "1.3.4",
91 91 "moment": "2.23.0",
src/js/interceptor.js
... ... @@ -53,13 +53,21 @@ angular.module('focaConfiguracion')
53 53 });
54 54 }
55 55  
  56 + function broadCastRed(status) {
  57 +
  58 + var $rootScope = $injector.get('$rootScope');
  59 +
  60 + $rootScope.$broadcast('estadoRed', status);
  61 + }
  62 +
56 63 var request = {
57 64 responseError: async function(config) {
58 65  
59 66 if (config.status === -1) {
60 67  
61   - var data = await getDataSqlite(config);
  68 + broadCastRed(false);
62 69  
  70 + var data = await getDataSqlite(config);
63 71 if (!data) {
64 72 return reintentarRequest(config);
65 73 } else {
... ... @@ -74,6 +82,7 @@ angular.module('focaConfiguracion')
74 82 response: function(response) {
75 83  
76 84 if (typeof response.data !== 'string') {
  85 + broadCastRed(true);
77 86 updateDataSqlite(response);
78 87 }
79 88 return response;
... ... @@ -5,7 +5,6 @@ angular.module('appWrapperDemo')
5 5 'ENDPOINT_BASE',
6 6 function($http, $localStorage, ENDPOINT_BASE) {
7 7 return {
8   - URL: 'http://10.231.45.189:9900',
9 8 ENDPOINT_BASE: ENDPOINT_BASE,
10 9 setUrl: function(url) {
11 10 this.URL = url;