@fluxhub/fluxhub-lib 10.0.524 → 10.0.526
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 +57 -4
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +2 -2
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhautocomplete.js +6 -3
- package/esm2015/lib/services/login.service.js +48 -1
- package/esm2015/lib/wkf_engine_v2/wkfdatiaggiuntivi.js +4 -3
- package/fesm2015/fluxhub-fluxhub-lib.js +55 -4
- 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
|
@@ -4065,6 +4065,55 @@
|
|
|
4065
4065
|
throw err;
|
|
4066
4066
|
}));
|
|
4067
4067
|
};
|
|
4068
|
+
AuthenticationService.prototype.register_user = function (name, surname, email, username, add_role, displayError) {
|
|
4069
|
+
var _this = this;
|
|
4070
|
+
if (displayError === void 0) { displayError = true; }
|
|
4071
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT + '_register';
|
|
4072
|
+
var post_v = JSON.stringify({
|
|
4073
|
+
name: name,
|
|
4074
|
+
surname: surname,
|
|
4075
|
+
email: email,
|
|
4076
|
+
username: username,
|
|
4077
|
+
add_role: add_role
|
|
4078
|
+
});
|
|
4079
|
+
return this.http
|
|
4080
|
+
.post(this.url, post_v, {
|
|
4081
|
+
headers: this.headers,
|
|
4082
|
+
})
|
|
4083
|
+
.pipe(operators.map(function (res) {
|
|
4084
|
+
// Handle errors, display if enabled
|
|
4085
|
+
var err;
|
|
4086
|
+
if (!res) {
|
|
4087
|
+
err = new Error("Empty server response");
|
|
4088
|
+
}
|
|
4089
|
+
else if (res.result_msg === "KO") {
|
|
4090
|
+
err = new Error(res.msg);
|
|
4091
|
+
}
|
|
4092
|
+
else {
|
|
4093
|
+
if (res.result_data.length > 0) {
|
|
4094
|
+
localStorage.setItem(_this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
|
|
4095
|
+
}
|
|
4096
|
+
}
|
|
4097
|
+
if (err) {
|
|
4098
|
+
console.error(err);
|
|
4099
|
+
if (displayError) {
|
|
4100
|
+
_this.toastr.error(err.message);
|
|
4101
|
+
}
|
|
4102
|
+
throw new Error(err);
|
|
4103
|
+
}
|
|
4104
|
+
return res || new QGResult();
|
|
4105
|
+
}), operators.catchError(function (err) {
|
|
4106
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
4107
|
+
// We'd also dig deeper into the error to get a better message
|
|
4108
|
+
var errMsg = err.message
|
|
4109
|
+
? err.message
|
|
4110
|
+
: err.status
|
|
4111
|
+
? err.status + " - " + err.statusText
|
|
4112
|
+
: "Server error";
|
|
4113
|
+
console.error(errMsg); // log to console instead
|
|
4114
|
+
throw err;
|
|
4115
|
+
}));
|
|
4116
|
+
};
|
|
4068
4117
|
AuthenticationService.prototype.login_by_email = function (email, displayError) {
|
|
4069
4118
|
var _this = this;
|
|
4070
4119
|
if (displayError === void 0) { displayError = true; }
|
|
@@ -7790,15 +7839,18 @@
|
|
|
7790
7839
|
};
|
|
7791
7840
|
FHAutoCompleteComponent.prototype.fillCombo = function () {
|
|
7792
7841
|
var _this = this;
|
|
7842
|
+
console.log('fillcombo ', this.option_values);
|
|
7793
7843
|
this.myData = new Array();
|
|
7794
7844
|
this.searchItemsFiltered = new Array();
|
|
7795
7845
|
if (this.sql == null)
|
|
7796
|
-
this.sql =
|
|
7846
|
+
this.sql = '';
|
|
7847
|
+
if (this.option_values == null)
|
|
7848
|
+
this.option_values = '';
|
|
7797
7849
|
if (this.sql.indexOf("|") != -1 && this.sql.indexOf("$") != -1) {
|
|
7798
7850
|
this.set_options(this.sql);
|
|
7799
7851
|
return;
|
|
7800
7852
|
}
|
|
7801
|
-
if (this.option_values !=
|
|
7853
|
+
if (this.option_values != '') {
|
|
7802
7854
|
this.set_options(this.option_values);
|
|
7803
7855
|
return;
|
|
7804
7856
|
}
|
|
@@ -22334,7 +22386,6 @@
|
|
|
22334
22386
|
if (check_on_save === void 0) { check_on_save = false; }
|
|
22335
22387
|
this.b_rip_pulsanti = rip_pulsanti;
|
|
22336
22388
|
this.btnprocedi = false;
|
|
22337
|
-
console.log(check_on_save);
|
|
22338
22389
|
if (check_on_save)
|
|
22339
22390
|
if (!this.ck_field())
|
|
22340
22391
|
return;
|
|
@@ -22621,6 +22672,9 @@
|
|
|
22621
22672
|
if (this.ck_after(liv)) {
|
|
22622
22673
|
this.calcola_destinari(o);
|
|
22623
22674
|
}
|
|
22675
|
+
else {
|
|
22676
|
+
this.edit_b(this.b_edit_before);
|
|
22677
|
+
}
|
|
22624
22678
|
};
|
|
22625
22679
|
dati_aggiuntivi_v2.prototype.calcola_destinari = function (o) {
|
|
22626
22680
|
var _this = this;
|
|
@@ -22880,7 +22934,6 @@
|
|
|
22880
22934
|
if (arrd[i].val instanceof Date)
|
|
22881
22935
|
if (new Date(arrd[i].val).getTime() != new Date(arrd[i].oldVal).getTime())
|
|
22882
22936
|
flt.push(arrd[i]);
|
|
22883
|
-
console.log('arrx ', flt, edit_button, !edit_button || flt.length == 0);
|
|
22884
22937
|
if (!edit_button || flt.length == 0)
|
|
22885
22938
|
this.m_router.navigate([this.app_info.modulo_swf]);
|
|
22886
22939
|
else {
|