@fluxhub/fluxhub-lib 10.0.598 → 10.0.599

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.
@@ -5294,6 +5294,7 @@ class wkfapp {
5294
5294
  if (!m_service.checkCredentials()) {
5295
5295
  return;
5296
5296
  }
5297
+ this.ripristina_imp();
5297
5298
  if (this.sort_field == null)
5298
5299
  this.sort_field = '';
5299
5300
  if (this.sort_field == '')
@@ -5754,6 +5755,7 @@ class wkfapp {
5754
5755
  this.app_s.user_surname_ori = null;
5755
5756
  this.app_s.user_email_ori = null;
5756
5757
  this.imp = "";
5758
+ localStorage.removeItem(this.app_s.COMPANY_KEY + '_imp_user');
5757
5759
  this.get_grid().doFill("");
5758
5760
  // browser.refresh()
5759
5761
  }
@@ -5802,8 +5804,8 @@ class wkfapp {
5802
5804
  data.result_data[0].cognome +
5803
5805
  " " +
5804
5806
  data.result_data[0].nome;
5807
+ localStorage.setItem(this.app_s.COMPANY_KEY + '_imp_user', this.m_uti.encrypt_v3(data.result_data[0]));
5805
5808
  this.get_grid().doFill("");
5806
- console.log(" this.user_idp ", this.user_idp);
5807
5809
  }
5808
5810
  });
5809
5811
  }
@@ -5811,6 +5813,28 @@ class wkfapp {
5811
5813
  }
5812
5814
  });
5813
5815
  }
5816
+ ripristina_imp() {
5817
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user') == null)
5818
+ return;
5819
+ let obj = this.m_uti.decrypt_v3(localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user'));
5820
+ this.app_s.user_name_ori = this.app_s.user_name;
5821
+ this.app_s.user_ori = this.app_s.user;
5822
+ this.app_s.user_surname_ori = this.app_s.user_surname;
5823
+ this.app_s.user_email_ori = this.app_s.user_email;
5824
+ this.app_s.user_name = obj.nome;
5825
+ this.app_s.user = obj.username;
5826
+ this.app_s.user_surname = obj.cognome;
5827
+ this.app_s.user_email = obj.email;
5828
+ this.user_idp = obj.username;
5829
+ this.user_nome = obj.nome;
5830
+ this.user_cognome = obj.cognome;
5831
+ this.user_email = obj.email;
5832
+ this.imp =
5833
+ "ANN. IMP: " +
5834
+ obj.cognome +
5835
+ " " +
5836
+ obj.nome;
5837
+ }
5814
5838
  save_state_wkf() {
5815
5839
  this.app_s.getState().wkf_obj = {};
5816
5840
  this.app_s.getState().wkf_obj.b_editing = this.b_editing;
@@ -16841,12 +16865,30 @@ class dati_aggiuntivi {
16841
16865
  this.b_apprf = false;
16842
16866
  // console.log('user_idp: '+ this.user_idp);
16843
16867
  }
16868
+ ripristina_imp() {
16869
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user') == null) {
16870
+ this.user_idp = this.app_s.user;
16871
+ this.user_nome = this.app_s.user_name;
16872
+ this.user_cognome = this.app_s.user_surname;
16873
+ this.user_email = this.app_s.user_email;
16874
+ return;
16875
+ }
16876
+ let obj = this.uti_s.decrypt_v3(localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user'));
16877
+ this.app_s.user_name_ori = this.app_s.user_name;
16878
+ this.app_s.user_ori = this.app_s.user;
16879
+ this.app_s.user_surname_ori = this.app_s.user_surname;
16880
+ this.app_s.user_email_ori = this.app_s.user_email;
16881
+ this.app_s.user_name = obj.nome;
16882
+ this.app_s.user = obj.username;
16883
+ this.app_s.user_surname = obj.cognome;
16884
+ this.app_s.user_email = obj.email;
16885
+ this.user_idp = obj.username;
16886
+ this.user_nome = obj.nome;
16887
+ this.user_cognome = obj.cognome;
16888
+ this.user_email = obj.email;
16889
+ }
16844
16890
  init_user_i() {
16845
- //console.log('init_user_i() ',this.app_s.user);
16846
- this.user_idp = this.app_s.user;
16847
- this.user_nome = this.app_s.user_name;
16848
- this.user_cognome = this.app_s.user_surname;
16849
- this.user_email = this.app_s.user_email;
16891
+ this.ripristina_imp();
16850
16892
  }
16851
16893
  save_to_app_state() {
16852
16894
  this.app_s.getState().wkf_doc_info = {};
@@ -23831,6 +23873,7 @@ class dati_aggiuntivi_v2 {
23831
23873
  this.m_fileservice = m_fileservice;
23832
23874
  this.tsr = tsr;
23833
23875
  this.m_obj = {};
23876
+ this.sort_field = "";
23834
23877
  this.in_carico = false;
23835
23878
  this.wkf_users_roles = '';
23836
23879
  this.b_rip_pulsanti = true;
@@ -23949,6 +23992,28 @@ class dati_aggiuntivi_v2 {
23949
23992
  });
23950
23993
  });
23951
23994
  }
23995
+ ripristina_imp() {
23996
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user') == null) {
23997
+ this.user_idp = this.app_s.user;
23998
+ this.user_nome = this.app_s.user_name;
23999
+ this.user_cognome = this.app_s.user_surname;
24000
+ this.user_email = this.app_s.user_email;
24001
+ return;
24002
+ }
24003
+ let obj = this.uti_s.decrypt_v3(localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user'));
24004
+ this.app_s.user_name_ori = this.app_s.user_name;
24005
+ this.app_s.user_ori = this.app_s.user;
24006
+ this.app_s.user_surname_ori = this.app_s.user_surname;
24007
+ this.app_s.user_email_ori = this.app_s.user_email;
24008
+ this.app_s.user_name = obj.nome;
24009
+ this.app_s.user = obj.username;
24010
+ this.app_s.user_surname = obj.cognome;
24011
+ this.app_s.user_email = obj.email;
24012
+ this.user_idp = obj.username;
24013
+ this.user_nome = obj.nome;
24014
+ this.user_cognome = obj.cognome;
24015
+ this.user_email = obj.email;
24016
+ }
23952
24017
  hasRole(s, b_check_admin = true) {
23953
24018
  if (this.wkf_users_roles === null)
23954
24019
  return false;
@@ -23962,10 +24027,7 @@ class dati_aggiuntivi_v2 {
23962
24027
  return false;
23963
24028
  }
23964
24029
  init_user_i() {
23965
- this.user_idp = this.app_s.user;
23966
- this.user_nome = this.app_s.user_name;
23967
- this.user_cognome = this.app_s.user_surname;
23968
- this.user_email = this.app_s.user_email;
24030
+ this.ripristina_imp();
23969
24031
  }
23970
24032
  save_to_app_state() {
23971
24033
  this.app_s.getState().wkf_doc_info = {};
@@ -28199,6 +28261,7 @@ class wkfapp_v2 {
28199
28261
  if (!m_service.checkCredentials()) {
28200
28262
  return;
28201
28263
  }
28264
+ this.ripristina_imp();
28202
28265
  if (this.sort_field == null)
28203
28266
  this.sort_field = '';
28204
28267
  if (this.sort_field == '')
@@ -28701,6 +28764,7 @@ class wkfapp_v2 {
28701
28764
  this.app_s.user_surname_ori = null;
28702
28765
  this.app_s.user_email_ori = null;
28703
28766
  this.imp = "";
28767
+ localStorage.removeItem(this.app_s.COMPANY_KEY + '_imp_user');
28704
28768
  this.get_grid().doFill("");
28705
28769
  // browser.refresh()
28706
28770
  }
@@ -28749,6 +28813,7 @@ class wkfapp_v2 {
28749
28813
  data.result_data[0].cognome +
28750
28814
  " " +
28751
28815
  data.result_data[0].nome;
28816
+ localStorage.setItem(this.app_s.COMPANY_KEY + '_imp_user', this.m_uti.encrypt_v3(data.result_data[0]));
28752
28817
  this.get_grid().doFill("");
28753
28818
  }
28754
28819
  });
@@ -28972,6 +29037,28 @@ class wkfapp_v2 {
28972
29037
  insert_doc() {
28973
29038
  this.m_router.navigate([this.app_root, this.id_applicativo, "new"]);
28974
29039
  }
29040
+ ripristina_imp() {
29041
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user') == null)
29042
+ return;
29043
+ let obj = this.m_uti.decrypt_v3(localStorage.getItem(this.app_s.COMPANY_KEY + '_imp_user'));
29044
+ this.app_s.user_name_ori = this.app_s.user_name;
29045
+ this.app_s.user_ori = this.app_s.user;
29046
+ this.app_s.user_surname_ori = this.app_s.user_surname;
29047
+ this.app_s.user_email_ori = this.app_s.user_email;
29048
+ this.app_s.user_name = obj.nome;
29049
+ this.app_s.user = obj.username;
29050
+ this.app_s.user_surname = obj.cognome;
29051
+ this.app_s.user_email = obj.email;
29052
+ this.user_idp = obj.username;
29053
+ this.user_nome = obj.nome;
29054
+ this.user_cognome = obj.cognome;
29055
+ this.user_email = obj.email;
29056
+ this.imp =
29057
+ "ANN. IMP: " +
29058
+ obj.cognome +
29059
+ " " +
29060
+ obj.nome;
29061
+ }
28975
29062
  }
28976
29063
  wkfapp_v2.decorators = [
28977
29064
  { type: Directive }