sigesp 0.8.63-220120 → 0.8.64-220121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sigesp.umd.js +33 -5
- package/bundles/sigesp.umd.js.map +1 -1
- package/bundles/sigesp.umd.min.js +1 -1
- package/bundles/sigesp.umd.min.js.map +1 -1
- package/esm2015/lib/sigesp.service.js +33 -6
- package/fesm2015/sigesp.js +32 -5
- package/fesm2015/sigesp.js.map +1 -1
- package/lib/sigesp.service.d.ts +17 -4
- package/package.json +1 -1
- package/sigesp.metadata.json +1 -1
package/bundles/sigesp.umd.js
CHANGED
|
@@ -4690,6 +4690,7 @@
|
|
|
4690
4690
|
this.usuarioActivo = null;
|
|
4691
4691
|
this.currentComponent = null;
|
|
4692
4692
|
this.userMenu = null;
|
|
4693
|
+
this.ip_adress = '127.0.0.1';
|
|
4693
4694
|
}
|
|
4694
4695
|
/**
|
|
4695
4696
|
* @description Valida que selo se escriban guiones y 9
|
|
@@ -6504,12 +6505,39 @@
|
|
|
6504
6505
|
return false;
|
|
6505
6506
|
};
|
|
6506
6507
|
/**
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6508
|
+
* @description Obtiene el Ip del cliente
|
|
6509
|
+
* @return Json data
|
|
6510
|
+
* @author Ing. Wilmer Briceno
|
|
6511
|
+
*/
|
|
6511
6512
|
SigespService.prototype.getIPAddress = function () {
|
|
6512
|
-
return this.http.get("http://api.ipify.org/?format=json")
|
|
6513
|
+
return this.http.get("http://api.ipify.org/?format=json")
|
|
6514
|
+
.pipe(operators.catchError(function (err) {
|
|
6515
|
+
console.log('error caught in service');
|
|
6516
|
+
console.error(err);
|
|
6517
|
+
sessionStorage.setItem('ip_adress', '127.0.0.1');
|
|
6518
|
+
//Handle the error here
|
|
6519
|
+
return rxjs.throwError(err); //Rethrow it back to component
|
|
6520
|
+
}));
|
|
6521
|
+
};
|
|
6522
|
+
/**
|
|
6523
|
+
* @description Obtiene el Ip del cliente
|
|
6524
|
+
* @return Json data
|
|
6525
|
+
* @author Ing. Wilmer Briceno
|
|
6526
|
+
*/
|
|
6527
|
+
SigespService.prototype.setIpAdress = function () {
|
|
6528
|
+
var _this = this;
|
|
6529
|
+
this.getIPAddress().subscribe(function (resp) {
|
|
6530
|
+
sessionStorage.setItem('ip_adress', resp.ip);
|
|
6531
|
+
_this.ip_adress = resp.ip;
|
|
6532
|
+
});
|
|
6533
|
+
};
|
|
6534
|
+
/**
|
|
6535
|
+
* @description Obtiene el Ip del cliente
|
|
6536
|
+
* @return Json data
|
|
6537
|
+
* @author Ing. Wilmer Briceno
|
|
6538
|
+
*/
|
|
6539
|
+
SigespService.prototype.getIpAdress = function () {
|
|
6540
|
+
this.ip_adress = sessionStorage.getItem('ip_adress');
|
|
6513
6541
|
};
|
|
6514
6542
|
return SigespService;
|
|
6515
6543
|
}());
|