@fluxhub/fluxhub-lib 10.0.722 → 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.
@@ -23627,37 +23627,55 @@
23627
23627
  if (_this.app_info.body_riassegna != "")
23628
23628
  body_email = _this.app_info.body_riassegna;
23629
23629
  console.log('this.app_info.subject_riassegna ', _this.app_info.subject_riassegna);
23630
- for (var prop in _this.m_obj)
23631
- if (_this.m_obj[prop] != null) {
23632
- if (Object.prototype.toString.call(_this.m_obj[prop]) ===
23633
- "[object Date]") {
23634
- oggetto_email = oggetto_email
23635
- .split("{{" + prop + "}}")
23636
- .join(_this.uti_s.date2String(_this.m_obj[prop]));
23637
- }
23638
- else if (("" + _this.m_obj[prop]).indexOf("T00:00:00") == -1)
23639
- oggetto_email = oggetto_email
23640
- .split("{{" + prop + "}}")
23641
- .join(_this.m_obj[prop]);
23642
- else
23643
- oggetto_email = oggetto_email
23644
- .split("{{" + prop + "}}")
23645
- .join(_this.uti_s.date2String(_this.uti_s.string2date(_this.m_obj[prop], 2)));
23646
- if (Object.prototype.toString.call(_this.m_obj[prop]) ===
23647
- "[object Date]") {
23648
- body_email = body_email
23649
- .split("{{" + prop + "}}")
23650
- .join(_this.uti_s.date2String(_this.m_obj[prop]));
23651
- }
23652
- else if (("" + _this.m_obj[prop]).indexOf("T00:00:00") == -1)
23653
- body_email = body_email
23654
- .split("{{" + prop + "}}")
23655
- .join(_this.m_obj[prop]);
23656
- else
23657
- body_email = body_email
23658
- .split("{{" + prop + "}}")
23659
- .join(_this.uti_s.date2String(_this.uti_s.string2date(_this.m_obj[prop], 2)));
23660
- }
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
+ }*/
23661
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 +
23662
23680
  "#/" +
23663
23681
  _this.app_info.modulo_swf +
@@ -23665,7 +23683,7 @@
23665
23683
  _this.id_applicativo +
23666
23684
  "/" +
23667
23685
  _this.id_documento +
23668
- "/edit", _this.m_obj.codice, "", true, "", false);
23686
+ "/edit", _this.m_obj.codice, "", true, "", false, '');
23669
23687
  }
23670
23688
  /* else
23671
23689
  this.sendEMail_ex(
@@ -23821,52 +23839,40 @@
23821
23839
  });
23822
23840
  }
23823
23841
  };
23824
- 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) {
23825
23843
  var _this = this;
23826
23844
  if (notif_av === void 0) { notif_av = true; }
23827
23845
  if (ical === void 0) { ical = ""; }
23828
23846
  if (b_exit === void 0) { b_exit = true; }
23829
- console.log('this.email_bloccate ', this.email_bloccate);
23830
- if (to == null) {
23831
- if (b_exit)
23832
- this.goto_edit_doc(notif_av);
23833
- return;
23834
- }
23835
- if (to == '') {
23836
- if (b_exit)
23837
- this.goto_edit_doc(notif_av);
23838
- return;
23839
- }
23840
- if (this.email_bloccate) {
23841
- if (b_exit)
23842
- this.goto_edit_doc(notif_av);
23843
- return;
23844
- }
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;
23845
23867
  var p = new QParam();
23846
- p.sql = "send_wkf_mail";
23847
- //non notifico l'autore della approvazione
23848
- to = to.split(mit + ",").join("");
23849
- to = to.split("," + mit).join("");
23850
- //fine non notifico l'autore della approvazione
23851
- if (ical == null)
23852
- ical = "";
23853
- if (ical != "")
23854
- ical = JSON.stringify(ical);
23855
- p.values = [
23856
- mit,
23857
- to,
23858
- ogg,
23859
- descri.split("\n").join("<br>"),
23860
- idapp,
23861
- iddoc,
23862
- link,
23863
- cc,
23864
- nota,
23865
- ical,
23866
- ];
23867
- this.m_wkf.doQuery(p).subscribe(function (data) {
23868
- if (b_exit)
23869
- _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
+ });
23870
23876
  });
23871
23877
  };
23872
23878
  dati_aggiuntivi_v2.prototype.goto_edit_doc = function (b_notif_av) {
@@ -24547,37 +24553,56 @@
24547
24553
  if (_this.app_info.body_riassegna != null)
24548
24554
  if (_this.app_info.body_riassegna != "")
24549
24555
  body_email = _this.app_info.body_riassegna;
24550
- for (var prop in _this.m_obj)
24551
- if (_this.m_obj[prop] != null) {
24552
- if (Object.prototype.toString.call(_this.m_obj[prop]) ===
24553
- "[object Date]") {
24554
- oggetto_email = oggetto_email
24555
- .split("{{" + prop + "}}")
24556
- .join(_this.uti_s.date2String(_this.m_obj[prop]));
24557
- }
24558
- else if (("" + _this.m_obj[prop]).indexOf("T00:00:00") == -1)
24559
- oggetto_email = oggetto_email
24560
- .split("{{" + prop + "}}")
24561
- .join(_this.m_obj[prop]);
24562
- else
24563
- oggetto_email = oggetto_email
24564
- .split("{{" + prop + "}}")
24565
- .join(_this.uti_s.date2String(_this.uti_s.string2date(_this.m_obj[prop], 2)));
24566
- if (Object.prototype.toString.call(_this.m_obj[prop]) ===
24567
- "[object Date]") {
24568
- body_email = body_email
24569
- .split("{{" + prop + "}}")
24570
- .join(_this.uti_s.date2String(_this.m_obj[prop]));
24571
- }
24572
- else if (("" + _this.m_obj[prop]).indexOf("T00:00:00") == -1)
24573
- body_email = body_email
24574
- .split("{{" + prop + "}}")
24575
- .join(_this.m_obj[prop]);
24576
- else
24577
- body_email = body_email
24578
- .split("{{" + prop + "}}")
24579
- .join(_this.uti_s.date2String(_this.uti_s.string2date(_this.m_obj[prop], 2)));
24580
- }
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
+ }*/
24581
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 +
24582
24607
  "#/" +
24583
24608
  _this.app_info.modulo_swf +
@@ -24585,7 +24610,7 @@
24585
24610
  _this.id_applicativo +
24586
24611
  "/" +
24587
24612
  _this.id_documento +
24588
- "/edit", _this.m_obj.codice, "", true, "");
24613
+ "/edit", _this.m_obj.codice, "", true, "", true, '');
24589
24614
  }
24590
24615
  else
24591
24616
  _this.goto_edit_doc();