@fluxhub/fluxhub-lib 22.0.5 → 22.0.7

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.
@@ -19693,7 +19693,17 @@ class FHUploadPanelComponent {
19693
19693
  return;
19694
19694
  if (o.response == null)
19695
19695
  return;
19696
- let obj_r = JSON.parse(o.response);
19696
+ // FHUpload passa il body di HttpClient, gia' deserializzato: il JSON.parse resta solo
19697
+ // per chi emette ancora la risposta come stringa.
19698
+ let obj_r = o.response;
19699
+ if (typeof obj_r === 'string') {
19700
+ try {
19701
+ obj_r = JSON.parse(obj_r);
19702
+ }
19703
+ catch {
19704
+ return;
19705
+ }
19706
+ }
19697
19707
  if (obj_r != null)
19698
19708
  if (obj_r.msg != null)
19699
19709
  if (obj_r.msg != '') {
@@ -38999,6 +39009,14 @@ class FHWorkflowTasksPanel {
38999
39009
  * se l'applicativo esterno lo ha concluso per errore.
39000
39010
  */
39001
39011
  ext_tasks = [];
39012
+ /**
39013
+ * Righe di sola lettura da mostrare tra i task (vedi `FHTaskExtraRow`), ciascuna dopo
39014
+ * il task con il suo `after_check_key`. Passare un riferimento stabile e sostituirlo
39015
+ * (non mutarlo) quando cambiano i dati: il pannello lo confronta per riferimento.
39016
+ *
39017
+ * [ext_rows]="[{after_check_key:'50_COM_PREVENTIVA', title:'ATTESA ESITO GSE', status:'In attesa'}]"
39018
+ */
39019
+ ext_rows = [];
39002
39020
  title = 'Attività dello step';
39003
39021
  claim_label = 'PRENDI IN CARICO';
39004
39022
  release_label = 'Rilascia la presa in carico';
@@ -39021,6 +39039,8 @@ class FHWorkflowTasksPanel {
39021
39039
  // Valori pre-calcolati: MAI getter dinamici nel template (un getter che costruisce
39022
39040
  // array darebbe a *ngFor un riferimento nuovo a ogni change detection).
39023
39041
  tasks = [];
39042
+ /** Task e righe extra nell'ordine in cui si vedono (le extra hanno `_extra`). */
39043
+ rows = [];
39024
39044
  totalRequired = 0;
39025
39045
  doneRequired = 0;
39026
39046
  progressPct = 0;
@@ -39028,16 +39048,21 @@ class FHWorkflowTasksPanel {
39028
39048
  _lastTasksRef = null;
39029
39049
  /** Idem per `ext_tasks`: se cambia l'input vanno ricalcolate le indicazioni. */
39030
39050
  _lastExtRef = null;
39051
+ /** Idem per `ext_rows`. */
39052
+ _lastRowsRef = null;
39031
39053
  constructor(dialog, toastr) {
39032
39054
  this.dialog = dialog;
39033
39055
  this.toastr = toastr;
39034
39056
  }
39035
39057
  ngDoCheck() {
39036
39058
  const tasks = this.dt_agg?.step_tasks || null;
39037
- if (tasks === this._lastTasksRef && this.ext_tasks === this._lastExtRef)
39059
+ if (tasks === this._lastTasksRef &&
39060
+ this.ext_tasks === this._lastExtRef &&
39061
+ this.ext_rows === this._lastRowsRef)
39038
39062
  return; // confronto per riferimento: O(1)
39039
39063
  this._lastTasksRef = tasks;
39040
39064
  this._lastExtRef = this.ext_tasks;
39065
+ this._lastRowsRef = this.ext_rows;
39041
39066
  this.rebuild();
39042
39067
  }
39043
39068
  rebuild() {
@@ -39062,6 +39087,20 @@ class FHWorkflowTasksPanel {
39062
39087
  t._ext_icon = ext && ext.icon ? ext.icon : 'open_in_new';
39063
39088
  }
39064
39089
  this.tasks = tasks;
39090
+ // Righe extra subito dopo il loro task; senza un task corrispondente in fondo.
39091
+ const extra = (this.ext_rows || []).filter((r) => !!r);
39092
+ const rows = [];
39093
+ for (const t of tasks) {
39094
+ rows.push(t);
39095
+ for (const r of extra)
39096
+ if (r.after_check_key && t.check_key && r.after_check_key === t.check_key)
39097
+ rows.push({ ...r, _extra: true });
39098
+ }
39099
+ const keys = new Set(tasks.map((t) => t.check_key).filter(Boolean));
39100
+ for (const r of extra)
39101
+ if (!r.after_check_key || !keys.has(r.after_check_key))
39102
+ rows.push({ ...r, _extra: true });
39103
+ this.rows = rows;
39065
39104
  const req = tasks.filter((t) => t.required === 1);
39066
39105
  this.totalRequired = req.length;
39067
39106
  this.doneRequired = req.filter((t) => t.stato === 1).length;
@@ -39171,7 +39210,7 @@ class FHWorkflowTasksPanel {
39171
39210
  });
39172
39211
  }
39173
39212
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FHWorkflowTasksPanel, deps: [{ token: i1$2.MatDialog }, { token: i3$1.ToastrService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
39174
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: FHWorkflowTasksPanel, isStandalone: true, selector: "FHWorkflowTasksPanel", inputs: { dt_agg: "dt_agg", is_supervisor: "is_supervisor", ext_tasks: "ext_tasks", 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", last_task_title: "last_task_title", last_task_confirm: "last_task_confirm" }, ngImport: i0, template: `
39213
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: FHWorkflowTasksPanel, isStandalone: true, selector: "FHWorkflowTasksPanel", inputs: { dt_agg: "dt_agg", is_supervisor: "is_supervisor", ext_tasks: "ext_tasks", ext_rows: "ext_rows", 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", last_task_title: "last_task_title", last_task_confirm: "last_task_confirm" }, ngImport: i0, template: `
39175
39214
  @if (dt_agg && dt_agg.step_mode === 'T') {
39176
39215
  <div class="fh-tasks">
39177
39216
  <div class="fh-tasks-head">
@@ -39200,7 +39239,26 @@ class FHWorkflowTasksPanel {
39200
39239
  </div>
39201
39240
  }
39202
39241
  <div class="fh-lane">
39203
- @for (t of tasks; track t) {
39242
+ @for (t of rows; track t) {
39243
+ @if (t._extra) {
39244
+ <!-- Riga extra (input ext_rows): sola lettura, nessun pulsante. -->
39245
+ <div class="fh-task fh-task-extra">
39246
+ <span
39247
+ class="material-symbols-outlined fh-task-ico"
39248
+ [style.color]="t.icon_color || null"
39249
+ >{{ t.icon || 'info' }}</span
39250
+ >
39251
+ <div class="fh-task-body">
39252
+ <div class="fh-task-title">{{ t.title }}</div>
39253
+ @if (t.meta) {
39254
+ <div class="fh-task-meta">{{ t.meta }}</div>
39255
+ }
39256
+ </div>
39257
+ @if (t.status) {
39258
+ <span class="fh-task-extra-st">{{ t.status }}</span>
39259
+ }
39260
+ </div>
39261
+ } @else {
39204
39262
  <div class="fh-task" [class.fh-task-done]="t.stato === 1">
39205
39263
  <span
39206
39264
  class="material-symbols-outlined fh-task-ico"
@@ -39327,11 +39385,12 @@ class FHWorkflowTasksPanel {
39327
39385
  </button>
39328
39386
  }
39329
39387
  </div>
39388
+ }
39330
39389
  }
39331
39390
  </div>
39332
39391
  </div>
39333
39392
  }
39334
- `, 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}.fh-task-ext{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;font-size:12px;font-style:italic;color:#6b6363;border:1px dashed rgba(0,0,0,.18);border-radius:14px;padding:4px 10px;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i10$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
39393
+ `, 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}.fh-task-extra-st{flex:0 0 auto;font-size:12px;color:#6b6363;white-space:nowrap}.fh-task-ext{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;font-size:12px;font-style:italic;color:#6b6363;border:1px dashed rgba(0,0,0,.18);border-radius:14px;padding:4px 10px;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i10$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
39335
39394
  }
39336
39395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FHWorkflowTasksPanel, decorators: [{
39337
39396
  type: Component,
@@ -39370,7 +39429,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
39370
39429
  </div>
39371
39430
  }
39372
39431
  <div class="fh-lane">
39373
- @for (t of tasks; track t) {
39432
+ @for (t of rows; track t) {
39433
+ @if (t._extra) {
39434
+ <!-- Riga extra (input ext_rows): sola lettura, nessun pulsante. -->
39435
+ <div class="fh-task fh-task-extra">
39436
+ <span
39437
+ class="material-symbols-outlined fh-task-ico"
39438
+ [style.color]="t.icon_color || null"
39439
+ >{{ t.icon || 'info' }}</span
39440
+ >
39441
+ <div class="fh-task-body">
39442
+ <div class="fh-task-title">{{ t.title }}</div>
39443
+ @if (t.meta) {
39444
+ <div class="fh-task-meta">{{ t.meta }}</div>
39445
+ }
39446
+ </div>
39447
+ @if (t.status) {
39448
+ <span class="fh-task-extra-st">{{ t.status }}</span>
39449
+ }
39450
+ </div>
39451
+ } @else {
39374
39452
  <div class="fh-task" [class.fh-task-done]="t.stato === 1">
39375
39453
  <span
39376
39454
  class="material-symbols-outlined fh-task-ico"
@@ -39497,11 +39575,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
39497
39575
  </button>
39498
39576
  }
39499
39577
  </div>
39578
+ }
39500
39579
  }
39501
39580
  </div>
39502
39581
  </div>
39503
39582
  }
39504
- `, changeDetection: ChangeDetectionStrategy.Eager, 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}.fh-task-ext{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;font-size:12px;font-style:italic;color:#6b6363;border:1px dashed rgba(0,0,0,.18);border-radius:14px;padding:4px 10px;white-space:nowrap}\n"] }]
39583
+ `, changeDetection: ChangeDetectionStrategy.Eager, 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}.fh-task-extra-st{flex:0 0 auto;font-size:12px;color:#6b6363;white-space:nowrap}.fh-task-ext{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;font-size:12px;font-style:italic;color:#6b6363;border:1px dashed rgba(0,0,0,.18);border-radius:14px;padding:4px 10px;white-space:nowrap}\n"] }]
39505
39584
  }], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: i3$1.ToastrService, decorators: [{
39506
39585
  type: Optional
39507
39586
  }] }], propDecorators: { dt_agg: [{
@@ -39510,6 +39589,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
39510
39589
  type: Input
39511
39590
  }], ext_tasks: [{
39512
39591
  type: Input
39592
+ }], ext_rows: [{
39593
+ type: Input
39513
39594
  }], title: [{
39514
39595
  type: Input
39515
39596
  }], claim_label: [{