@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.
@@ -24994,38 +24994,57 @@ class dati_aggiuntivi_v2 {
24994
24994
  if (this.app_info.body_riassegna != null)
24995
24995
  if (this.app_info.body_riassegna != "")
24996
24996
  body_email = this.app_info.body_riassegna;
24997
- console.log('this.app_info.subject_riassegna ', this.app_info.subject_riassegna);
24998
- for (let prop in this.m_obj)
24999
- if (this.m_obj[prop] != null) {
25000
- if (Object.prototype.toString.call(this.m_obj[prop]) ===
25001
- "[object Date]") {
25002
- oggetto_email = oggetto_email
25003
- .split("{{" + prop + "}}")
25004
- .join(this.uti_s.date2String(this.m_obj[prop]));
25005
- }
25006
- else if (("" + this.m_obj[prop]).indexOf("T00:00:00") == -1)
25007
- oggetto_email = oggetto_email
25008
- .split("{{" + prop + "}}")
25009
- .join(this.m_obj[prop]);
25010
- else
25011
- oggetto_email = oggetto_email
25012
- .split("{{" + prop + "}}")
25013
- .join(this.uti_s.date2String(this.uti_s.string2date(this.m_obj[prop], 2)));
25014
- if (Object.prototype.toString.call(this.m_obj[prop]) ===
25015
- "[object Date]") {
25016
- body_email = body_email
25017
- .split("{{" + prop + "}}")
25018
- .join(this.uti_s.date2String(this.m_obj[prop]));
25019
- }
25020
- else if (("" + this.m_obj[prop]).indexOf("T00:00:00") == -1)
25021
- body_email = body_email
25022
- .split("{{" + prop + "}}")
25023
- .join(this.m_obj[prop]);
25024
- else
25025
- body_email = body_email
25026
- .split("{{" + prop + "}}")
25027
- .join(this.uti_s.date2String(this.uti_s.string2date(this.m_obj[prop], 2)));
25028
- }
24997
+ oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
24998
+ body_email = body_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
24999
+ /* for (let prop in this.m_obj)
25000
+ if (this.m_obj[prop] != null) {
25001
+
25002
+ if (
25003
+ Object.prototype.toString.call(this.m_obj[prop]) ===
25004
+ "[object Date]"
25005
+ ) {
25006
+ oggetto_email = oggetto_email
25007
+ .split("{{" + prop + "}}")
25008
+ .join(this.uti_s.date2String(this.m_obj[prop]));
25009
+ } else if (
25010
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
25011
+ )
25012
+ oggetto_email = oggetto_email
25013
+ .split("{{" + prop + "}}")
25014
+ .join(this.m_obj[prop]);
25015
+ else
25016
+ oggetto_email = oggetto_email
25017
+ .split("{{" + prop + "}}")
25018
+ .join(
25019
+ this.uti_s.date2String(
25020
+ this.uti_s.string2date(this.m_obj[prop], 2)
25021
+ )
25022
+ );
25023
+
25024
+
25025
+
25026
+ if (
25027
+ Object.prototype.toString.call(this.m_obj[prop]) ===
25028
+ "[object Date]"
25029
+ ) {
25030
+ body_email = body_email
25031
+ .split("{{" + prop + "}}")
25032
+ .join(this.uti_s.date2String(this.m_obj[prop]));
25033
+ } else if (
25034
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
25035
+ )
25036
+ body_email = body_email
25037
+ .split("{{" + prop + "}}")
25038
+ .join(this.m_obj[prop]);
25039
+ else
25040
+ body_email = body_email
25041
+ .split("{{" + prop + "}}")
25042
+ .join(
25043
+ this.uti_s.date2String(
25044
+ this.uti_s.string2date(this.m_obj[prop], 2)
25045
+ )
25046
+ );
25047
+ }*/
25029
25048
  this.sendEMail_ex(this.user_idp, arr_new_arr, oggetto_email, body_email, this.id_applicativo, this.id_documento, this.app_info.COMPANY_SITE_ROOT +
25030
25049
  "#/" +
25031
25050
  this.app_info.modulo_swf +
@@ -25033,7 +25052,7 @@ class dati_aggiuntivi_v2 {
25033
25052
  this.id_applicativo +
25034
25053
  "/" +
25035
25054
  this.id_documento +
25036
- "/edit", this.m_obj.codice, "", true, "", false);
25055
+ "/edit", this.m_obj.codice, "", true, "", false, '');
25037
25056
  }
25038
25057
  /* else
25039
25058
  this.sendEMail_ex(
@@ -25185,48 +25204,35 @@ class dati_aggiuntivi_v2 {
25185
25204
  });
25186
25205
  }
25187
25206
  }
25188
- sendEMail_ex(mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av = true, ical = "", b_exit = true) {
25189
- console.log('this.email_bloccate ', this.email_bloccate);
25190
- if (to == null) {
25191
- if (b_exit)
25192
- this.goto_edit_doc(notif_av);
25193
- return;
25194
- }
25195
- if (to == '') {
25196
- if (b_exit)
25197
- this.goto_edit_doc(notif_av);
25198
- return;
25199
- }
25200
- if (this.email_bloccate) {
25201
- if (b_exit)
25202
- this.goto_edit_doc(notif_av);
25203
- return;
25204
- }
25207
+ sendEMail_ex(mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av = true, ical = "", b_exit = true, commento = "") {
25208
+ let dev_mode = false;
25209
+ if (this.app_s.dev_mode != null)
25210
+ if (this.app_s.dev_mode == "1")
25211
+ dev_mode = true;
25212
+ let obj_r = {
25213
+ destinatari: to.split(','),
25214
+ commento: commento,
25215
+ id_applicazione: idapp,
25216
+ id_documento: iddoc,
25217
+ username: mit,
25218
+ e_subject: ogg,
25219
+ e_body: descri,
25220
+ dev_mode: dev_mode ? 1 : 0,
25221
+ };
25222
+ let fs = new FSInput();
25223
+ fs.command = "exec_app";
25224
+ fs.p1 = 'send_email';
25225
+ let uiid_op = this.uti_s.newGuid();
25226
+ fs.p2 = uiid_op;
25205
25227
  let p = new QParam();
25206
- p.sql = "send_wkf_mail";
25207
- //non notifico l'autore della approvazione
25208
- to = to.split(mit + ",").join("");
25209
- to = to.split("," + mit).join("");
25210
- //fine non notifico l'autore della approvazione
25211
- if (ical == null)
25212
- ical = "";
25213
- if (ical != "")
25214
- ical = JSON.stringify(ical);
25215
- p.values = [
25216
- mit,
25217
- to,
25218
- ogg,
25219
- descri.split("\n").join("<br>"),
25220
- idapp,
25221
- iddoc,
25222
- link,
25223
- cc,
25224
- nota,
25225
- ical,
25226
- ];
25227
- this.m_wkf.doQuery(p).subscribe((data) => {
25228
- if (b_exit)
25229
- this.goto_edit_doc(notif_av);
25228
+ p.sql = "INSERT_WKF_OP";
25229
+ p.values = [uiid_op, JSON.stringify(obj_r)];
25230
+ p.types = ['string', 'string'];
25231
+ this.m_dataService.doQuery(p).subscribe((data) => {
25232
+ this.m_fileservice.doQuery(fs).subscribe((data) => {
25233
+ if (b_exit)
25234
+ this.goto_edit_doc(notif_av);
25235
+ });
25230
25236
  });
25231
25237
  }
25232
25238
  goto_edit_doc(b_notif_av = true) {
@@ -25886,37 +25892,58 @@ class dati_aggiuntivi_v2 {
25886
25892
  if (this.app_info.body_riassegna != null)
25887
25893
  if (this.app_info.body_riassegna != "")
25888
25894
  body_email = this.app_info.body_riassegna;
25889
- for (let prop in this.m_obj)
25890
- if (this.m_obj[prop] != null) {
25891
- if (Object.prototype.toString.call(this.m_obj[prop]) ===
25892
- "[object Date]") {
25893
- oggetto_email = oggetto_email
25894
- .split("{{" + prop + "}}")
25895
- .join(this.uti_s.date2String(this.m_obj[prop]));
25896
- }
25897
- else if (("" + this.m_obj[prop]).indexOf("T00:00:00") == -1)
25898
- oggetto_email = oggetto_email
25899
- .split("{{" + prop + "}}")
25900
- .join(this.m_obj[prop]);
25901
- else
25902
- oggetto_email = oggetto_email
25903
- .split("{{" + prop + "}}")
25904
- .join(this.uti_s.date2String(this.uti_s.string2date(this.m_obj[prop], 2)));
25905
- if (Object.prototype.toString.call(this.m_obj[prop]) ===
25906
- "[object Date]") {
25907
- body_email = body_email
25908
- .split("{{" + prop + "}}")
25909
- .join(this.uti_s.date2String(this.m_obj[prop]));
25910
- }
25911
- else if (("" + this.m_obj[prop]).indexOf("T00:00:00") == -1)
25912
- body_email = body_email
25913
- .split("{{" + prop + "}}")
25914
- .join(this.m_obj[prop]);
25915
- else
25916
- body_email = body_email
25917
- .split("{{" + prop + "}}")
25918
- .join(this.uti_s.date2String(this.uti_s.string2date(this.m_obj[prop], 2)));
25919
- }
25895
+ oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
25896
+ body_email = body_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
25897
+ /*
25898
+ for (let prop in this.m_obj)
25899
+ if (this.m_obj[prop] != null) {
25900
+
25901
+ if (
25902
+ Object.prototype.toString.call(this.m_obj[prop]) ===
25903
+ "[object Date]"
25904
+ ) {
25905
+ oggetto_email = oggetto_email
25906
+ .split("{{" + prop + "}}")
25907
+ .join(this.uti_s.date2String(this.m_obj[prop]));
25908
+ } else if (
25909
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
25910
+ )
25911
+ oggetto_email = oggetto_email
25912
+ .split("{{" + prop + "}}")
25913
+ .join(this.m_obj[prop]);
25914
+ else
25915
+ oggetto_email = oggetto_email
25916
+ .split("{{" + prop + "}}")
25917
+ .join(
25918
+ this.uti_s.date2String(
25919
+ this.uti_s.string2date(this.m_obj[prop], 2)
25920
+ )
25921
+ );
25922
+
25923
+
25924
+
25925
+ if (
25926
+ Object.prototype.toString.call(this.m_obj[prop]) ===
25927
+ "[object Date]"
25928
+ ) {
25929
+ body_email = body_email
25930
+ .split("{{" + prop + "}}")
25931
+ .join(this.uti_s.date2String(this.m_obj[prop]));
25932
+ } else if (
25933
+ ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
25934
+ )
25935
+ body_email = body_email
25936
+ .split("{{" + prop + "}}")
25937
+ .join(this.m_obj[prop]);
25938
+ else
25939
+ body_email = body_email
25940
+ .split("{{" + prop + "}}")
25941
+ .join(
25942
+ this.uti_s.date2String(
25943
+ this.uti_s.string2date(this.m_obj[prop], 2)
25944
+ )
25945
+ );
25946
+ }*/
25920
25947
  this.sendEMail_ex(this.user_idp, s_notif, oggetto_email, body_email, this.id_applicativo, this.id_documento, this.app_s.COMPANY_SITE_ROOT +
25921
25948
  "#/" +
25922
25949
  this.app_info.modulo_swf +
@@ -25924,7 +25951,7 @@ class dati_aggiuntivi_v2 {
25924
25951
  this.id_applicativo +
25925
25952
  "/" +
25926
25953
  this.id_documento +
25927
- "/edit", this.m_obj.codice, "", true, "");
25954
+ "/edit", this.m_obj.codice, "", true, "", true, '');
25928
25955
  }
25929
25956
  else
25930
25957
  this.goto_edit_doc();
@@ -28855,7 +28882,7 @@ class FSResult {
28855
28882
  }
28856
28883
 
28857
28884
  class wkfapp_v2 {
28858
- constructor(app_s, m_service, m_dataService, m_router, _toastr, dialog, m_wkf, m_uti, tsr) {
28885
+ constructor(app_s, m_service, m_dataService, m_router, _toastr, dialog, m_wkf, m_uti, tsr, m_fileservice) {
28859
28886
  this.app_s = app_s;
28860
28887
  this.m_service = m_service;
28861
28888
  this.m_dataService = m_dataService;
@@ -28865,6 +28892,7 @@ class wkfapp_v2 {
28865
28892
  this.m_wkf = m_wkf;
28866
28893
  this.m_uti = m_uti;
28867
28894
  this.tsr = tsr;
28895
+ this.m_fileservice = m_fileservice;
28868
28896
  this.b_editing = false;
28869
28897
  this.is_Supervisor = false;
28870
28898
  this.is_Visor = false;
@@ -28889,6 +28917,7 @@ class wkfapp_v2 {
28889
28917
  this.is_init = false;
28890
28918
  this.imp = "";
28891
28919
  this.m_cod_documento = "";
28920
+ this.app_info = {};
28892
28921
  this.sort_field = "";
28893
28922
  if (!m_service.checkCredentials()) {
28894
28923
  return;
@@ -29290,13 +29319,23 @@ class wkfapp_v2 {
29290
29319
  a_aut = a_aut + this.wax[i].username;
29291
29320
  }
29292
29321
  forkJoin(op).subscribe((result) => { });
29293
- this.sendEMail_ex(this.user_idp, a_datanot, this.titolo_email +
29322
+ let oggetto_email = this.titolo_email +
29294
29323
  this.tsr.instant("L'utente ") +
29295
29324
  this.user_cognome +
29296
29325
  " " +
29297
29326
  this.user_nome +
29298
29327
  this.tsr.instant(" ti ha riassegnato il documento: ") +
29299
- 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 +
29328
+ this.get_grid().sRow.codice;
29329
+ let body_email = "Commento:\n\n" + this.nota_wax;
29330
+ if (this.app_info.subject_riassegna != null)
29331
+ if (this.app_info.subject_riassegna != "")
29332
+ oggetto_email = this.app_info.subject_riassegna;
29333
+ if (this.app_info.body_riassegna != null)
29334
+ if (this.app_info.body_riassegna != "")
29335
+ body_email = this.app_info.body_riassegna;
29336
+ oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(this.os_r.description);
29337
+ body_email = body_email.split('{{TRANSITION_DESCRI}}').join(this.os_r.description);
29338
+ 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 +
29300
29339
  "#/" +
29301
29340
  this.app_root +
29302
29341
  "/" +
@@ -29403,26 +29442,34 @@ class wkfapp_v2 {
29403
29442
  });
29404
29443
  }
29405
29444
  }
29406
- sendEMail_ex(mit, to, ogg, descri, idapp, iddoc, link, cc, nota, ical = "") {
29407
- if (to == null)
29408
- return;
29409
- if (to == '')
29410
- return;
29445
+ sendEMail_ex(mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av = true, ical = "", b_exit = true, commento = "") {
29446
+ let dev_mode = false;
29447
+ if (this.app_s.dev_mode != null)
29448
+ if (this.app_s.dev_mode == "1")
29449
+ dev_mode = true;
29450
+ let obj_r = {
29451
+ destinatari: to.split(','),
29452
+ commento: commento,
29453
+ id_applicazione: idapp,
29454
+ id_documento: iddoc,
29455
+ username: mit,
29456
+ e_subject: ogg,
29457
+ e_body: descri,
29458
+ dev_mode: dev_mode ? 1 : 0,
29459
+ };
29460
+ let fs = new FSInput();
29461
+ fs.command = "exec_app";
29462
+ fs.p1 = 'send_email';
29463
+ let uiid_op = this.m_uti.newGuid();
29464
+ fs.p2 = uiid_op;
29411
29465
  let p = new QParam();
29412
- p.sql = "send_wkf_mail";
29413
- p.values = [
29414
- mit,
29415
- to,
29416
- ogg,
29417
- descri.split("\n").join("<br>"),
29418
- idapp,
29419
- iddoc,
29420
- link,
29421
- cc,
29422
- nota,
29423
- ical,
29424
- ];
29425
- this.m_wkf.doQuery(p).subscribe((data) => { });
29466
+ p.sql = "INSERT_WKF_OP";
29467
+ p.values = [uiid_op, JSON.stringify(obj_r)];
29468
+ p.types = ['string', 'string'];
29469
+ this.m_dataService.doQuery(p).subscribe((data) => {
29470
+ this.m_fileservice.doQuery(fs).subscribe((data) => {
29471
+ });
29472
+ });
29426
29473
  }
29427
29474
  annulla_imp() {
29428
29475
  let p = new QParam();
@@ -29496,7 +29543,7 @@ class wkfapp_v2 {
29496
29543
  data.result_data[0].cognome +
29497
29544
  " " +
29498
29545
  data.result_data[0].nome;
29499
- console.log('SETTO LOCALSTORAGE: ', this.app_s.COMPANY_KEY + '_imp_user', this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
29546
+ // console.log('SETTO LOCALSTORAGE: ',this.app_s.COMPANY_KEY+'_imp_user',this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
29500
29547
  localStorage.setItem(this.app_s.COMPANY_KEY + '_imp_user', this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
29501
29548
  this.get_grid().doFill("");
29502
29549
  }
@@ -29612,6 +29659,7 @@ class wkfapp_v2 {
29612
29659
  if (data.result_msg == "OK") {
29613
29660
  let a_conf = data.result_data;
29614
29661
  this.id_applicativo = a_conf[0].id_gruppo;
29662
+ this.app_info = a_conf[0];
29615
29663
  this.app_root = a_conf[0].modulo_swf;
29616
29664
  this.codice_app = a_conf[0].codice_documento; //codice documento
29617
29665
  this.att_panelcat = a_conf[0].descrizione_breve; //descrizione breve
@@ -29762,7 +29810,8 @@ wkfapp_v2.ctorParameters = () => [
29762
29810
  { type: MatDialog },
29763
29811
  { type: WkfService },
29764
29812
  { type: UtilityService },
29765
- { type: TranslateService }
29813
+ { type: TranslateService },
29814
+ { type: FileService }
29766
29815
  ];
29767
29816
 
29768
29817
  /**