@fluxhub/fluxhub-lib 10.0.525 → 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.
@@ -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; }
@@ -22337,7 +22386,6 @@
22337
22386
  if (check_on_save === void 0) { check_on_save = false; }
22338
22387
  this.b_rip_pulsanti = rip_pulsanti;
22339
22388
  this.btnprocedi = false;
22340
- console.log(check_on_save);
22341
22389
  if (check_on_save)
22342
22390
  if (!this.ck_field())
22343
22391
  return;
@@ -22624,6 +22672,9 @@
22624
22672
  if (this.ck_after(liv)) {
22625
22673
  this.calcola_destinari(o);
22626
22674
  }
22675
+ else {
22676
+ this.edit_b(this.b_edit_before);
22677
+ }
22627
22678
  };
22628
22679
  dati_aggiuntivi_v2.prototype.calcola_destinari = function (o) {
22629
22680
  var _this = this;
@@ -22883,7 +22934,6 @@
22883
22934
  if (arrd[i].val instanceof Date)
22884
22935
  if (new Date(arrd[i].val).getTime() != new Date(arrd[i].oldVal).getTime())
22885
22936
  flt.push(arrd[i]);
22886
- console.log('arrx ', flt, edit_button, !edit_button || flt.length == 0);
22887
22937
  if (!edit_button || flt.length == 0)
22888
22938
  this.m_router.navigate([this.app_info.modulo_swf]);
22889
22939
  else {