@fluxhub/fluxhub-lib 10.0.125 → 10.0.127
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/fluxhub-fluxhub-lib.umd.js +49 -2
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhgrid.js +3 -3
- package/esm2015/lib/services/login.service.js +46 -1
- package/fesm2015/fluxhub-fluxhub-lib.js +47 -2
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/services/login.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3786,6 +3786,53 @@
|
|
|
3786
3786
|
throw err;
|
|
3787
3787
|
}));
|
|
3788
3788
|
};
|
|
3789
|
+
AuthenticationService.prototype.login_by_email = function (email, displayError) {
|
|
3790
|
+
var _this = this;
|
|
3791
|
+
if (displayError === void 0) { displayError = true; }
|
|
3792
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT + '_email';
|
|
3793
|
+
var post_v = JSON.stringify({ email: email });
|
|
3794
|
+
if (this.app_s.LDAP_AUTH == 1)
|
|
3795
|
+
post_v = JSON.stringify({
|
|
3796
|
+
email: email
|
|
3797
|
+
});
|
|
3798
|
+
return this.http
|
|
3799
|
+
.post(this.url, post_v, {
|
|
3800
|
+
headers: this.headers,
|
|
3801
|
+
})
|
|
3802
|
+
.pipe(operators.map(function (res) {
|
|
3803
|
+
// Handle errors, display if enabled
|
|
3804
|
+
var err;
|
|
3805
|
+
if (!res) {
|
|
3806
|
+
err = new Error("Empty server response");
|
|
3807
|
+
}
|
|
3808
|
+
else if (res.result_msg === "KO") {
|
|
3809
|
+
err = new Error(res.msg);
|
|
3810
|
+
}
|
|
3811
|
+
else {
|
|
3812
|
+
if (res.result_data.length > 0) {
|
|
3813
|
+
localStorage.setItem(_this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
if (err) {
|
|
3817
|
+
console.error(err);
|
|
3818
|
+
if (displayError) {
|
|
3819
|
+
_this.toastr.error(err.message);
|
|
3820
|
+
}
|
|
3821
|
+
throw new Error(err);
|
|
3822
|
+
}
|
|
3823
|
+
return res || new QGResult();
|
|
3824
|
+
}), operators.catchError(function (err) {
|
|
3825
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
3826
|
+
// We'd also dig deeper into the error to get a better message
|
|
3827
|
+
var errMsg = err.message
|
|
3828
|
+
? err.message
|
|
3829
|
+
: err.status
|
|
3830
|
+
? err.status + " - " + err.statusText
|
|
3831
|
+
: "Server error";
|
|
3832
|
+
console.error(errMsg); // log to console instead
|
|
3833
|
+
throw err;
|
|
3834
|
+
}));
|
|
3835
|
+
};
|
|
3789
3836
|
AuthenticationService.prototype.get_user_info = function (username, displayError) {
|
|
3790
3837
|
var _this = this;
|
|
3791
3838
|
if (displayError === void 0) { displayError = true; }
|
|
@@ -6294,7 +6341,7 @@
|
|
|
6294
6341
|
if (this.gf.getObj() != null)
|
|
6295
6342
|
if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO") {
|
|
6296
6343
|
this.gf.setByDescri(localStorage.getItem(this.grid_key + "_CFG_DEFAULT"));
|
|
6297
|
-
localStorage.setItem(this.grid_key + "
|
|
6344
|
+
localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COLS);
|
|
6298
6345
|
// localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
|
|
6299
6346
|
localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
|
|
6300
6347
|
this.curr_config = this.gf.getValue();
|
|
@@ -6410,7 +6457,7 @@
|
|
|
6410
6457
|
if (this.no_pref)
|
|
6411
6458
|
return;
|
|
6412
6459
|
if (this.b_init) {
|
|
6413
|
-
localStorage.setItem(this.grid_key + "
|
|
6460
|
+
localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
6414
6461
|
// console.log('salvo s: '+this.gridOptions.api.getSortModel());
|
|
6415
6462
|
/*
|
|
6416
6463
|
|