@fluxhub/fluxhub-lib 10.0.721 → 10.0.723

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.
@@ -23607,25 +23607,83 @@
23607
23607
  _this.update_status(true, _this.respingi_enabled, _this.in_carico, _this.b_assengna_a, 18);
23608
23608
  }
23609
23609
  if (result.op == 'A') {
23610
- _this.sendEMail_ex(_this.user_idp, arr_new_arr_1, _this.app_info.descrizione_breve +
23610
+ var oggetto_email = _this.app_info.descrizione_breve +
23611
23611
  ", Ti è stato assegnato il documento numero: " +
23612
23612
  _this.m_obj.codice +
23613
23613
  " " +
23614
23614
  _this.getTitle() +
23615
23615
  " - " +
23616
- _this.getLvlDescri(String(_this.m_liv), _this.m_statox), "<br>Attività:" +
23616
+ _this.getLvlDescri(String(_this.m_liv), _this.m_statox);
23617
+ var body_email = "<br>Attività:" +
23617
23618
  _this.getLvlDescri(String(_this.m_liv), _this.m_statox) +
23618
23619
  "<br>" +
23619
23620
  _this.m_statox +
23620
23621
  "<br>" +
23621
- _this.getDescri(), _this.id_applicativo, _this.id_documento, _this.app_info.COMPANY_SITE_ROOT +
23622
+ _this.getDescri();
23623
+ if (_this.app_info.subject_riassegna != null)
23624
+ if (_this.app_info.subject_riassegna != "")
23625
+ oggetto_email = _this.app_info.subject_riassegna;
23626
+ if (_this.app_info.body_riassegna != null)
23627
+ if (_this.app_info.body_riassegna != "")
23628
+ body_email = _this.app_info.body_riassegna;
23629
+ console.log('this.app_info.subject_riassegna ', _this.app_info.subject_riassegna);
23630
+ /* for (let prop in this.m_obj)
23631
+ if (this.m_obj[prop] != null) {
23632
+
23633
+ if (
23634
+ Object.prototype.toString.call(this.m_obj[prop]) ===
23635
+ "[object Date]"
23636
+ ) {
23637
+ oggetto_email = oggetto_email
23638
+ .split("{{" + prop + "}}")
23639
+ .join(this.uti_s.date2String(this.m_obj[prop]));
23640
+ } else if (
23641
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
23642
+ )
23643
+ oggetto_email = oggetto_email
23644
+ .split("{{" + prop + "}}")
23645
+ .join(this.m_obj[prop]);
23646
+ else
23647
+ oggetto_email = oggetto_email
23648
+ .split("{{" + prop + "}}")
23649
+ .join(
23650
+ this.uti_s.date2String(
23651
+ this.uti_s.string2date(this.m_obj[prop], 2)
23652
+ )
23653
+ );
23654
+
23655
+
23656
+
23657
+ if (
23658
+ Object.prototype.toString.call(this.m_obj[prop]) ===
23659
+ "[object Date]"
23660
+ ) {
23661
+ body_email = body_email
23662
+ .split("{{" + prop + "}}")
23663
+ .join(this.uti_s.date2String(this.m_obj[prop]));
23664
+ } else if (
23665
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
23666
+ )
23667
+ body_email = body_email
23668
+ .split("{{" + prop + "}}")
23669
+ .join(this.m_obj[prop]);
23670
+ else
23671
+ body_email = body_email
23672
+ .split("{{" + prop + "}}")
23673
+ .join(
23674
+ this.uti_s.date2String(
23675
+ this.uti_s.string2date(this.m_obj[prop], 2)
23676
+ )
23677
+ );
23678
+ }*/
23679
+ _this.sendEMail_ex(_this.user_idp, arr_new_arr_1, oggetto_email, body_email, _this.id_applicativo, _this.id_documento, _this.app_info.COMPANY_SITE_ROOT +
23622
23680
  "#/" +
23623
23681
  _this.app_info.modulo_swf +
23624
23682
  "/" +
23625
23683
  _this.id_applicativo +
23626
23684
  "/" +
23627
23685
  _this.id_documento +
23628
- "/edit", _this.m_obj.codice, "", true, "", false);
23686
+ "/edit", _this.m_obj.codice, "", true, "", false, '');
23629
23687
  }
23630
23688
  /* else
23631
23689
  this.sendEMail_ex(
@@ -23781,52 +23839,40 @@
23781
23839
  });
23782
23840
  }
23783
23841
  };
23784
- dati_aggiuntivi_v2.prototype.sendEMail_ex = function (mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av, ical, b_exit) {
23842
+ dati_aggiuntivi_v2.prototype.sendEMail_ex = function (mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av, ical, b_exit, commento) {
23785
23843
  var _this = this;
23786
23844
  if (notif_av === void 0) { notif_av = true; }
23787
23845
  if (ical === void 0) { ical = ""; }
23788
23846
  if (b_exit === void 0) { b_exit = true; }
23789
- console.log('this.email_bloccate ', this.email_bloccate);
23790
- if (to == null) {
23791
- if (b_exit)
23792
- this.goto_edit_doc(notif_av);
23793
- return;
23794
- }
23795
- if (to == '') {
23796
- if (b_exit)
23797
- this.goto_edit_doc(notif_av);
23798
- return;
23799
- }
23800
- if (this.email_bloccate) {
23801
- if (b_exit)
23802
- this.goto_edit_doc(notif_av);
23803
- return;
23804
- }
23847
+ if (commento === void 0) { commento = ""; }
23848
+ var dev_mode = false;
23849
+ if (this.app_s.dev_mode != null)
23850
+ if (this.app_s.dev_mode == "1")
23851
+ dev_mode = true;
23852
+ var obj_r = {
23853
+ destinatari: to.split(','),
23854
+ commento: commento,
23855
+ id_applicazione: idapp,
23856
+ id_documento: iddoc,
23857
+ username: mit,
23858
+ e_subject: ogg,
23859
+ e_body: descri,
23860
+ dev_mode: dev_mode ? 1 : 0,
23861
+ };
23862
+ var fs = new FSInput();
23863
+ fs.command = "exec_app";
23864
+ fs.p1 = 'send_email';
23865
+ var uiid_op = this.uti_s.newGuid();
23866
+ fs.p2 = uiid_op;
23805
23867
  var p = new QParam();
23806
- p.sql = "send_wkf_mail";
23807
- //non notifico l'autore della approvazione
23808
- to = to.split(mit + ",").join("");
23809
- to = to.split("," + mit).join("");
23810
- //fine non notifico l'autore della approvazione
23811
- if (ical == null)
23812
- ical = "";
23813
- if (ical != "")
23814
- ical = JSON.stringify(ical);
23815
- p.values = [
23816
- mit,
23817
- to,
23818
- ogg,
23819
- descri.split("\n").join("<br>"),
23820
- idapp,
23821
- iddoc,
23822
- link,
23823
- cc,
23824
- nota,
23825
- ical,
23826
- ];
23827
- this.m_wkf.doQuery(p).subscribe(function (data) {
23828
- if (b_exit)
23829
- _this.goto_edit_doc(notif_av);
23868
+ p.sql = "INSERT_WKF_OP";
23869
+ p.values = [uiid_op, JSON.stringify(obj_r)];
23870
+ p.types = ['string', 'string'];
23871
+ this.m_dataService.doQuery(p).subscribe(function (data) {
23872
+ _this.m_fileservice.doQuery(fs).subscribe(function (data) {
23873
+ if (b_exit)
23874
+ _this.goto_edit_doc(notif_av);
23875
+ });
23830
23876
  });
23831
23877
  };
23832
23878
  dati_aggiuntivi_v2.prototype.goto_edit_doc = function (b_notif_av) {
@@ -24363,6 +24409,7 @@
24363
24409
  var s = "";
24364
24410
  var s_notif = "";
24365
24411
  var oggetto_email = "";
24412
+ var body_email = "";
24366
24413
  var s_auto = "";
24367
24414
  var descris = "";
24368
24415
  for (var i = 0; i < this.livs.length; i++) {
@@ -24384,9 +24431,6 @@
24384
24431
  s_auto = s_auto + ",";
24385
24432
  s_auto = s_auto + this.livs[i].nc;
24386
24433
  descris = this.livs[i].descri_livello;
24387
- if (this.livs[i].oggetto_email != null)
24388
- if (this.livs[i].oggetto_email != "")
24389
- oggetto_email = this.livs[i].oggetto_email;
24390
24434
  }
24391
24435
  }
24392
24436
  if (s == "") {
@@ -24486,75 +24530,93 @@
24486
24530
  "" + lvlb,
24487
24531
  ];
24488
24532
  _this.insert_wkf_variabile(_this.id_applicativo, _this.id_documento, _this.m_obj.stato + "_PLAYER", _this.user_idp);
24489
- var ok_op_1 = false;
24490
24533
  _this.m_wkf.doQuery(p_2).subscribe(function (data) {
24491
- var ok_op = false;
24492
24534
  if (data != null)
24493
24535
  if (data.result_msg == "OK") {
24494
24536
  if (b_send_email && s_notif != "") {
24495
- var s_ogg = oggetto_email;
24496
- for (var prop in _this.m_obj)
24497
- if (_this.m_obj[prop] != null) {
24498
- console.log(prop +
24499
- " " +
24500
- Object.prototype.toString.call(_this.m_obj[prop]));
24501
- if (Object.prototype.toString.call(_this.m_obj[prop]) ===
24502
- "[object Date]") {
24503
- s_ogg = s_ogg
24504
- .split("%" + prop + "%")
24505
- .join(_this.uti_s.date2String(_this.m_obj[prop]));
24506
- }
24507
- else if (("" + _this.m_obj[prop]).indexOf("T00:00:00") == -1)
24508
- s_ogg = s_ogg
24509
- .split("%" + prop + "%")
24510
- .join(_this.m_obj[prop]);
24511
- else
24512
- s_ogg = s_ogg
24513
- .split("%" + prop + "%")
24514
- .join(_this.uti_s.date2String(_this.uti_s.string2date(_this.m_obj[prop], 2)));
24515
- }
24516
- if (s_ogg == "")
24517
- _this.sendEMail_ex(_this.user_idp, s_notif, _this.app_info.descrizione_breve +
24518
- ", Ti è stato assegnato il documento numero: " +
24519
- _this.m_obj.codice +
24520
- " " +
24521
- _this.getTitle() +
24522
- " - " +
24523
- _this.getLvlDescri(String(_this.m_liv), _this.m_statox), "<br>Attività:" +
24524
- _this.getLvlDescri(String(_this.m_liv), _this.m_statox) +
24525
- "<br>" +
24526
- _this.m_statox +
24527
- "<br>" +
24528
- _this.getDescri(), _this.id_applicativo, _this.id_documento, _this.app_s.COMPANY_SITE_ROOT +
24529
- "#/" +
24530
- _this.app_info.modulo_swf +
24531
- "/" +
24532
- _this.id_applicativo +
24533
- "/" +
24534
- _this.id_documento +
24535
- "/edit", _this.m_obj.codice, "", true, "");
24536
- else
24537
- _this.sendEMail_ex(_this.user_idp, s_notif, s_ogg +
24538
- " - " +
24539
- _this.getLvlDescri(String(_this.m_liv), _this.m_statox), "<br>Attività:" +
24540
- _this.getLvlDescri(String(_this.m_liv), _this.m_statox) +
24541
- "<br>" +
24542
- _this.m_statox +
24543
- "<br>" +
24544
- _this.getDescri(), _this.id_applicativo, _this.id_documento, _this.app_s.COMPANY_SITE_ROOT +
24545
- "#/" +
24546
- _this.app_info.modulo_swf +
24547
- "/" +
24548
- _this.id_applicativo +
24549
- "/" +
24550
- _this.id_documento +
24551
- "/edit", _this.m_obj.codice, "", true, "");
24537
+ oggetto_email = _this.app_info.descrizione_breve +
24538
+ ", Ti è stato assegnato il documento numero: " +
24539
+ _this.m_obj.codice +
24540
+ " " +
24541
+ _this.getTitle() +
24542
+ " - " +
24543
+ _this.getLvlDescri(String(_this.m_liv), _this.m_statox);
24544
+ body_email = "<br>Attività:" +
24545
+ _this.getLvlDescri(String(_this.m_liv), _this.m_statox) +
24546
+ "<br>" +
24547
+ _this.m_statox +
24548
+ "<br>" +
24549
+ _this.getDescri();
24550
+ if (_this.app_info.subject_riassegna != null)
24551
+ if (_this.app_info.subject_riassegna != "")
24552
+ oggetto_email = _this.app_info.subject_riassegna;
24553
+ if (_this.app_info.body_riassegna != null)
24554
+ if (_this.app_info.body_riassegna != "")
24555
+ body_email = _this.app_info.body_riassegna;
24556
+ /*
24557
+ for (let prop in this.m_obj)
24558
+ if (this.m_obj[prop] != null) {
24559
+
24560
+ if (
24561
+ Object.prototype.toString.call(this.m_obj[prop]) ===
24562
+ "[object Date]"
24563
+ ) {
24564
+ oggetto_email = oggetto_email
24565
+ .split("{{" + prop + "}}")
24566
+ .join(this.uti_s.date2String(this.m_obj[prop]));
24567
+ } else if (
24568
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
24569
+ )
24570
+ oggetto_email = oggetto_email
24571
+ .split("{{" + prop + "}}")
24572
+ .join(this.m_obj[prop]);
24573
+ else
24574
+ oggetto_email = oggetto_email
24575
+ .split("{{" + prop + "}}")
24576
+ .join(
24577
+ this.uti_s.date2String(
24578
+ this.uti_s.string2date(this.m_obj[prop], 2)
24579
+ )
24580
+ );
24581
+
24582
+
24583
+
24584
+ if (
24585
+ Object.prototype.toString.call(this.m_obj[prop]) ===
24586
+ "[object Date]"
24587
+ ) {
24588
+ body_email = body_email
24589
+ .split("{{" + prop + "}}")
24590
+ .join(this.uti_s.date2String(this.m_obj[prop]));
24591
+ } else if (
24592
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
24593
+ )
24594
+ body_email = body_email
24595
+ .split("{{" + prop + "}}")
24596
+ .join(this.m_obj[prop]);
24597
+ else
24598
+ body_email = body_email
24599
+ .split("{{" + prop + "}}")
24600
+ .join(
24601
+ this.uti_s.date2String(
24602
+ this.uti_s.string2date(this.m_obj[prop], 2)
24603
+ )
24604
+ );
24605
+ }*/
24606
+ _this.sendEMail_ex(_this.user_idp, s_notif, oggetto_email, body_email, _this.id_applicativo, _this.id_documento, _this.app_s.COMPANY_SITE_ROOT +
24607
+ "#/" +
24608
+ _this.app_info.modulo_swf +
24609
+ "/" +
24610
+ _this.id_applicativo +
24611
+ "/" +
24612
+ _this.id_documento +
24613
+ "/edit", _this.m_obj.codice, "", true, "", true, '');
24552
24614
  }
24553
24615
  else
24554
24616
  _this.goto_edit_doc();
24555
24617
  }
24556
24618
  });
24557
- ok_op_1 = true;
24619
+ ok_op = true;
24558
24620
  }
24559
24621
  if (!ok_op) {
24560
24622
  _this.alert(data.msg, 1);