@fluxhub/fluxhub-lib 10.0.525 → 10.0.527

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.
@@ -4065,6 +4065,56 @@
4065
4065
  throw err;
4066
4066
  }));
4067
4067
  };
4068
+ AuthenticationService.prototype.register_user = function (name, surname, email, username, password, 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
+ password: password,
4077
+ username: username,
4078
+ add_role: add_role
4079
+ });
4080
+ return this.http
4081
+ .post(this.url, post_v, {
4082
+ headers: this.headers,
4083
+ })
4084
+ .pipe(operators.map(function (res) {
4085
+ // Handle errors, display if enabled
4086
+ var err;
4087
+ if (!res) {
4088
+ err = new Error("Empty server response");
4089
+ }
4090
+ else if (res.result_msg === "KO") {
4091
+ err = new Error(res.msg);
4092
+ }
4093
+ else {
4094
+ if (res.result_data.length > 0) {
4095
+ localStorage.setItem(_this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
4096
+ }
4097
+ }
4098
+ if (err) {
4099
+ console.error(err);
4100
+ if (displayError) {
4101
+ _this.toastr.error(err.message);
4102
+ }
4103
+ throw new Error(err);
4104
+ }
4105
+ return res || new QGResult();
4106
+ }), operators.catchError(function (err) {
4107
+ // In a real world app, we might use a remote logging infrastructure
4108
+ // We'd also dig deeper into the error to get a better message
4109
+ var errMsg = err.message
4110
+ ? err.message
4111
+ : err.status
4112
+ ? err.status + " - " + err.statusText
4113
+ : "Server error";
4114
+ console.error(errMsg); // log to console instead
4115
+ throw err;
4116
+ }));
4117
+ };
4068
4118
  AuthenticationService.prototype.login_by_email = function (email, displayError) {
4069
4119
  var _this = this;
4070
4120
  if (displayError === void 0) { displayError = true; }
@@ -22337,7 +22387,6 @@
22337
22387
  if (check_on_save === void 0) { check_on_save = false; }
22338
22388
  this.b_rip_pulsanti = rip_pulsanti;
22339
22389
  this.btnprocedi = false;
22340
- console.log(check_on_save);
22341
22390
  if (check_on_save)
22342
22391
  if (!this.ck_field())
22343
22392
  return;
@@ -22624,6 +22673,9 @@
22624
22673
  if (this.ck_after(liv)) {
22625
22674
  this.calcola_destinari(o);
22626
22675
  }
22676
+ else {
22677
+ this.edit_b(this.b_edit_before);
22678
+ }
22627
22679
  };
22628
22680
  dati_aggiuntivi_v2.prototype.calcola_destinari = function (o) {
22629
22681
  var _this = this;
@@ -22883,7 +22935,6 @@
22883
22935
  if (arrd[i].val instanceof Date)
22884
22936
  if (new Date(arrd[i].val).getTime() != new Date(arrd[i].oldVal).getTime())
22885
22937
  flt.push(arrd[i]);
22886
- console.log('arrx ', flt, edit_button, !edit_button || flt.length == 0);
22887
22938
  if (!edit_button || flt.length == 0)
22888
22939
  this.m_router.navigate([this.app_info.modulo_swf]);
22889
22940
  else {