@fluxhub/fluxhub-lib 19.0.221 → 19.0.222
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.
|
@@ -32289,6 +32289,22 @@ class FHWorkflowForm {
|
|
|
32289
32289
|
step_tasks = [];
|
|
32290
32290
|
tasks_all_done = false;
|
|
32291
32291
|
b_tasks_loading = false;
|
|
32292
|
+
/**
|
|
32293
|
+
* Avanzamento innescato dalla chiusura dell'ultimo task, non da un click su Procedi.
|
|
32294
|
+
*
|
|
32295
|
+
* L'utente ha gia' confermato nel pannello delle attivita' ("questa e' l'ultima
|
|
32296
|
+
* attivita' obbligatoria: vuoi procedere?"), quindi il dialog "Conferma Avanzamento"
|
|
32297
|
+
* del motore sarebbe una seconda domanda sulla stessa cosa: lo saltiamo, come se
|
|
32298
|
+
* l'utente avesse premuto OK. Consumato (rimesso a false) al primo uso.
|
|
32299
|
+
*/
|
|
32300
|
+
auto_advance = false;
|
|
32301
|
+
/**
|
|
32302
|
+
* L'utente ha appena chiuso un task dal pannello (dove ha gia' confermato). Distingue
|
|
32303
|
+
* l'avanzamento "appena confermato" da quello di RECUPERO che scatta riaprendo un
|
|
32304
|
+
* documento rimasto fermo con tutti i task chiusi: li' nessuno ha confermato nulla, e
|
|
32305
|
+
* il dialog del motore va mostrato.
|
|
32306
|
+
*/
|
|
32307
|
+
advance_confirmed = false;
|
|
32292
32308
|
/**
|
|
32293
32309
|
* Validazione applicativa alla chiusura di un task.
|
|
32294
32310
|
* La libreria non conosce i campi della pratica: il componente concreto fa
|
|
@@ -32835,6 +32851,14 @@ class FHWorkflowForm {
|
|
|
32835
32851
|
sp = sp + ';';
|
|
32836
32852
|
sp = sp + arrAutori[i].nc;
|
|
32837
32853
|
}
|
|
32854
|
+
// Avanzamento automatico: l'utente ha gia' confermato chiudendo l'ultimo task.
|
|
32855
|
+
// Facciamo cio' che farebbe l'OK del dialog, senza mostrarlo.
|
|
32856
|
+
if (this.auto_advance) {
|
|
32857
|
+
this.auto_advance = false;
|
|
32858
|
+
UtilityService.dlog('[TASK] auto_advance: salto Conferma Avanzamento, exec_wkf()');
|
|
32859
|
+
this.exec_wkf(o, this.nlevel, arrAutori, '', this.transizione_info.create_ver, arr_aut_all);
|
|
32860
|
+
return;
|
|
32861
|
+
}
|
|
32838
32862
|
let dialogRef = this.m_dialog.open(win_conferma_v2, {
|
|
32839
32863
|
disableClose: true,
|
|
32840
32864
|
width: '500px',
|
|
@@ -32879,6 +32903,17 @@ class FHWorkflowForm {
|
|
|
32879
32903
|
this.app_s.getState().wkf_doc_info.utenti = sp;
|
|
32880
32904
|
this.app_s.getState().wkf_doc_info.comm_notrequired = this.transizione_info.comments_opt;
|
|
32881
32905
|
|
|
32906
|
+
// Vedi sopra: con l'avanzamento automatico l'utente ha gia' confermato.
|
|
32907
|
+
if (this.auto_advance) {
|
|
32908
|
+
this.auto_advance = false;
|
|
32909
|
+
this.app_s.temp_var4 = '';
|
|
32910
|
+
UtilityService.dlog('[TASK] auto_advance: salto Conferma Avanzamento, OKCOM()');
|
|
32911
|
+
this.arrUsersSelected = arrAutori;
|
|
32912
|
+
this.nota = '';
|
|
32913
|
+
this.OKCOM();
|
|
32914
|
+
return;
|
|
32915
|
+
}
|
|
32916
|
+
|
|
32882
32917
|
let dialogRef = this.m_dialog.open(win_conferma_v2, {
|
|
32883
32918
|
disableClose: true,
|
|
32884
32919
|
width: '500px',
|
|
@@ -34454,19 +34489,29 @@ class FHWorkflowForm {
|
|
|
34454
34489
|
b_saving: this.b_saving,
|
|
34455
34490
|
btnprocedi: this.btnprocedi,
|
|
34456
34491
|
});
|
|
34492
|
+
// NB: non si guarda `btnprocedi`. Quel flag dice "avanzamento gia' tentato" e
|
|
34493
|
+
// viene azzerato solo da evt_salv(): se un tentativo precedente non e' arrivato
|
|
34494
|
+
// in fondo (es. dialog di scelta transizione chiuso con la X) resta true per
|
|
34495
|
+
// sempre e bloccherebbe ogni tentativo successivo -- cioe' proprio il caso che
|
|
34496
|
+
// questo avanzamento automatico deve sbloccare. Il vero "in volo" e' b_saving.
|
|
34497
|
+
// Consumato comunque: se il task chiuso non era l'ultimo, non deve restare acceso
|
|
34498
|
+
// per un avanzamento futuro (magari il recupero all'apertura).
|
|
34499
|
+
const confermato = this.advance_confirmed;
|
|
34500
|
+
this.advance_confirmed = false;
|
|
34457
34501
|
if (this.step_mode == 'T' &&
|
|
34458
34502
|
this.tasks_all_done &&
|
|
34459
34503
|
this.b_edit &&
|
|
34460
|
-
!this.b_saving
|
|
34461
|
-
|
|
34462
|
-
|
|
34504
|
+
!this.b_saving) {
|
|
34505
|
+
UtilityService.dlog('[TASK] -> avanzamento automatico', {
|
|
34506
|
+
gia_confermato_dall_utente: confermato,
|
|
34507
|
+
});
|
|
34508
|
+
this.auto_advance = confermato;
|
|
34463
34509
|
this.procedi();
|
|
34464
34510
|
}
|
|
34465
34511
|
else if (this.step_mode == 'T' && this.tasks_all_done) {
|
|
34466
34512
|
UtilityService.dlog('[TASK] tutti i task chiusi ma NON avanzo', {
|
|
34467
34513
|
b_edit: this.b_edit,
|
|
34468
34514
|
b_saving: this.b_saving,
|
|
34469
|
-
btnprocedi: this.btnprocedi,
|
|
34470
34515
|
});
|
|
34471
34516
|
}
|
|
34472
34517
|
},
|
|
@@ -34577,6 +34622,9 @@ class FHWorkflowForm {
|
|
|
34577
34622
|
UtilityService.dlog('[TASK] close_task: STOP, ck_task', errs);
|
|
34578
34623
|
return false;
|
|
34579
34624
|
}
|
|
34625
|
+
// La chiusura parte dal pannello, dove l'utente ha gia' confermato se era l'ultima
|
|
34626
|
+
// attivita' obbligatoria. Se ne segue un avanzamento, non gli si richiede conferma.
|
|
34627
|
+
this.advance_confirmed = true;
|
|
34580
34628
|
const p = new QParam();
|
|
34581
34629
|
p.sql = 'CLOSE_WKF_DOC_TASK';
|
|
34582
34630
|
p.values = [
|
|
@@ -34664,6 +34712,10 @@ class FHWorkflowForm {
|
|
|
34664
34712
|
s_uto = '';
|
|
34665
34713
|
b_respingi_button = false;
|
|
34666
34714
|
return_edit() {
|
|
34715
|
+
// Il documento e' stato caricato in modifica: nessun avanzamento e' in volo.
|
|
34716
|
+
// `btnprocedi` viene altrimenti azzerato solo da evt_salv(), quindi un procedi()
|
|
34717
|
+
// interrotto a meta' (dialog chiuso con la X) lo lascerebbe true per sempre.
|
|
34718
|
+
this.btnprocedi = false;
|
|
34667
34719
|
this.respingi_enabled = false;
|
|
34668
34720
|
this.b_respingi_button = false;
|
|
34669
34721
|
if ((this.app_info.proceed_mode || 'P') == 'R')
|