@fluxhub/fluxhub-lib 1.0.318 → 1.0.320

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.
@@ -14991,10 +14991,12 @@ class dati_aggiuntivi {
14991
14991
  this.m_autori = "";
14992
14992
  /** @type {?} */
14993
14993
  let nomi_autori = "";
14994
- for (var i = 0; i < this.arrUsersSelected.length; i++) {
14995
- if (this.m_danotificare != "")
14996
- this.m_danotificare = this.m_danotificare + ",";
14997
- this.m_danotificare = this.m_danotificare + this.arrUsersSelected[i].idp;
14994
+ for (let i = 0; i < this.arrUsersSelected.length; i++) {
14995
+ if (this.nlevel.email_partecipanti == 1) {
14996
+ if (this.m_danotificare != "")
14997
+ this.m_danotificare = this.m_danotificare + ",";
14998
+ this.m_danotificare = this.m_danotificare + this.arrUsersSelected[i].idp;
14999
+ }
14998
15000
  if (this.m_lettori.toLowerCase().indexOf(this.arrUsersSelected[i].idp.toLowerCase()) == -1) {
14999
15001
  if (this.m_lettori != "")
15000
15002
  this.m_lettori = this.m_lettori + ",";
@@ -15023,7 +15025,7 @@ class dati_aggiuntivi {
15023
15025
  else
15024
15026
  this.insert_wkf_variabile(this.id_applicativo, this.id_documento, "REQUESTER", this.m_obj.creatore);
15025
15027
  }
15026
- for (var i = 0; i < this.livs.length; i++)
15028
+ for (let i = 0; i < this.livs.length; i++)
15027
15029
  if (this.livs[i].livello == this.m_liv && this.livs[i].notifica == 1) {
15028
15030
  if (this.livs[i].email_ospiti == 1) {
15029
15031
  if (this.m_danotificare != "")
@@ -15854,10 +15856,21 @@ class dati_aggiuntivi {
15854
15856
  /** @type {?} */
15855
15857
  let s = "";
15856
15858
  /** @type {?} */
15859
+ let s_notif = "";
15860
+ /** @type {?} */
15861
+ let oggetto_email = "";
15862
+ /** @type {?} */
15857
15863
  let s_auto = "";
15858
15864
  /** @type {?} */
15859
15865
  let descris = "";
15860
- for (let i = 0; i < this.livs.length; i++)
15866
+ for (let i = 0; i < this.livs.length; i++) {
15867
+ if (lvlb == this.livs[i].livello && (can == "" || this.livs[i].canale)) {
15868
+ if ((this.livs[i].email_ospiti == 1 && this.livs[i].notifica == 1) || (this.nlevel.email_partecipanti == 1 && this.livs[i].notifica == 0)) {
15869
+ if (s_notif != "")
15870
+ s_notif = s_notif + ",";
15871
+ s_notif = s_notif + this.livs[i].idp;
15872
+ }
15873
+ }
15861
15874
  if (lvlb == this.livs[i].livello && this.livs[i].notifica == 0 && (can == "" || this.livs[i].canale)) {
15862
15875
  if (s != "")
15863
15876
  s = s + ',';
@@ -15866,7 +15879,11 @@ class dati_aggiuntivi {
15866
15879
  s_auto = s_auto + ',';
15867
15880
  s_auto = s_auto + this.livs[i].nc;
15868
15881
  descris = this.livs[i].descri_livello;
15882
+ if (this.livs[i].oggetto_email != null)
15883
+ if (this.livs[i].oggetto_email != "")
15884
+ oggetto_email = this.livs[i].oggetto_email;
15869
15885
  }
15886
+ }
15870
15887
  if (s == "") {
15871
15888
  return "NESSUN UTENTE CONFIGURATO STEP: " + lvlb + " CANALE: " + can;
15872
15889
  }
@@ -15949,8 +15966,24 @@ class dati_aggiuntivi {
15949
15966
  err => {
15950
15967
  this.alert("ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI", 1);
15951
15968
  }));
15952
- if (b_send_email) {
15953
- this.sendEMail_ex(this.user_idp, s, this.app_info.descrizione_breve + ", Ti è stato assegnato il documento numero: " + this.m_obj.codice + " " + this.getTitle(), "<br>Attività:" + this.getLvlDescri(String(this.m_liv), this.m_statox) + "<br>" + this.m_statox + "<br>" + this.getDescri(), this.id_applicativo, this.id_documento, this.app_s.COMPANY_SITE_ROOT + '#/' + this.app_info.modulo_swf + '/' + this.id_applicativo + "/" + this.id_documento + "/edit", this.m_obj.codice, '', true, "");
15969
+ if (b_send_email && s_notif != "") {
15970
+ /** @type {?} */
15971
+ let s_ogg = oggetto_email;
15972
+ for (let prop in this.m_obj)
15973
+ if (this.m_obj[prop] != null) {
15974
+ console.log(prop + " " + Object.prototype.toString.call(this.m_obj[prop]));
15975
+ if (Object.prototype.toString.call(this.m_obj[prop]) === '[object Date]') {
15976
+ s_ogg = s_ogg.split('%' + prop + '%').join(this.uti_s.date2String(this.m_obj[prop]));
15977
+ }
15978
+ else if (('' + this.m_obj[prop]).indexOf('T00:00:00') == -1)
15979
+ s_ogg = s_ogg.split('%' + prop + '%').join(this.m_obj[prop]);
15980
+ else
15981
+ s_ogg = s_ogg.split('%' + prop + '%').join((this.uti_s.date2String(this.uti_s.string2date(this.m_obj[prop], 2))));
15982
+ }
15983
+ if (s_ogg == "")
15984
+ this.sendEMail_ex(this.user_idp, s_notif, this.app_info.descrizione_breve + ", Ti è stato assegnato il documento numero: " + this.m_obj.codice + " " + this.getTitle(), "<br>Attività:" + this.getLvlDescri(String(this.m_liv), this.m_statox) + "<br>" + this.m_statox + "<br>" + this.getDescri(), this.id_applicativo, this.id_documento, this.app_s.COMPANY_SITE_ROOT + '#/' + this.app_info.modulo_swf + '/' + this.id_applicativo + "/" + this.id_documento + "/edit", this.m_obj.codice, '', true, "");
15985
+ else
15986
+ this.sendEMail_ex(this.user_idp, s_notif, s_ogg, "<br>Attività:" + this.getLvlDescri(String(this.m_liv), this.m_statox) + "<br>" + this.m_statox + "<br>" + this.getDescri(), this.id_applicativo, this.id_documento, this.app_s.COMPANY_SITE_ROOT + '#/' + this.app_info.modulo_swf + '/' + this.id_applicativo + "/" + this.id_documento + "/edit", this.m_obj.codice, '', true, "");
15954
15987
  }
15955
15988
  else
15956
15989
  this.goto_edit_doc();
@@ -16104,7 +16137,7 @@ class dati_aggiuntivi {
16104
16137
  }
16105
16138
  if (this.m_obj.autori == null)
16106
16139
  this.m_obj.autori = '';
16107
- if (this.m_obj.autori.toLowerCase().indexOf(this.user_idp.toLowerCase()) != -1) {
16140
+ if (("," + this.m_obj.autori.toLowerCase() + ",").indexOf("," + this.user_idp.toLowerCase() + ",") != -1) {
16108
16141
  this.edit_b(true);
16109
16142
  if (this.respingi_enabled)
16110
16143
  this.resp_b(true);