@fluxhub/fluxhub-lib 1.0.283 → 1.0.287

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.
@@ -15253,28 +15253,22 @@
15253
15253
  function (next, state) {
15254
15254
  var _this = this;
15255
15255
  this.routingDestination = next.url[0].path;
15256
- console.log('qui1');
15257
15256
  if (this.routingDestination == '')
15258
15257
  return true;
15259
15258
  if (this.routingDestination == 'login' || this.routingDestination == 'rp' || this.routingDestination == 'pr' || this.routingDestination == '/')
15260
15259
  return true;
15261
- console.log('qui2');
15262
15260
  if (this.auth.checkCredentials()) {
15263
- console.log('qui3');
15264
15261
  if (this.routingDestination == 'home')
15265
15262
  return true;
15266
15263
  //console.log('canActivate 1');
15267
15264
  if (this.app_s.user_isadmin != null)
15268
15265
  if (this.app_s.user_isadmin == "1")
15269
15266
  return true;
15270
- console.log('qui4');
15271
15267
  return new Promise(( /**
15272
15268
  * @param {?} resolve
15273
15269
  * @return {?}
15274
15270
  */function (resolve) {
15275
- console.log('qui5');
15276
15271
  if (_this.arr_accessi != null) {
15277
- console.log('qui6');
15278
15272
  for (var i = 0; i < _this.arr_accessi.length; i++) {
15279
15273
  if (_this.arr_accessi[i].type == 'M')
15280
15274
  if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
@@ -15288,7 +15282,6 @@
15288
15282
  resolve(false);
15289
15283
  return;
15290
15284
  }
15291
- console.log('qui7');
15292
15285
  //console.log('canActivate 5');
15293
15286
  /** @type {?} */
15294
15287
  var p = new QParam();
@@ -15303,16 +15296,18 @@
15303
15296
  if (data != null)
15304
15297
  if (data.result_msg == "OK")
15305
15298
  if (data.result_data.length > 0) {
15306
- console.log('qui8');
15307
15299
  //console.log('canActivate 6');
15308
15300
  _this.appService.user_roles = data.result_data[0].roles;
15309
15301
  if (_this.appService.user_roles.length > 0)
15310
15302
  _this.appService.user_roles = _this.appService.user_roles.substr(1);
15311
15303
  _this.appService.user_isadmin = data.result_data[0].isadmin;
15312
15304
  _this.appService.user = data.result_data[0].username;
15305
+ console.log('this.app_s.user_isadmin ', _this.app_s.user_isadmin);
15313
15306
  if (_this.app_s.user_isadmin != null)
15314
- if (_this.app_s.user_isadmin == "1")
15315
- return true;
15307
+ if (_this.app_s.user_isadmin == "1") {
15308
+ resolve(true);
15309
+ return;
15310
+ }
15316
15311
  /** @type {?} */
15317
15312
  var p_1 = new QParam();
15318
15313
  p_1.sql = "SELECT_APPS_USER_ALL";
@@ -15324,10 +15319,9 @@
15324
15319
  * @param {?} data
15325
15320
  * @return {?}
15326
15321
  */function (data) {
15327
- console.log('qui9');
15328
15322
  _this.arr_accessi = data.result_data;
15329
15323
  for (var i = 0; i < _this.arr_accessi.length; i++) {
15330
- //console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
15324
+ console.log('[' + _this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + _this.routingDestination.split('/')[0] + ']');
15331
15325
  if (_this.arr_accessi[i].type == 'M') {
15332
15326
  if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
15333
15327
  resolve(true);
@@ -15345,6 +15339,7 @@
15345
15339
  else {
15346
15340
  _this.toast.error("ACCESS DENIED [0X0002]");
15347
15341
  _this.slimLoadingBarService.complete();
15342
+ resolve(false);
15348
15343
  return false;
15349
15344
  }
15350
15345
  }));
@@ -15352,7 +15347,6 @@
15352
15347
  else {
15353
15348
  /** @type {?} */
15354
15349
  var p_2 = new QParam();
15355
- console.log('qui10');
15356
15350
  p_2.sql = "SELECT_APPS_USER_ALL";
15357
15351
  _this.appService.getState().app_enabled = new Array();
15358
15352
  p_2.types = ['string'];
@@ -15364,9 +15358,7 @@
15364
15358
  */function (data) {
15365
15359
  //console.log('canActivate 9');
15366
15360
  _this.arr_accessi = data.result_data;
15367
- console.log('qui11');
15368
15361
  for (var i = 0; i < _this.arr_accessi.length; i++) {
15369
- console.log('qui12');
15370
15362
  //console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
15371
15363
  if (_this.arr_accessi[i].type == 'M') {
15372
15364
  if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
@@ -16890,14 +16882,26 @@
16890
16882
  }));
16891
16883
  }
16892
16884
  /** @type {?} */
16885
+ var ccan = "$$";
16886
+ for (var i_2 = 0; i_2 < this.livs.length; i_2++) {
16887
+ if (this.livs[i_2].livello == this.clevel.livello && this.livs[i_2].idp == this.app_s.user) {
16888
+ if (ccan != "$$") {
16889
+ ccan = "$$";
16890
+ break;
16891
+ }
16892
+ else
16893
+ ccan = this.livs[i_2].gruppo_parallelo;
16894
+ }
16895
+ }
16896
+ /** @type {?} */
16893
16897
  var a;
16894
16898
  if (!this.app_info.documento_pubblico)
16895
- a = new Array(this.m_autori, this.m_lettori, this.m_liv, this.m_statox, this.m_autori_paralleli, this.m_obj.assegnati_paralleli, this.getLvlDescri(String(this.m_liv), this.m_statox), this.getUsersList(this.m_autori, this.m_obj.assegnati_paralleli), this.user_idp, this.getTitle(), this.getDescri(), this.id_applicativo, this.id_documento);
16899
+ a = new Array(this.m_autori, this.m_lettori, this.m_liv, this.m_statox, this.m_autori_paralleli, this.m_obj.assegnati_paralleli, this.getLvlDescri(String(this.m_liv), this.m_statox), this.getUsersList(this.m_autori, this.m_obj.assegnati_paralleli), this.user_idp, this.getTitle(), this.getDescri(), this.id_applicativo, this.id_documento, ccan);
16896
16900
  else
16897
- a = new Array(this.m_autori, "", this.m_liv, this.m_statox, this.m_autori_paralleli, this.m_obj.assegnati_paralleli, this.getLvlDescri(String(this.m_liv), this.m_statox), this.getUsersList(this.m_autori, this.m_obj.assegnati_paralleli), this.user_idp, this.getTitle(), this.getDescri(), this.id_applicativo, this.id_documento);
16901
+ a = new Array(this.m_autori, "", this.m_liv, this.m_statox, this.m_autori_paralleli, this.m_obj.assegnati_paralleli, this.getLvlDescri(String(this.m_liv), this.m_statox), this.getUsersList(this.m_autori, this.m_obj.assegnati_paralleli), this.user_idp, this.getTitle(), this.getDescri(), this.id_applicativo, this.id_documento, ccan);
16898
16902
  /** @type {?} */
16899
16903
  var t = new Array();
16900
- for (var i_2 = 0; i_2 < a.length; i_2++)
16904
+ for (var i_3 = 0; i_3 < a.length; i_3++)
16901
16905
  t.push('string');
16902
16906
  this.m_crea_att = 1;
16903
16907
  if (this.m_liv >= 900)
@@ -16910,6 +16914,7 @@
16910
16914
  if (this.nlevel != null)
16911
16915
  if (this.nlevel.descri_livello != null)
16912
16916
  this.m_oper = this.m_oper + " -> " + this.nlevel.descri_livello;
16917
+ console.log('ccan ', ccan);
16913
16918
  /** @type {?} */
16914
16919
  var p = new QParam();
16915
16920
  p.sql = "doWKF";
@@ -17026,11 +17031,11 @@
17026
17031
  if (data.result_msg == "OK") {
17027
17032
  /** @type {?} */
17028
17033
  var lista_p = _this.user_idp;
17029
- for (var i_3 = 0; i_3 < data.result_data.length; i_3++)
17030
- if (lista_p.indexOf(data.result_data[i_3].username) == -1) {
17031
- console.log('username:', data.result_data[i_3].username);
17034
+ for (var i_4 = 0; i_4 < data.result_data.length; i_4++)
17035
+ if (lista_p.indexOf(data.result_data[i_4].username) == -1) {
17036
+ console.log('username:', data.result_data[i_4].username);
17032
17037
  lista_p += ',';
17033
- lista_p += data.result_data[i_3].username;
17038
+ lista_p += data.result_data[i_4].username;
17034
17039
  }
17035
17040
  console.log('lista_p ', lista_p);
17036
17041
  _this.sendEMail_ex(_this.user_idp, lista_p, _this.app_info.descrizione_breve + ", Il documento numero: " + _this.m_obj.codice + " è passato allo STEP: " + _this.nlevel.descri_livello + " " + _this.getTitle(), _this.m_statox + "<br>" + _this.getDescri() + comm_1, _this.id_applicativo, _this.id_documento, _this.app_s.COMPANY_SITE_ROOT + '#/' + _this.app_info.modulo_swf + '/' + _this.id_applicativo + "/" + _this.id_documento + "/edit", _this.m_obj.codice, _this.nota, true, ical_1, false);
@@ -17051,11 +17056,11 @@
17051
17056
  if (data.result_msg == "OK") {
17052
17057
  /** @type {?} */
17053
17058
  var lista_p = _this.user_idp;
17054
- for (var i_4 = 0; i_4 < data.result_data.length; i_4++)
17055
- if (lista_p.indexOf(data.result_data[i_4].username) == -1) {
17056
- console.log('username:', data.result_data[i_4].username);
17059
+ for (var i_5 = 0; i_5 < data.result_data.length; i_5++)
17060
+ if (lista_p.indexOf(data.result_data[i_5].username) == -1) {
17061
+ console.log('username:', data.result_data[i_5].username);
17057
17062
  lista_p += ',';
17058
- lista_p += data.result_data[i_4].username;
17063
+ lista_p += data.result_data[i_5].username;
17059
17064
  }
17060
17065
  _this.sendEMail_ex(_this.user_idp, lista_p, _this.app_info.descrizione_breve + ", Il documento numero: " + _this.m_obj.codice + " è passato allo STEP: " + _this.nlevel.descri_livello + " " + _this.getTitle(), _this.m_statox + "<br>" + _this.getDescri() + comm_1, _this.id_applicativo, _this.id_documento, _this.app_s.COMPANY_SITE_ROOT + '#/' + _this.app_info.modulo_swf + '/' + _this.id_applicativo + "/" + _this.id_documento + "/edit", _this.m_obj.codice, _this.nota, true, ical_1, false);
17061
17066
  }