@fluxhub/fluxhub-lib 11.0.15 → 11.0.16

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.
@@ -24829,9 +24829,8 @@ class dati_aggiuntivi_v2 {
24829
24829
  return;
24830
24830
  }
24831
24831
  console.log(' o.pre_assegna_req ', o.pre_assegna_req);
24832
- if (this.transizione_info.manual_assignment == 1 || o.pre_assegna_man == 1 || o.pre_assegna_req == 1) {
24832
+ if (this.transizione_info.manual_assignment == 1 || o.pre_assegna_man == 1) {
24833
24833
  let att_autor = [];
24834
- //console.log('this.m_obj.creatore ',this.m_obj.creatore);
24835
24834
  if (this.m_obj.creatore != null)
24836
24835
  if (this.m_obj.creatore != "")
24837
24836
  arrAutori.map((v) => {
@@ -24884,12 +24883,34 @@ class dati_aggiuntivi_v2 {
24884
24883
  let arr_aut = [];
24885
24884
  let arr_aut_all = JSON.parse(JSON.stringify(arrAutori));
24886
24885
  let b_f = false;
24886
+ if (o.pre_assegna_req == 1) {
24887
+ let att_autor = [];
24888
+ if (this.m_obj.creatore != null)
24889
+ if (this.m_obj.creatore != "")
24890
+ arrAutori.map((v) => {
24891
+ // console.log('v ',v);
24892
+ if (v.username == this.m_obj.creatore) {
24893
+ att_autor.push(v);
24894
+ }
24895
+ });
24896
+ att_autor = att_autor.sort((n1, n2) => {
24897
+ if (n1.nc > n2.nc) {
24898
+ return 1;
24899
+ }
24900
+ if (n1.nc < n2.nc) {
24901
+ return -1;
24902
+ }
24903
+ return 0;
24904
+ });
24905
+ if (att_autor.length > 0) {
24906
+ arrAutori = JSON.parse(JSON.stringify(att_autor));
24907
+ }
24908
+ }
24887
24909
  arrAutori.map((v) => {
24888
24910
  if (v.default_value != null)
24889
24911
  if (v.default_value == 1)
24890
24912
  b_f = true;
24891
24913
  });
24892
- console.log("b_f ", b_f);
24893
24914
  if (b_f) {
24894
24915
  arrAutori.map((v) => {
24895
24916
  if (v.default_value != null)
@@ -24898,7 +24919,6 @@ class dati_aggiuntivi_v2 {
24898
24919
  });
24899
24920
  arrAutori = JSON.parse(JSON.stringify(arr_aut));
24900
24921
  }
24901
- console.log("arrAutori ", arrAutori); //qui6
24902
24922
  for (let i = 0; i < arrAutori.length; i++)
24903
24923
  if (arrAutori[i].nc != null)
24904
24924
  if (sp.indexOf(arrAutori[i].nc) == -1) {