@fluxhub/fluxhub-lib 1.0.319 → 1.0.321

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.
@@ -37,7 +37,7 @@ import { DomSanitizer } from '@angular/platform-browser';
37
37
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
38
38
  import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_FORMATS, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule, MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule, MatExpansionModule, MatStepperModule, MatDialogModule, MatNativeDateModule } from '@angular/material';
39
39
  import { ActivatedRoute, Router } from '@angular/router';
40
- import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, ViewChild, Output, EventEmitter, forwardRef, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
40
+ import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, Output, EventEmitter, forwardRef, ViewChild, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
41
41
  import { Http } from '@angular/http';
42
42
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
43
43
  import { ToastrService } from 'ngx-toastr';
@@ -5123,7 +5123,7 @@ var /**
5123
5123
  * @abstract
5124
5124
  */
5125
5125
  wkfapp = /** @class */ (function () {
5126
- function wkfapp(app_s, m_service, m_dataService, m_fservice, m_router, _toastr, dialog, m_wkf) {
5126
+ function wkfapp(app_s, m_service, m_dataService, m_fservice, m_router, _toastr, dialog, m_wkf, m_uti) {
5127
5127
  this.app_s = app_s;
5128
5128
  this.m_service = m_service;
5129
5129
  this.m_dataService = m_dataService;
@@ -5132,8 +5132,10 @@ wkfapp = /** @class */ (function () {
5132
5132
  this._toastr = _toastr;
5133
5133
  this.dialog = dialog;
5134
5134
  this.m_wkf = m_wkf;
5135
+ this.m_uti = m_uti;
5135
5136
  this.b_editing = false;
5136
5137
  this.is_Supervisor = false;
5138
+ this.is_Visor = false;
5137
5139
  this.is_Admin = false;
5138
5140
  this.is_Ins = false;
5139
5141
  this.id_applicativo = "";
@@ -5678,6 +5680,11 @@ wkfapp = /** @class */ (function () {
5678
5680
  .getState()
5679
5681
  .wkf_obj
5680
5682
  .is_Supervisor = this.is_Supervisor;
5683
+ this
5684
+ .app_s
5685
+ .getState()
5686
+ .wkf_obj
5687
+ .is_Visor = this.is_Visor;
5681
5688
  this
5682
5689
  .app_s
5683
5690
  .getState()
@@ -5761,6 +5768,11 @@ wkfapp = /** @class */ (function () {
5761
5768
  .getState()
5762
5769
  .wkf_obj
5763
5770
  .b_editing;
5771
+ this.is_Visor = this
5772
+ .app_s
5773
+ .getState()
5774
+ .wkf_obj
5775
+ .is_Visor;
5764
5776
  this.is_Supervisor = this
5765
5777
  .app_s
5766
5778
  .getState()
@@ -5950,8 +5962,32 @@ wkfapp = /** @class */ (function () {
5950
5962
  function (data) {
5951
5963
  if (data != null)
5952
5964
  if (data.result_msg == "OK") {
5953
- _this.init_grid();
5954
- _this.ok_conf_s(data.result_data);
5965
+ /** @type {?} */
5966
+ var p_3 = new QParam();
5967
+ p_3.sql = "SELECT_ROLES_VISORI";
5968
+ p_3.types = ['string'];
5969
+ p_3.values = [_this.id_applicativo];
5970
+ _this
5971
+ .m_dataService
5972
+ .doQuery(p_3)
5973
+ .subscribe((/**
5974
+ * @param {?} data
5975
+ * @return {?}
5976
+ */
5977
+ function (data) {
5978
+ if (data != null)
5979
+ if (data.result_msg == "OK") {
5980
+ _this.is_Visor = false;
5981
+ for (var i = 0; i < data.result_data.length; i++) {
5982
+ if (_this.m_uti.hasRole(data.result_data[i], false)) {
5983
+ _this.is_Visor = true;
5984
+ break;
5985
+ }
5986
+ }
5987
+ _this.init_grid();
5988
+ _this.ok_conf_s(data.result_data);
5989
+ }
5990
+ }));
5955
5991
  }
5956
5992
  }));
5957
5993
  }
@@ -15691,9 +15727,11 @@ var dati_aggiuntivi = /** @class */ (function () {
15691
15727
  /** @type {?} */
15692
15728
  var nomi_autori = "";
15693
15729
  for (var i = 0; i < this.arrUsersSelected.length; i++) {
15694
- if (this.m_danotificare != "")
15695
- this.m_danotificare = this.m_danotificare + ",";
15696
- this.m_danotificare = this.m_danotificare + this.arrUsersSelected[i].idp;
15730
+ if (this.nlevel.email_partecipanti == 1) {
15731
+ if (this.m_danotificare != "")
15732
+ this.m_danotificare = this.m_danotificare + ",";
15733
+ this.m_danotificare = this.m_danotificare + this.arrUsersSelected[i].idp;
15734
+ }
15697
15735
  if (this.m_lettori.toLowerCase().indexOf(this.arrUsersSelected[i].idp.toLowerCase()) == -1) {
15698
15736
  if (this.m_lettori != "")
15699
15737
  this.m_lettori = this.m_lettori + ",";
@@ -15762,14 +15800,14 @@ var dati_aggiuntivi = /** @class */ (function () {
15762
15800
  }
15763
15801
  /** @type {?} */
15764
15802
  var ccan = "$$";
15765
- for (var i_2 = 0; i_2 < this.livs.length; i_2++) {
15766
- if (this.livs[i_2].livello == this.clevel.livello && this.livs[i_2].idp == this.app_s.user) {
15803
+ for (var i = 0; i < this.livs.length; i++) {
15804
+ if (this.livs[i].livello == this.clevel.livello && this.livs[i].idp == this.app_s.user) {
15767
15805
  if (ccan != "$$") {
15768
15806
  ccan = "$$";
15769
15807
  break;
15770
15808
  }
15771
15809
  else
15772
- ccan = this.livs[i_2].gruppo_parallelo;
15810
+ ccan = this.livs[i].gruppo_parallelo;
15773
15811
  }
15774
15812
  }
15775
15813
  /** @type {?} */
@@ -15780,7 +15818,7 @@ var dati_aggiuntivi = /** @class */ (function () {
15780
15818
  a = new Array(this.m_autori, "", this.m_liv, this.m_statox, this.m_autori_paralleli, this.m_obj.assegnati_paralleli, this.getLvlDescri(String(this.m_liv), this.m_statox), this.getUsersList(this.m_autori, this.m_obj.assegnati_paralleli), this.user_idp, this.getTitle(), this.getDescri(), this.id_applicativo, this.id_documento, ccan);
15781
15819
  /** @type {?} */
15782
15820
  var t = new Array();
15783
- for (var i_3 = 0; i_3 < a.length; i_3++)
15821
+ for (var i = 0; i < a.length; i++)
15784
15822
  t.push('string');
15785
15823
  this.m_crea_att = 1;
15786
15824
  if (this.m_liv >= 900)
@@ -15913,11 +15951,11 @@ var dati_aggiuntivi = /** @class */ (function () {
15913
15951
  if (data.result_msg == "OK") {
15914
15952
  /** @type {?} */
15915
15953
  var lista_p = _this.user_idp;
15916
- for (var i_4 = 0; i_4 < data.result_data.length; i_4++)
15917
- if (lista_p.indexOf(data.result_data[i_4].username) == -1) {
15918
- console.log('username:', data.result_data[i_4].username);
15954
+ for (var i = 0; i < data.result_data.length; i++)
15955
+ if (lista_p.indexOf(data.result_data[i].username) == -1) {
15956
+ console.log('username:', data.result_data[i].username);
15919
15957
  lista_p += ',';
15920
- lista_p += data.result_data[i_4].username;
15958
+ lista_p += data.result_data[i].username;
15921
15959
  }
15922
15960
  console.log('lista_p ', lista_p);
15923
15961
  _this.sendEMail_ex(_this.user_idp, lista_p, _this.app_info.descrizione_breve + ", Il documento numero: " + _this.m_obj.codice + " è passato allo STEP: " + _this.nlevel.descri_livello + " " + _this.getTitle(), _this.m_statox + "<br>" + _this.getDescri() + comm_1, _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, _this.nota, true, ical_1, false);
@@ -15939,11 +15977,11 @@ var dati_aggiuntivi = /** @class */ (function () {
15939
15977
  if (data.result_msg == "OK") {
15940
15978
  /** @type {?} */
15941
15979
  var lista_p = _this.user_idp;
15942
- for (var i_5 = 0; i_5 < data.result_data.length; i_5++)
15943
- if (lista_p.indexOf(data.result_data[i_5].username) == -1) {
15944
- console.log('username:', data.result_data[i_5].username);
15980
+ for (var i = 0; i < data.result_data.length; i++)
15981
+ if (lista_p.indexOf(data.result_data[i].username) == -1) {
15982
+ console.log('username:', data.result_data[i].username);
15945
15983
  lista_p += ',';
15946
- lista_p += data.result_data[i_5].username;
15984
+ lista_p += data.result_data[i].username;
15947
15985
  }
15948
15986
  _this.sendEMail_ex(_this.user_idp, lista_p, _this.app_info.descrizione_breve + ", Il documento numero: " + _this.m_obj.codice + " è passato allo STEP: " + _this.nlevel.descri_livello + " " + _this.getTitle(), _this.m_statox + "<br>" + _this.getDescri() + comm_1, _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, _this.nota, true, ical_1, false);
15949
15987
  }
@@ -16673,10 +16711,21 @@ var dati_aggiuntivi = /** @class */ (function () {
16673
16711
  /** @type {?} */
16674
16712
  var s = "";
16675
16713
  /** @type {?} */
16714
+ var s_notif = "";
16715
+ /** @type {?} */
16716
+ var oggetto_email = "";
16717
+ /** @type {?} */
16676
16718
  var s_auto = "";
16677
16719
  /** @type {?} */
16678
16720
  var descris = "";
16679
- for (var i = 0; i < this.livs.length; i++)
16721
+ for (var i = 0; i < this.livs.length; i++) {
16722
+ if (lvlb == this.livs[i].livello && (can == "" || this.livs[i].canale)) {
16723
+ if ((this.livs[i].email_ospiti == 1 && this.livs[i].notifica == 1) || (this.nlevel.email_partecipanti == 1 && this.livs[i].notifica == 0)) {
16724
+ if (s_notif != "")
16725
+ s_notif = s_notif + ",";
16726
+ s_notif = s_notif + this.livs[i].idp;
16727
+ }
16728
+ }
16680
16729
  if (lvlb == this.livs[i].livello && this.livs[i].notifica == 0 && (can == "" || this.livs[i].canale)) {
16681
16730
  if (s != "")
16682
16731
  s = s + ',';
@@ -16685,7 +16734,11 @@ var dati_aggiuntivi = /** @class */ (function () {
16685
16734
  s_auto = s_auto + ',';
16686
16735
  s_auto = s_auto + this.livs[i].nc;
16687
16736
  descris = this.livs[i].descri_livello;
16737
+ if (this.livs[i].oggetto_email != null)
16738
+ if (this.livs[i].oggetto_email != "")
16739
+ oggetto_email = this.livs[i].oggetto_email;
16688
16740
  }
16741
+ }
16689
16742
  if (s == "") {
16690
16743
  return "NESSUN UTENTE CONFIGURATO STEP: " + lvlb + " CANALE: " + can;
16691
16744
  }
@@ -16768,8 +16821,24 @@ var dati_aggiuntivi = /** @class */ (function () {
16768
16821
  function (err) {
16769
16822
  _this.alert("ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI", 1);
16770
16823
  }));
16771
- if (b_send_email) {
16772
- 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, "");
16824
+ if (b_send_email && s_notif != "") {
16825
+ /** @type {?} */
16826
+ var s_ogg = oggetto_email;
16827
+ for (var prop in this.m_obj)
16828
+ if (this.m_obj[prop] != null) {
16829
+ console.log(prop + " " + Object.prototype.toString.call(this.m_obj[prop]));
16830
+ if (Object.prototype.toString.call(this.m_obj[prop]) === '[object Date]') {
16831
+ s_ogg = s_ogg.split('%' + prop + '%').join(this.uti_s.date2String(this.m_obj[prop]));
16832
+ }
16833
+ else if (('' + this.m_obj[prop]).indexOf('T00:00:00') == -1)
16834
+ s_ogg = s_ogg.split('%' + prop + '%').join(this.m_obj[prop]);
16835
+ else
16836
+ s_ogg = s_ogg.split('%' + prop + '%').join((this.uti_s.date2String(this.uti_s.string2date(this.m_obj[prop], 2))));
16837
+ }
16838
+ if (s_ogg == "")
16839
+ 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, "");
16840
+ else
16841
+ 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, "");
16773
16842
  }
16774
16843
  else
16775
16844
  this.goto_edit_doc();