@fluxhub/fluxhub-lib 10.0.126 → 10.0.128
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 +46 -1
- 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 +2 -2
- package/esm2015/lib/services/login.service.js +44 -1
- package/fesm2015/fluxhub-fluxhub-lib.js +44 -1
- 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
|
@@ -3774,6 +3774,51 @@
|
|
|
3774
3774
|
throw new Error(err);
|
|
3775
3775
|
}
|
|
3776
3776
|
return res || new QGResult();
|
|
3777
|
+
}), operators.catchError(function (err) {
|
|
3778
|
+
var errMsg = err.message
|
|
3779
|
+
? err.message
|
|
3780
|
+
: err.status
|
|
3781
|
+
? err.status + " - " + err.statusText
|
|
3782
|
+
: "Server error";
|
|
3783
|
+
console.error(errMsg); // log to console instead
|
|
3784
|
+
throw err;
|
|
3785
|
+
}));
|
|
3786
|
+
};
|
|
3787
|
+
AuthenticationService.prototype.login_by_email = function (email, displayError) {
|
|
3788
|
+
var _this = this;
|
|
3789
|
+
if (displayError === void 0) { displayError = true; }
|
|
3790
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT + '_email';
|
|
3791
|
+
var post_v = JSON.stringify({ email: email });
|
|
3792
|
+
if (this.app_s.LDAP_AUTH == 1)
|
|
3793
|
+
post_v = JSON.stringify({
|
|
3794
|
+
email: email
|
|
3795
|
+
});
|
|
3796
|
+
return this.http
|
|
3797
|
+
.post(this.url, post_v, {
|
|
3798
|
+
headers: this.headers,
|
|
3799
|
+
})
|
|
3800
|
+
.pipe(operators.map(function (res) {
|
|
3801
|
+
// Handle errors, display if enabled
|
|
3802
|
+
var err;
|
|
3803
|
+
if (!res) {
|
|
3804
|
+
err = new Error("Empty server response");
|
|
3805
|
+
}
|
|
3806
|
+
else if (res.result_msg === "KO") {
|
|
3807
|
+
err = new Error(res.msg);
|
|
3808
|
+
}
|
|
3809
|
+
else {
|
|
3810
|
+
if (res.result_data.length > 0) {
|
|
3811
|
+
localStorage.setItem(_this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
if (err) {
|
|
3815
|
+
console.error(err);
|
|
3816
|
+
if (displayError) {
|
|
3817
|
+
_this.toastr.error(err.message);
|
|
3818
|
+
}
|
|
3819
|
+
throw new Error(err);
|
|
3820
|
+
}
|
|
3821
|
+
return res || new QGResult();
|
|
3777
3822
|
}), operators.catchError(function (err) {
|
|
3778
3823
|
// In a real world app, we might use a remote logging infrastructure
|
|
3779
3824
|
// We'd also dig deeper into the error to get a better message
|
|
@@ -5125,7 +5170,7 @@
|
|
|
5125
5170
|
if (p.sort_field != "")
|
|
5126
5171
|
_this.str_curr_q_p = _this.str_curr_q_p + " order by " + p.sort_field;
|
|
5127
5172
|
_this.curr_filter = p.filter;
|
|
5128
|
-
if (p.filter == '')
|
|
5173
|
+
if (p.filter == '' || _this.filters == p.filter)
|
|
5129
5174
|
_this.show_pulisci_filtri = false;
|
|
5130
5175
|
_this._gridservice.doQuery(p, true, _this.end_point).subscribe(function (data) {
|
|
5131
5176
|
var ok_op = false;
|