@fluxhub/fluxhub-lib 10.0.723 → 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,7 +24994,8 @@ 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);
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));
24998
24999
  /* for (let prop in this.m_obj)
24999
25000
  if (this.m_obj[prop] != null) {
25000
25001
 
@@ -25891,6 +25892,8 @@ class dati_aggiuntivi_v2 {
25891
25892
  if (this.app_info.body_riassegna != null)
25892
25893
  if (this.app_info.body_riassegna != "")
25893
25894
  body_email = this.app_info.body_riassegna;
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));
25894
25897
  /*
25895
25898
  for (let prop in this.m_obj)
25896
25899
  if (this.m_obj[prop] != null) {
@@ -28879,7 +28882,7 @@ class FSResult {
28879
28882
  }
28880
28883
 
28881
28884
  class wkfapp_v2 {
28882
- 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) {
28883
28886
  this.app_s = app_s;
28884
28887
  this.m_service = m_service;
28885
28888
  this.m_dataService = m_dataService;
@@ -28889,6 +28892,7 @@ class wkfapp_v2 {
28889
28892
  this.m_wkf = m_wkf;
28890
28893
  this.m_uti = m_uti;
28891
28894
  this.tsr = tsr;
28895
+ this.m_fileservice = m_fileservice;
28892
28896
  this.b_editing = false;
28893
28897
  this.is_Supervisor = false;
28894
28898
  this.is_Visor = false;
@@ -28913,6 +28917,7 @@ class wkfapp_v2 {
28913
28917
  this.is_init = false;
28914
28918
  this.imp = "";
28915
28919
  this.m_cod_documento = "";
28920
+ this.app_info = {};
28916
28921
  this.sort_field = "";
28917
28922
  if (!m_service.checkCredentials()) {
28918
28923
  return;
@@ -29314,13 +29319,23 @@ class wkfapp_v2 {
29314
29319
  a_aut = a_aut + this.wax[i].username;
29315
29320
  }
29316
29321
  forkJoin(op).subscribe((result) => { });
29317
- this.sendEMail_ex(this.user_idp, a_datanot, this.titolo_email +
29322
+ let oggetto_email = this.titolo_email +
29318
29323
  this.tsr.instant("L'utente ") +
29319
29324
  this.user_cognome +
29320
29325
  " " +
29321
29326
  this.user_nome +
29322
29327
  this.tsr.instant(" ti ha riassegnato il documento: ") +
29323
- 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 +
29324
29339
  "#/" +
29325
29340
  this.app_root +
29326
29341
  "/" +
@@ -29427,26 +29442,34 @@ class wkfapp_v2 {
29427
29442
  });
29428
29443
  }
29429
29444
  }
29430
- sendEMail_ex(mit, to, ogg, descri, idapp, iddoc, link, cc, nota, ical = "") {
29431
- if (to == null)
29432
- return;
29433
- if (to == '')
29434
- 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;
29435
29465
  let p = new QParam();
29436
- p.sql = "send_wkf_mail";
29437
- p.values = [
29438
- mit,
29439
- to,
29440
- ogg,
29441
- descri.split("\n").join("<br>"),
29442
- idapp,
29443
- iddoc,
29444
- link,
29445
- cc,
29446
- nota,
29447
- ical,
29448
- ];
29449
- 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
+ });
29450
29473
  }
29451
29474
  annulla_imp() {
29452
29475
  let p = new QParam();
@@ -29520,7 +29543,7 @@ class wkfapp_v2 {
29520
29543
  data.result_data[0].cognome +
29521
29544
  " " +
29522
29545
  data.result_data[0].nome;
29523
- 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])));
29524
29547
  localStorage.setItem(this.app_s.COMPANY_KEY + '_imp_user', this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
29525
29548
  this.get_grid().doFill("");
29526
29549
  }
@@ -29636,6 +29659,7 @@ class wkfapp_v2 {
29636
29659
  if (data.result_msg == "OK") {
29637
29660
  let a_conf = data.result_data;
29638
29661
  this.id_applicativo = a_conf[0].id_gruppo;
29662
+ this.app_info = a_conf[0];
29639
29663
  this.app_root = a_conf[0].modulo_swf;
29640
29664
  this.codice_app = a_conf[0].codice_documento; //codice documento
29641
29665
  this.att_panelcat = a_conf[0].descrizione_breve; //descrizione breve
@@ -29786,7 +29810,8 @@ wkfapp_v2.ctorParameters = () => [
29786
29810
  { type: MatDialog },
29787
29811
  { type: WkfService },
29788
29812
  { type: UtilityService },
29789
- { type: TranslateService }
29813
+ { type: TranslateService },
29814
+ { type: FileService }
29790
29815
  ];
29791
29816
 
29792
29817
  /**