@fluxhub/fluxhub-lib 19.0.215 → 19.0.216
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.
|
@@ -34347,8 +34347,10 @@ class FHWorkflowForm {
|
|
|
34347
34347
|
// ---------------------------------------------------------------------------
|
|
34348
34348
|
/**
|
|
34349
34349
|
* Carica i task dello step corrente con il loro stato sul documento.
|
|
34350
|
-
* `can_close` e `locked` sono calcolati lato SQL
|
|
34351
|
-
*
|
|
34350
|
+
* `can_close` e `locked` sono calcolati lato SQL: il primo dai ruoli/variabili
|
|
34351
|
+
* speciali dell'utente, il secondo dal task da cui questo dipende (`depends_on`)
|
|
34352
|
+
* quando non e' ancora chiuso. Le catene si propagano da sole: un padre bloccato
|
|
34353
|
+
* non e' chiuso, quindi il figlio resta bloccato.
|
|
34352
34354
|
*/
|
|
34353
34355
|
load_step_tasks(after) {
|
|
34354
34356
|
if (!this.id_documento || this.m_obj == null)
|
|
@@ -34371,7 +34373,6 @@ class FHWorkflowForm {
|
|
|
34371
34373
|
this.step_tasks = (data.result_data || []).map((t) => ({
|
|
34372
34374
|
...t,
|
|
34373
34375
|
stato: Number(t.stato || 0),
|
|
34374
|
-
wave: Number(t.wave || 1),
|
|
34375
34376
|
required: Number(t.required || 0),
|
|
34376
34377
|
note_required: Number(t.note_required || 0),
|
|
34377
34378
|
can_close: Number(t.can_close || 0) > 0,
|
|
@@ -35438,9 +35439,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35438
35439
|
*
|
|
35439
35440
|
* <FHWorkflowTasksPanel [dt_agg]="this"></FHWorkflowTasksPanel>
|
|
35440
35441
|
*
|
|
35441
|
-
*
|
|
35442
|
-
*
|
|
35443
|
-
*
|
|
35442
|
+
* Un task senza `depends_on` e' eseguibile subito. Un task che dipende da un altro
|
|
35443
|
+
* resta bloccato (lucchetto) finche' quello non e' chiuso; le catene si propagano
|
|
35444
|
+
* da sole, perche' un padre bloccato non e' chiuso.
|
|
35444
35445
|
*
|
|
35445
35446
|
* Non e' una FHGrid: sono pochi record, servono pulsanti per riga e nessuna
|
|
35446
35447
|
* paginazione.
|
|
@@ -35465,13 +35466,13 @@ class FHWorkflowTasksPanel {
|
|
|
35465
35466
|
closed_by_label = 'chiuso da';
|
|
35466
35467
|
empty_label = 'Nessuna attività configurata per questo step.';
|
|
35467
35468
|
no_role_label = 'Non hai un ruolo abilitato su questa attività.';
|
|
35468
|
-
|
|
35469
|
+
after_label = 'dopo';
|
|
35470
|
+
locked_label = 'Si sblocca al completamento di';
|
|
35469
35471
|
reopen_confirm = 'Vuoi riaprire questa attività?';
|
|
35470
35472
|
note_label = 'Nota di chiusura';
|
|
35471
|
-
// Valori pre-calcolati: MAI getter dinamici nel template
|
|
35472
|
-
// array
|
|
35473
|
-
|
|
35474
|
-
lanes = [];
|
|
35473
|
+
// Valori pre-calcolati: MAI getter dinamici nel template (un getter che costruisce
|
|
35474
|
+
// array darebbe a *ngFor un riferimento nuovo a ogni change detection).
|
|
35475
|
+
tasks = [];
|
|
35475
35476
|
totalRequired = 0;
|
|
35476
35477
|
doneRequired = 0;
|
|
35477
35478
|
progressPct = 0;
|
|
@@ -35490,24 +35491,18 @@ class FHWorkflowTasksPanel {
|
|
|
35490
35491
|
}
|
|
35491
35492
|
rebuild() {
|
|
35492
35493
|
const tasks = this.dt_agg?.step_tasks || [];
|
|
35493
|
-
// Raggruppa per corsia preservando l'ordine restituito dalla query
|
|
35494
|
-
// (lane, wave, ord, title).
|
|
35495
|
-
const out = [];
|
|
35496
|
-
const idx = {};
|
|
35497
35494
|
for (const t of tasks) {
|
|
35498
35495
|
// Campi di sola presentazione, calcolati UNA volta: niente funzioni in *ngFor.
|
|
35499
35496
|
t._icon = t.stato === 1 ? 'check_circle' : t.locked ? 'lock' : 'radio_button_unchecked';
|
|
35500
|
-
t._tooltip = t.locked
|
|
35497
|
+
t._tooltip = t.locked
|
|
35498
|
+
? this.locked_label + (t.depends_title ? ': ' + t.depends_title : '')
|
|
35499
|
+
: !t.can_close
|
|
35500
|
+
? this.no_role_label
|
|
35501
|
+
: '';
|
|
35501
35502
|
t._data_txt = this.fmtDate(t.data_chiusura);
|
|
35502
35503
|
t._presa_txt = this.fmtDate(t.data_presa);
|
|
35503
|
-
const key = t.lane || '';
|
|
35504
|
-
if (idx[key] === undefined) {
|
|
35505
|
-
idx[key] = out.length;
|
|
35506
|
-
out.push({ name: key, tasks: [] });
|
|
35507
|
-
}
|
|
35508
|
-
out[idx[key]].tasks.push(t);
|
|
35509
35504
|
}
|
|
35510
|
-
this.
|
|
35505
|
+
this.tasks = tasks;
|
|
35511
35506
|
const req = tasks.filter((t) => t.required === 1);
|
|
35512
35507
|
this.totalRequired = req.length;
|
|
35513
35508
|
this.doneRequired = req.filter((t) => t.stato === 1).length;
|
|
@@ -35586,7 +35581,7 @@ class FHWorkflowTasksPanel {
|
|
|
35586
35581
|
});
|
|
35587
35582
|
}
|
|
35588
35583
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHWorkflowTasksPanel, deps: [{ token: i1$2.MatDialog }, { token: i3$1.ToastrService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
35589
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHWorkflowTasksPanel, isStandalone: true, selector: "FHWorkflowTasksPanel", inputs: { dt_agg: "dt_agg", is_supervisor: "is_supervisor", title: "title", claim_label: "claim_label", release_label: "release_label", force_release_label: "force_release_label", in_charge_label: "in_charge_label", in_charge_you_label: "in_charge_you_label", claim_lost_label: "claim_lost_label", close_label: "close_label", reopen_label: "reopen_label", optional_label: "optional_label", closed_by_label: "closed_by_label", empty_label: "empty_label", no_role_label: "no_role_label", locked_label: "locked_label", reopen_confirm: "reopen_confirm", note_label: "note_label" }, ngImport: i0, template: `
|
|
35584
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHWorkflowTasksPanel, isStandalone: true, selector: "FHWorkflowTasksPanel", inputs: { dt_agg: "dt_agg", is_supervisor: "is_supervisor", title: "title", claim_label: "claim_label", release_label: "release_label", force_release_label: "force_release_label", in_charge_label: "in_charge_label", in_charge_you_label: "in_charge_you_label", claim_lost_label: "claim_lost_label", close_label: "close_label", reopen_label: "reopen_label", optional_label: "optional_label", closed_by_label: "closed_by_label", empty_label: "empty_label", no_role_label: "no_role_label", after_label: "after_label", locked_label: "locked_label", reopen_confirm: "reopen_confirm", note_label: "note_label" }, ngImport: i0, template: `
|
|
35590
35585
|
<div class="fh-tasks" *ngIf="dt_agg && dt_agg.step_mode === 'T'">
|
|
35591
35586
|
<div class="fh-tasks-head">
|
|
35592
35587
|
<span class="material-symbols-outlined">checklist</span>
|
|
@@ -35602,14 +35597,12 @@ class FHWorkflowTasksPanel {
|
|
|
35602
35597
|
<mat-spinner *ngIf="dt_agg.b_tasks_loading" diameter="18"></mat-spinner>
|
|
35603
35598
|
</div>
|
|
35604
35599
|
|
|
35605
|
-
<div class="fh-tasks-empty" *ngIf="!dt_agg.b_tasks_loading &&
|
|
35600
|
+
<div class="fh-tasks-empty" *ngIf="!dt_agg.b_tasks_loading && tasks.length === 0">
|
|
35606
35601
|
{{ empty_label | translate }}
|
|
35607
35602
|
</div>
|
|
35608
35603
|
|
|
35609
|
-
<div class="fh-lane"
|
|
35610
|
-
<div class="fh-
|
|
35611
|
-
|
|
35612
|
-
<div class="fh-task" *ngFor="let t of lane.tasks" [class.fh-task-done]="t.stato === 1">
|
|
35604
|
+
<div class="fh-lane">
|
|
35605
|
+
<div class="fh-task" *ngFor="let t of tasks" [class.fh-task-done]="t.stato === 1">
|
|
35613
35606
|
<span
|
|
35614
35607
|
class="material-symbols-outlined fh-task-ico"
|
|
35615
35608
|
[class.done]="t.stato === 1"
|
|
@@ -35625,6 +35618,11 @@ class FHWorkflowTasksPanel {
|
|
|
35625
35618
|
</div>
|
|
35626
35619
|
<div class="fh-task-meta">
|
|
35627
35620
|
<span *ngIf="t.ruoli">{{ t.ruoli }}</span>
|
|
35621
|
+
<span class="fh-task-dep" *ngIf="t.stato !== 1 && t.depends_title">
|
|
35622
|
+
·
|
|
35623
|
+
<span class="material-symbols-outlined fh-lock-ico">arrow_right_alt</span>
|
|
35624
|
+
{{ after_label }} {{ t.depends_title }}
|
|
35625
|
+
</span>
|
|
35628
35626
|
<span *ngIf="t.stato === 1 && t.chiuso_da">
|
|
35629
35627
|
· {{ closed_by_label | translate }} {{ t.chiuso_da }}
|
|
35630
35628
|
<ng-container *ngIf="t._data_txt">
|
|
@@ -35695,7 +35693,7 @@ class FHWorkflowTasksPanel {
|
|
|
35695
35693
|
</div>
|
|
35696
35694
|
</div>
|
|
35697
35695
|
</div>
|
|
35698
|
-
`, isInline: true, styles: [".fh-tasks{border:1px solid rgba(0,0,0,.12);border-radius:8px;padding:10px 14px 6px;margin:8px 0;background:#fff}.fh-tasks-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.fh-tasks-title{font-weight:600}.fh-tasks-progress{font-size:12px;color:#6b6363;margin-left:auto}.fh-tasks-bar{width:120px;height:6px;border-radius:4px;background:#00000014;overflow:hidden}.fh-tasks-bar-fill{height:100%;background:#4caf50;transition:width .2s ease}.fh-tasks-empty{color:#6b6363;font-size:13px;padding:6px 0 10px}.fh-lane{margin-bottom:6px}.fh-
|
|
35696
|
+
`, isInline: true, styles: [".fh-tasks{border:1px solid rgba(0,0,0,.12);border-radius:8px;padding:10px 14px 6px;margin:8px 0;background:#fff}.fh-tasks-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.fh-tasks-title{font-weight:600}.fh-tasks-progress{font-size:12px;color:#6b6363;margin-left:auto}.fh-tasks-bar{width:120px;height:6px;border-radius:4px;background:#00000014;overflow:hidden}.fh-tasks-bar-fill{height:100%;background:#4caf50;transition:width .2s ease}.fh-tasks-empty{color:#6b6363;font-size:13px;padding:6px 0 10px}.fh-lane{margin-bottom:6px}.fh-task-dep{color:#6b6363;font-style:italic}.fh-task{display:flex;align-items:center;gap:10px;padding:6px 4px;border-top:1px solid rgba(0,0,0,.06)}.fh-task-done .fh-task-title{text-decoration:line-through;color:#6b6363}.fh-task-ico{color:#b0bec5}.fh-task-ico.done{color:#4caf50}.fh-task-ico.locked{color:#90a4ae}.fh-task-body{flex:1 1 auto;min-width:0}.fh-task-title{font-size:14px}.fh-task-opt{font-size:10px;font-weight:600;color:#6b6363;border:1px solid rgba(0,0,0,.18);border-radius:10px;padding:0 6px;margin-left:6px}.fh-task-meta{font-size:11px;color:#6b6363}.fh-task-lock{color:#e65100;font-weight:600}.fh-lock-ico{font-size:13px;vertical-align:text-bottom}.fh-task-note{font-size:12px;color:#455a64;font-style:italic;margin-top:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i9$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
35699
35697
|
}
|
|
35700
35698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHWorkflowTasksPanel, decorators: [{
|
|
35701
35699
|
type: Component,
|
|
@@ -35722,14 +35720,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35722
35720
|
<mat-spinner *ngIf="dt_agg.b_tasks_loading" diameter="18"></mat-spinner>
|
|
35723
35721
|
</div>
|
|
35724
35722
|
|
|
35725
|
-
<div class="fh-tasks-empty" *ngIf="!dt_agg.b_tasks_loading &&
|
|
35723
|
+
<div class="fh-tasks-empty" *ngIf="!dt_agg.b_tasks_loading && tasks.length === 0">
|
|
35726
35724
|
{{ empty_label | translate }}
|
|
35727
35725
|
</div>
|
|
35728
35726
|
|
|
35729
|
-
<div class="fh-lane"
|
|
35730
|
-
<div class="fh-
|
|
35731
|
-
|
|
35732
|
-
<div class="fh-task" *ngFor="let t of lane.tasks" [class.fh-task-done]="t.stato === 1">
|
|
35727
|
+
<div class="fh-lane">
|
|
35728
|
+
<div class="fh-task" *ngFor="let t of tasks" [class.fh-task-done]="t.stato === 1">
|
|
35733
35729
|
<span
|
|
35734
35730
|
class="material-symbols-outlined fh-task-ico"
|
|
35735
35731
|
[class.done]="t.stato === 1"
|
|
@@ -35745,6 +35741,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35745
35741
|
</div>
|
|
35746
35742
|
<div class="fh-task-meta">
|
|
35747
35743
|
<span *ngIf="t.ruoli">{{ t.ruoli }}</span>
|
|
35744
|
+
<span class="fh-task-dep" *ngIf="t.stato !== 1 && t.depends_title">
|
|
35745
|
+
·
|
|
35746
|
+
<span class="material-symbols-outlined fh-lock-ico">arrow_right_alt</span>
|
|
35747
|
+
{{ after_label }} {{ t.depends_title }}
|
|
35748
|
+
</span>
|
|
35748
35749
|
<span *ngIf="t.stato === 1 && t.chiuso_da">
|
|
35749
35750
|
· {{ closed_by_label | translate }} {{ t.chiuso_da }}
|
|
35750
35751
|
<ng-container *ngIf="t._data_txt">
|
|
@@ -35815,7 +35816,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35815
35816
|
</div>
|
|
35816
35817
|
</div>
|
|
35817
35818
|
</div>
|
|
35818
|
-
`, styles: [".fh-tasks{border:1px solid rgba(0,0,0,.12);border-radius:8px;padding:10px 14px 6px;margin:8px 0;background:#fff}.fh-tasks-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.fh-tasks-title{font-weight:600}.fh-tasks-progress{font-size:12px;color:#6b6363;margin-left:auto}.fh-tasks-bar{width:120px;height:6px;border-radius:4px;background:#00000014;overflow:hidden}.fh-tasks-bar-fill{height:100%;background:#4caf50;transition:width .2s ease}.fh-tasks-empty{color:#6b6363;font-size:13px;padding:6px 0 10px}.fh-lane{margin-bottom:6px}.fh-
|
|
35819
|
+
`, styles: [".fh-tasks{border:1px solid rgba(0,0,0,.12);border-radius:8px;padding:10px 14px 6px;margin:8px 0;background:#fff}.fh-tasks-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.fh-tasks-title{font-weight:600}.fh-tasks-progress{font-size:12px;color:#6b6363;margin-left:auto}.fh-tasks-bar{width:120px;height:6px;border-radius:4px;background:#00000014;overflow:hidden}.fh-tasks-bar-fill{height:100%;background:#4caf50;transition:width .2s ease}.fh-tasks-empty{color:#6b6363;font-size:13px;padding:6px 0 10px}.fh-lane{margin-bottom:6px}.fh-task-dep{color:#6b6363;font-style:italic}.fh-task{display:flex;align-items:center;gap:10px;padding:6px 4px;border-top:1px solid rgba(0,0,0,.06)}.fh-task-done .fh-task-title{text-decoration:line-through;color:#6b6363}.fh-task-ico{color:#b0bec5}.fh-task-ico.done{color:#4caf50}.fh-task-ico.locked{color:#90a4ae}.fh-task-body{flex:1 1 auto;min-width:0}.fh-task-title{font-size:14px}.fh-task-opt{font-size:10px;font-weight:600;color:#6b6363;border:1px solid rgba(0,0,0,.18);border-radius:10px;padding:0 6px;margin-left:6px}.fh-task-meta{font-size:11px;color:#6b6363}.fh-task-lock{color:#e65100;font-weight:600}.fh-lock-ico{font-size:13px;vertical-align:text-bottom}.fh-task-note{font-size:12px;color:#455a64;font-style:italic;margin-top:2px}\n"] }]
|
|
35819
35820
|
}], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: i3$1.ToastrService, decorators: [{
|
|
35820
35821
|
type: Optional
|
|
35821
35822
|
}] }], propDecorators: { dt_agg: [{
|
|
@@ -35848,6 +35849,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35848
35849
|
type: Input
|
|
35849
35850
|
}], no_role_label: [{
|
|
35850
35851
|
type: Input
|
|
35852
|
+
}], after_label: [{
|
|
35853
|
+
type: Input
|
|
35851
35854
|
}], locked_label: [{
|
|
35852
35855
|
type: Input
|
|
35853
35856
|
}], reopen_confirm: [{
|