@fluxhub/fluxhub-lib 19.0.203 → 19.0.204

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.
@@ -27452,6 +27452,7 @@ class win_recupera_doc_v2 {
27452
27452
  datagrid;
27453
27453
  title = "RECUPERA DOCUMENTO";
27454
27454
  buttons = [];
27455
+ row_selected = false;
27455
27456
  constructor(dialogRef, m_appService, toastr, _dataService, _tsr) {
27456
27457
  this.dialogRef = dialogRef;
27457
27458
  this.m_appService = m_appService;
@@ -27463,17 +27464,34 @@ class win_recupera_doc_v2 {
27463
27464
  updateButtons() {
27464
27465
  this.buttons = [
27465
27466
  {
27466
- text: 'CHIUDI',
27467
+ text: 'RECUPERA',
27467
27468
  type: 'flat',
27468
27469
  color: 'primary',
27470
+ returnValue: 'recupera',
27471
+ minWidth: 110,
27472
+ disabled: !this.row_selected
27473
+ },
27474
+ {
27475
+ text: 'CHIUDI',
27476
+ type: 'stroked',
27477
+ color: 'warn',
27469
27478
  returnValue: 'close',
27470
27479
  minWidth: 110
27471
27480
  }
27472
27481
  ];
27473
27482
  }
27483
+ onRowSelected() {
27484
+ this.row_selected = !!this.datagrid?.sRow;
27485
+ this.updateButtons();
27486
+ }
27474
27487
  onBeforeClose(event) {
27475
27488
  event.preventDefault();
27476
- this.close();
27489
+ if (event.returnValue === 'recupera') {
27490
+ this.edit(this.datagrid?.sRow);
27491
+ }
27492
+ else {
27493
+ this.close();
27494
+ }
27477
27495
  }
27478
27496
  close() {
27479
27497
  this.dialogRef.close(null);
@@ -27544,6 +27562,7 @@ class win_recupera_doc_v2 {
27544
27562
  vis
27545
27563
  #dtm
27546
27564
  (dclicked)="edit($event)"
27565
+ (clicked)="onRowSelected()"
27547
27566
  g_width="100%"
27548
27567
  g_height="100%"
27549
27568
  grid_config_key="WKF_DOCUMENTS_RECOVERY"
@@ -27588,6 +27607,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
27588
27607
  vis
27589
27608
  #dtm
27590
27609
  (dclicked)="edit($event)"
27610
+ (clicked)="onRowSelected()"
27591
27611
  g_width="100%"
27592
27612
  g_height="100%"
27593
27613
  grid_config_key="WKF_DOCUMENTS_RECOVERY"