@fluxhub/fluxhub-lib 1.0.319 → 1.0.321

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.
@@ -15908,7 +15908,7 @@
15908
15908
  var /**
15909
15909
  * @abstract
15910
15910
  */ wkfapp = /** @class */ (function () {
15911
- function wkfapp(app_s, m_service, m_dataService, m_fservice, m_router, _toastr, dialog, m_wkf) {
15911
+ function wkfapp(app_s, m_service, m_dataService, m_fservice, m_router, _toastr, dialog, m_wkf, m_uti) {
15912
15912
  this.app_s = app_s;
15913
15913
  this.m_service = m_service;
15914
15914
  this.m_dataService = m_dataService;
@@ -15917,8 +15917,10 @@
15917
15917
  this._toastr = _toastr;
15918
15918
  this.dialog = dialog;
15919
15919
  this.m_wkf = m_wkf;
15920
+ this.m_uti = m_uti;
15920
15921
  this.b_editing = false;
15921
15922
  this.is_Supervisor = false;
15923
+ this.is_Visor = false;
15922
15924
  this.is_Admin = false;
15923
15925
  this.is_Ins = false;
15924
15926
  this.id_applicativo = "";
@@ -16446,6 +16448,11 @@
16446
16448
  .getState()
16447
16449
  .wkf_obj
16448
16450
  .is_Supervisor = this.is_Supervisor;
16451
+ this
16452
+ .app_s
16453
+ .getState()
16454
+ .wkf_obj
16455
+ .is_Visor = this.is_Visor;
16449
16456
  this
16450
16457
  .app_s
16451
16458
  .getState()
@@ -16529,6 +16536,11 @@
16529
16536
  .getState()
16530
16537
  .wkf_obj
16531
16538
  .b_editing;
16539
+ this.is_Visor = this
16540
+ .app_s
16541
+ .getState()
16542
+ .wkf_obj
16543
+ .is_Visor;
16532
16544
  this.is_Supervisor = this
16533
16545
  .app_s
16534
16546
  .getState()
@@ -16714,8 +16726,31 @@
16714
16726
  */function (data) {
16715
16727
  if (data != null)
16716
16728
  if (data.result_msg == "OK") {
16717
- _this.init_grid();
16718
- _this.ok_conf_s(data.result_data);
16729
+ /** @type {?} */
16730
+ var p_3 = new QParam();
16731
+ p_3.sql = "SELECT_ROLES_VISORI";
16732
+ p_3.types = ['string'];
16733
+ p_3.values = [_this.id_applicativo];
16734
+ _this
16735
+ .m_dataService
16736
+ .doQuery(p_3)
16737
+ .subscribe(( /**
16738
+ * @param {?} data
16739
+ * @return {?}
16740
+ */function (data) {
16741
+ if (data != null)
16742
+ if (data.result_msg == "OK") {
16743
+ _this.is_Visor = false;
16744
+ for (var i = 0; i < data.result_data.length; i++) {
16745
+ if (_this.m_uti.hasRole(data.result_data[i], false)) {
16746
+ _this.is_Visor = true;
16747
+ break;
16748
+ }
16749
+ }
16750
+ _this.init_grid();
16751
+ _this.ok_conf_s(data.result_data);
16752
+ }
16753
+ }));
16719
16754
  }
16720
16755
  }));
16721
16756
  }
@@ -17319,9 +17354,11 @@
17319
17354
  /** @type {?} */
17320
17355
  var nomi_autori = "";
17321
17356
  for (var i = 0; i < this.arrUsersSelected.length; i++) {
17322
- if (this.m_danotificare != "")
17323
- this.m_danotificare = this.m_danotificare + ",";
17324
- this.m_danotificare = this.m_danotificare + this.arrUsersSelected[i].idp;
17357
+ if (this.nlevel.email_partecipanti == 1) {
17358
+ if (this.m_danotificare != "")
17359
+ this.m_danotificare = this.m_danotificare + ",";
17360
+ this.m_danotificare = this.m_danotificare + this.arrUsersSelected[i].idp;
17361
+ }
17325
17362
  if (this.m_lettori.toLowerCase().indexOf(this.arrUsersSelected[i].idp.toLowerCase()) == -1) {
17326
17363
  if (this.m_lettori != "")
17327
17364
  this.m_lettori = this.m_lettori + ",";
@@ -17389,14 +17426,14 @@
17389
17426
  }
17390
17427
  /** @type {?} */
17391
17428
  var ccan = "$$";
17392
- for (var i_2 = 0; i_2 < this.livs.length; i_2++) {
17393
- if (this.livs[i_2].livello == this.clevel.livello && this.livs[i_2].idp == this.app_s.user) {
17429
+ for (var i = 0; i < this.livs.length; i++) {
17430
+ if (this.livs[i].livello == this.clevel.livello && this.livs[i].idp == this.app_s.user) {
17394
17431
  if (ccan != "$$") {
17395
17432
  ccan = "$$";
17396
17433
  break;
17397
17434
  }
17398
17435
  else
17399
- ccan = this.livs[i_2].gruppo_parallelo;
17436
+ ccan = this.livs[i].gruppo_parallelo;
17400
17437
  }
17401
17438
  }
17402
17439
  /** @type {?} */
@@ -17407,7 +17444,7 @@
17407
17444
  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);
17408
17445
  /** @type {?} */
17409
17446
  var t = new Array();
17410
- for (var i_3 = 0; i_3 < a.length; i_3++)
17447
+ for (var i = 0; i < a.length; i++)
17411
17448
  t.push('string');
17412
17449
  this.m_crea_att = 1;
17413
17450
  if (this.m_liv >= 900)
@@ -17536,11 +17573,11 @@
17536
17573
  if (data.result_msg == "OK") {
17537
17574
  /** @type {?} */
17538
17575
  var lista_p = _this.user_idp;
17539
- for (var i_4 = 0; i_4 < data.result_data.length; i_4++)
17540
- if (lista_p.indexOf(data.result_data[i_4].username) == -1) {
17541
- console.log('username:', data.result_data[i_4].username);
17576
+ for (var i = 0; i < data.result_data.length; i++)
17577
+ if (lista_p.indexOf(data.result_data[i].username) == -1) {
17578
+ console.log('username:', data.result_data[i].username);
17542
17579
  lista_p += ',';
17543
- lista_p += data.result_data[i_4].username;
17580
+ lista_p += data.result_data[i].username;
17544
17581
  }
17545
17582
  console.log('lista_p ', lista_p);
17546
17583
  _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);
@@ -17561,11 +17598,11 @@
17561
17598
  if (data.result_msg == "OK") {
17562
17599
  /** @type {?} */
17563
17600
  var lista_p = _this.user_idp;
17564
- for (var i_5 = 0; i_5 < data.result_data.length; i_5++)
17565
- if (lista_p.indexOf(data.result_data[i_5].username) == -1) {
17566
- console.log('username:', data.result_data[i_5].username);
17601
+ for (var i = 0; i < data.result_data.length; i++)
17602
+ if (lista_p.indexOf(data.result_data[i].username) == -1) {
17603
+ console.log('username:', data.result_data[i].username);
17567
17604
  lista_p += ',';
17568
- lista_p += data.result_data[i_5].username;
17605
+ lista_p += data.result_data[i].username;
17569
17606
  }
17570
17607
  _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);
17571
17608
  }
@@ -18286,10 +18323,21 @@
18286
18323
  /** @type {?} */
18287
18324
  var s = "";
18288
18325
  /** @type {?} */
18326
+ var s_notif = "";
18327
+ /** @type {?} */
18328
+ var oggetto_email = "";
18329
+ /** @type {?} */
18289
18330
  var s_auto = "";
18290
18331
  /** @type {?} */
18291
18332
  var descris = "";
18292
- for (var i = 0; i < this.livs.length; i++)
18333
+ for (var i = 0; i < this.livs.length; i++) {
18334
+ if (lvlb == this.livs[i].livello && (can == "" || this.livs[i].canale)) {
18335
+ if ((this.livs[i].email_ospiti == 1 && this.livs[i].notifica == 1) || (this.nlevel.email_partecipanti == 1 && this.livs[i].notifica == 0)) {
18336
+ if (s_notif != "")
18337
+ s_notif = s_notif + ",";
18338
+ s_notif = s_notif + this.livs[i].idp;
18339
+ }
18340
+ }
18293
18341
  if (lvlb == this.livs[i].livello && this.livs[i].notifica == 0 && (can == "" || this.livs[i].canale)) {
18294
18342
  if (s != "")
18295
18343
  s = s + ',';
@@ -18298,7 +18346,11 @@
18298
18346
  s_auto = s_auto + ',';
18299
18347
  s_auto = s_auto + this.livs[i].nc;
18300
18348
  descris = this.livs[i].descri_livello;
18349
+ if (this.livs[i].oggetto_email != null)
18350
+ if (this.livs[i].oggetto_email != "")
18351
+ oggetto_email = this.livs[i].oggetto_email;
18301
18352
  }
18353
+ }
18302
18354
  if (s == "") {
18303
18355
  return "NESSUN UTENTE CONFIGURATO STEP: " + lvlb + " CANALE: " + can;
18304
18356
  }
@@ -18376,8 +18428,24 @@
18376
18428
  */function (err) {
18377
18429
  _this.alert("ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI", 1);
18378
18430
  }));
18379
- if (b_send_email) {
18380
- this.sendEMail_ex(this.user_idp, s, this.app_info.descrizione_breve + ", Ti è stato assegnato il documento numero: " + this.m_obj.codice + " " + this.getTitle(), "<br>Attività:" + this.getLvlDescri(String(this.m_liv), this.m_statox) + "<br>" + this.m_statox + "<br>" + this.getDescri(), 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, '', true, "");
18431
+ if (b_send_email && s_notif != "") {
18432
+ /** @type {?} */
18433
+ var s_ogg = oggetto_email;
18434
+ for (var prop in this.m_obj)
18435
+ if (this.m_obj[prop] != null) {
18436
+ console.log(prop + " " + Object.prototype.toString.call(this.m_obj[prop]));
18437
+ if (Object.prototype.toString.call(this.m_obj[prop]) === '[object Date]') {
18438
+ s_ogg = s_ogg.split('%' + prop + '%').join(this.uti_s.date2String(this.m_obj[prop]));
18439
+ }
18440
+ else if (('' + this.m_obj[prop]).indexOf('T00:00:00') == -1)
18441
+ s_ogg = s_ogg.split('%' + prop + '%').join(this.m_obj[prop]);
18442
+ else
18443
+ s_ogg = s_ogg.split('%' + prop + '%').join((this.uti_s.date2String(this.uti_s.string2date(this.m_obj[prop], 2))));
18444
+ }
18445
+ if (s_ogg == "")
18446
+ this.sendEMail_ex(this.user_idp, s_notif, this.app_info.descrizione_breve + ", Ti è stato assegnato il documento numero: " + this.m_obj.codice + " " + this.getTitle(), "<br>Attività:" + this.getLvlDescri(String(this.m_liv), this.m_statox) + "<br>" + this.m_statox + "<br>" + this.getDescri(), 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, '', true, "");
18447
+ else
18448
+ this.sendEMail_ex(this.user_idp, s_notif, s_ogg, "<br>Attività:" + this.getLvlDescri(String(this.m_liv), this.m_statox) + "<br>" + this.m_statox + "<br>" + this.getDescri(), 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, '', true, "");
18381
18449
  }
18382
18450
  else
18383
18451
  this.goto_edit_doc();