@fluxhub/fluxhub-lib 10.0.722 → 10.0.724

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.
@@ -21896,7 +21896,7 @@
21896
21896
  };
21897
21897
 
21898
21898
  var wkfapp_v2 = /** @class */ (function () {
21899
- function wkfapp_v2(app_s, m_service, m_dataService, m_router, _toastr, dialog, m_wkf, m_uti, tsr) {
21899
+ function wkfapp_v2(app_s, m_service, m_dataService, m_router, _toastr, dialog, m_wkf, m_uti, tsr, m_fileservice) {
21900
21900
  this.app_s = app_s;
21901
21901
  this.m_service = m_service;
21902
21902
  this.m_dataService = m_dataService;
@@ -21906,6 +21906,7 @@
21906
21906
  this.m_wkf = m_wkf;
21907
21907
  this.m_uti = m_uti;
21908
21908
  this.tsr = tsr;
21909
+ this.m_fileservice = m_fileservice;
21909
21910
  this.b_editing = false;
21910
21911
  this.is_Supervisor = false;
21911
21912
  this.is_Visor = false;
@@ -21930,6 +21931,7 @@
21930
21931
  this.is_init = false;
21931
21932
  this.imp = "";
21932
21933
  this.m_cod_documento = "";
21934
+ this.app_info = {};
21933
21935
  this.sort_field = "";
21934
21936
  if (!m_service.checkCredentials()) {
21935
21937
  return;
@@ -22342,13 +22344,23 @@
22342
22344
  a_aut = a_aut + this.wax[i].username;
22343
22345
  }
22344
22346
  rxjs.forkJoin(op).subscribe(function (result) { });
22345
- this.sendEMail_ex(this.user_idp, a_datanot, this.titolo_email +
22347
+ var oggetto_email = this.titolo_email +
22346
22348
  this.tsr.instant("L'utente ") +
22347
22349
  this.user_cognome +
22348
22350
  " " +
22349
22351
  this.user_nome +
22350
22352
  this.tsr.instant(" ti ha riassegnato il documento: ") +
22351
- this.get_grid().sRow.codice, "Commento:\n\n" + this.nota_wax, this.id_applicativo, this.get_grid().sRow.uiid, this.app_s.COMPANY_SITE_ROOT +
22353
+ this.get_grid().sRow.codice;
22354
+ var body_email = "Commento:\n\n" + this.nota_wax;
22355
+ if (this.app_info.subject_riassegna != null)
22356
+ if (this.app_info.subject_riassegna != "")
22357
+ oggetto_email = this.app_info.subject_riassegna;
22358
+ if (this.app_info.body_riassegna != null)
22359
+ if (this.app_info.body_riassegna != "")
22360
+ body_email = this.app_info.body_riassegna;
22361
+ oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(this.os_r.description);
22362
+ body_email = body_email.split('{{TRANSITION_DESCRI}}').join(this.os_r.description);
22363
+ this.sendEMail_ex(this.user_idp, a_datanot, oggetto_email, body_email, this.id_applicativo, this.get_grid().sRow.uiid, this.app_s.COMPANY_SITE_ROOT +
22352
22364
  "#/" +
22353
22365
  this.app_root +
22354
22366
  "/" +
@@ -22455,27 +22467,39 @@
22455
22467
  });
22456
22468
  }
22457
22469
  };
22458
- wkfapp_v2.prototype.sendEMail_ex = function (mit, to, ogg, descri, idapp, iddoc, link, cc, nota, ical) {
22470
+ wkfapp_v2.prototype.sendEMail_ex = function (mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av, ical, b_exit, commento) {
22471
+ var _this = this;
22472
+ if (notif_av === void 0) { notif_av = true; }
22459
22473
  if (ical === void 0) { ical = ""; }
22460
- if (to == null)
22461
- return;
22462
- if (to == '')
22463
- return;
22474
+ if (b_exit === void 0) { b_exit = true; }
22475
+ if (commento === void 0) { commento = ""; }
22476
+ var dev_mode = false;
22477
+ if (this.app_s.dev_mode != null)
22478
+ if (this.app_s.dev_mode == "1")
22479
+ dev_mode = true;
22480
+ var obj_r = {
22481
+ destinatari: to.split(','),
22482
+ commento: commento,
22483
+ id_applicazione: idapp,
22484
+ id_documento: iddoc,
22485
+ username: mit,
22486
+ e_subject: ogg,
22487
+ e_body: descri,
22488
+ dev_mode: dev_mode ? 1 : 0,
22489
+ };
22490
+ var fs = new FSInput();
22491
+ fs.command = "exec_app";
22492
+ fs.p1 = 'send_email';
22493
+ var uiid_op = this.m_uti.newGuid();
22494
+ fs.p2 = uiid_op;
22464
22495
  var p = new QParam();
22465
- p.sql = "send_wkf_mail";
22466
- p.values = [
22467
- mit,
22468
- to,
22469
- ogg,
22470
- descri.split("\n").join("<br>"),
22471
- idapp,
22472
- iddoc,
22473
- link,
22474
- cc,
22475
- nota,
22476
- ical,
22477
- ];
22478
- this.m_wkf.doQuery(p).subscribe(function (data) { });
22496
+ p.sql = "INSERT_WKF_OP";
22497
+ p.values = [uiid_op, JSON.stringify(obj_r)];
22498
+ p.types = ['string', 'string'];
22499
+ this.m_dataService.doQuery(p).subscribe(function (data) {
22500
+ _this.m_fileservice.doQuery(fs).subscribe(function (data) {
22501
+ });
22502
+ });
22479
22503
  };
22480
22504
  wkfapp_v2.prototype.annulla_imp = function () {
22481
22505
  var _this = this;
@@ -22551,7 +22575,7 @@
22551
22575
  data.result_data[0].cognome +
22552
22576
  " " +
22553
22577
  data.result_data[0].nome;
22554
- console.log('SETTO LOCALSTORAGE: ', _this.app_s.COMPANY_KEY + '_imp_user', _this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
22578
+ // console.log('SETTO LOCALSTORAGE: ',this.app_s.COMPANY_KEY+'_imp_user',this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
22555
22579
  localStorage.setItem(_this.app_s.COMPANY_KEY + '_imp_user', _this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
22556
22580
  _this.get_grid().doFill("");
22557
22581
  }
@@ -22670,6 +22694,7 @@
22670
22694
  if (data.result_msg == "OK") {
22671
22695
  var a_conf = data.result_data;
22672
22696
  _this.id_applicativo = a_conf[0].id_gruppo;
22697
+ _this.app_info = a_conf[0];
22673
22698
  _this.app_root = a_conf[0].modulo_swf;
22674
22699
  _this.codice_app = a_conf[0].codice_documento; //codice documento
22675
22700
  _this.att_panelcat = a_conf[0].descrizione_breve; //descrizione breve
@@ -22821,7 +22846,8 @@
22821
22846
  { type: dialog.MatDialog },
22822
22847
  { type: WkfService },
22823
22848
  { type: UtilityService },
22824
- { type: core.TranslateService }
22849
+ { type: core.TranslateService },
22850
+ { type: FileService }
22825
22851
  ]; };
22826
22852
 
22827
22853
  var dati_aggiuntivi_v2 = /** @class */ (function () {
@@ -23626,38 +23652,57 @@
23626
23652
  if (_this.app_info.body_riassegna != null)
23627
23653
  if (_this.app_info.body_riassegna != "")
23628
23654
  body_email = _this.app_info.body_riassegna;
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
- }
23655
+ oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
23656
+ body_email = body_email.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
23657
+ /* for (let prop in this.m_obj)
23658
+ if (this.m_obj[prop] != null) {
23659
+
23660
+ if (
23661
+ Object.prototype.toString.call(this.m_obj[prop]) ===
23662
+ "[object Date]"
23663
+ ) {
23664
+ oggetto_email = oggetto_email
23665
+ .split("{{" + prop + "}}")
23666
+ .join(this.uti_s.date2String(this.m_obj[prop]));
23667
+ } else if (
23668
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
23669
+ )
23670
+ oggetto_email = oggetto_email
23671
+ .split("{{" + prop + "}}")
23672
+ .join(this.m_obj[prop]);
23673
+ else
23674
+ oggetto_email = oggetto_email
23675
+ .split("{{" + prop + "}}")
23676
+ .join(
23677
+ this.uti_s.date2String(
23678
+ this.uti_s.string2date(this.m_obj[prop], 2)
23679
+ )
23680
+ );
23681
+
23682
+
23683
+
23684
+ if (
23685
+ Object.prototype.toString.call(this.m_obj[prop]) ===
23686
+ "[object Date]"
23687
+ ) {
23688
+ body_email = body_email
23689
+ .split("{{" + prop + "}}")
23690
+ .join(this.uti_s.date2String(this.m_obj[prop]));
23691
+ } else if (
23692
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
23693
+ )
23694
+ body_email = body_email
23695
+ .split("{{" + prop + "}}")
23696
+ .join(this.m_obj[prop]);
23697
+ else
23698
+ body_email = body_email
23699
+ .split("{{" + prop + "}}")
23700
+ .join(
23701
+ this.uti_s.date2String(
23702
+ this.uti_s.string2date(this.m_obj[prop], 2)
23703
+ )
23704
+ );
23705
+ }*/
23661
23706
  _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
23707
  "#/" +
23663
23708
  _this.app_info.modulo_swf +
@@ -23665,7 +23710,7 @@
23665
23710
  _this.id_applicativo +
23666
23711
  "/" +
23667
23712
  _this.id_documento +
23668
- "/edit", _this.m_obj.codice, "", true, "", false);
23713
+ "/edit", _this.m_obj.codice, "", true, "", false, '');
23669
23714
  }
23670
23715
  /* else
23671
23716
  this.sendEMail_ex(
@@ -23821,52 +23866,40 @@
23821
23866
  });
23822
23867
  }
23823
23868
  };
23824
- dati_aggiuntivi_v2.prototype.sendEMail_ex = function (mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av, ical, b_exit) {
23869
+ dati_aggiuntivi_v2.prototype.sendEMail_ex = function (mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av, ical, b_exit, commento) {
23825
23870
  var _this = this;
23826
23871
  if (notif_av === void 0) { notif_av = true; }
23827
23872
  if (ical === void 0) { ical = ""; }
23828
23873
  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
- }
23874
+ if (commento === void 0) { commento = ""; }
23875
+ var dev_mode = false;
23876
+ if (this.app_s.dev_mode != null)
23877
+ if (this.app_s.dev_mode == "1")
23878
+ dev_mode = true;
23879
+ var obj_r = {
23880
+ destinatari: to.split(','),
23881
+ commento: commento,
23882
+ id_applicazione: idapp,
23883
+ id_documento: iddoc,
23884
+ username: mit,
23885
+ e_subject: ogg,
23886
+ e_body: descri,
23887
+ dev_mode: dev_mode ? 1 : 0,
23888
+ };
23889
+ var fs = new FSInput();
23890
+ fs.command = "exec_app";
23891
+ fs.p1 = 'send_email';
23892
+ var uiid_op = this.uti_s.newGuid();
23893
+ fs.p2 = uiid_op;
23845
23894
  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);
23895
+ p.sql = "INSERT_WKF_OP";
23896
+ p.values = [uiid_op, JSON.stringify(obj_r)];
23897
+ p.types = ['string', 'string'];
23898
+ this.m_dataService.doQuery(p).subscribe(function (data) {
23899
+ _this.m_fileservice.doQuery(fs).subscribe(function (data) {
23900
+ if (b_exit)
23901
+ _this.goto_edit_doc(notif_av);
23902
+ });
23870
23903
  });
23871
23904
  };
23872
23905
  dati_aggiuntivi_v2.prototype.goto_edit_doc = function (b_notif_av) {
@@ -24547,37 +24580,58 @@
24547
24580
  if (_this.app_info.body_riassegna != null)
24548
24581
  if (_this.app_info.body_riassegna != "")
24549
24582
  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
- }
24583
+ oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
24584
+ body_email = body_email.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
24585
+ /*
24586
+ for (let prop in this.m_obj)
24587
+ if (this.m_obj[prop] != null) {
24588
+
24589
+ if (
24590
+ Object.prototype.toString.call(this.m_obj[prop]) ===
24591
+ "[object Date]"
24592
+ ) {
24593
+ oggetto_email = oggetto_email
24594
+ .split("{{" + prop + "}}")
24595
+ .join(this.uti_s.date2String(this.m_obj[prop]));
24596
+ } else if (
24597
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
24598
+ )
24599
+ oggetto_email = oggetto_email
24600
+ .split("{{" + prop + "}}")
24601
+ .join(this.m_obj[prop]);
24602
+ else
24603
+ oggetto_email = oggetto_email
24604
+ .split("{{" + prop + "}}")
24605
+ .join(
24606
+ this.uti_s.date2String(
24607
+ this.uti_s.string2date(this.m_obj[prop], 2)
24608
+ )
24609
+ );
24610
+
24611
+
24612
+
24613
+ if (
24614
+ Object.prototype.toString.call(this.m_obj[prop]) ===
24615
+ "[object Date]"
24616
+ ) {
24617
+ body_email = body_email
24618
+ .split("{{" + prop + "}}")
24619
+ .join(this.uti_s.date2String(this.m_obj[prop]));
24620
+ } else if (
24621
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
24622
+ )
24623
+ body_email = body_email
24624
+ .split("{{" + prop + "}}")
24625
+ .join(this.m_obj[prop]);
24626
+ else
24627
+ body_email = body_email
24628
+ .split("{{" + prop + "}}")
24629
+ .join(
24630
+ this.uti_s.date2String(
24631
+ this.uti_s.string2date(this.m_obj[prop], 2)
24632
+ )
24633
+ );
24634
+ }*/
24581
24635
  _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
24636
  "#/" +
24583
24637
  _this.app_info.modulo_swf +
@@ -24585,7 +24639,7 @@
24585
24639
  _this.id_applicativo +
24586
24640
  "/" +
24587
24641
  _this.id_documento +
24588
- "/edit", _this.m_obj.codice, "", true, "");
24642
+ "/edit", _this.m_obj.codice, "", true, "", true, '');
24589
24643
  }
24590
24644
  else
24591
24645
  _this.goto_edit_doc();