@fluxhub/fluxhub-lib 10.0.432 → 10.0.435

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.
@@ -6990,6 +6990,8 @@ class wkfapp {
6990
6990
  this.riassegna_richiesta();
6991
6991
  if (o.cmd == "sostituisci_utente")
6992
6992
  this.sostituisci_utente();
6993
+ if (o.cmd == "reclama_bozza")
6994
+ this.reclama_bozza();
6993
6995
  if (o.cmd == "annulla_imp")
6994
6996
  this.annulla_imp();
6995
6997
  if (o.cmd == "test_utente")
@@ -7024,6 +7026,49 @@ class wkfapp {
7024
7026
  }
7025
7027
  });
7026
7028
  }
7029
+ reclama_bozza() {
7030
+ if (this.get_grid().sRow == null) {
7031
+ this._toastr.error("Selezionare il documento");
7032
+ return;
7033
+ }
7034
+ let p = new QParam();
7035
+ p.sql = "SELECT_WKF_SELECT_USER_MIN";
7036
+ p.types = ["string", "string"];
7037
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
7038
+ this.m_dataService.doQuery(p).subscribe((data) => {
7039
+ let b_found = false;
7040
+ let livello = 0;
7041
+ let descri_livello = '';
7042
+ for (let i = 0; i < data.result_data.length; i++) {
7043
+ if (data.result_data[i].idp == this.app_s.user) {
7044
+ livello = data.result_data[i].livello;
7045
+ descri_livello = data.result_data[i].descri_livello;
7046
+ b_found = true;
7047
+ break;
7048
+ }
7049
+ }
7050
+ if (b_found) {
7051
+ if (livello != this.get_grid().sRow.stato) {
7052
+ this._toastr.error('Il documento non è in stato Bozza');
7053
+ return;
7054
+ }
7055
+ let p = new QParam();
7056
+ p.sql = "UPDATE_WKF_STATO_BOZZA";
7057
+ p.types = ["string", "string", "int", 'string'];
7058
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
7059
+ this.m_dataService.doQuery(p).subscribe((data) => {
7060
+ if (data != null)
7061
+ if (data.result_msg == "OK") {
7062
+ this._toastr.info('Documento aggiornato');
7063
+ this.get_grid().doFill("");
7064
+ }
7065
+ });
7066
+ }
7067
+ else {
7068
+ this._toastr.error('L\'utente non è configurato per lo step BOZZA');
7069
+ }
7070
+ });
7071
+ }
7027
7072
  recupera_richiesta() {
7028
7073
  let dialogRef = this.dialog.open(win_recupera_doc, { disableClose: true });
7029
7074
  setTimeout(() => {
@@ -7043,7 +7088,6 @@ class wkfapp {
7043
7088
  p.sql = "SELECT_USERS_BY_WKF_DOC";
7044
7089
  p.types = ["string", "string"];
7045
7090
  p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
7046
- let ok_op = false;
7047
7091
  this.m_dataService.doQuery(p).subscribe((data) => {
7048
7092
  if (data != null)
7049
7093
  if (data.result_msg == "OK") {
@@ -9372,7 +9416,7 @@ class FHGridComponent {
9372
9416
  FHGridComponent.decorators = [
9373
9417
  { type: Component, args: [{
9374
9418
  selector: "FHGrid",
9375
- template: "<div fxLayout=\"column\" fxFlexFill>\n <div\n fxLayout=\"row\"\n fxLayout.xs=\"column\"\n fxLayoutAlign=\"center start\"\n fxLayoutGap=\"3px\"\n style=\"min-height: 55px;\"\n [hidden]=\"!show_buttons\"\n >\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n <div fxLayout=\"row\" fxLayoutGap=\"3px\" fxLayoutAlign=\"start center\">\n <div>\n <h5>{{num_r}}&nbsp;{{label_elementi}}</h5>\n </div>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <input\n matInput\n [placeholder]=\"trova_label\"\n (keydown)=\"keyDownFunctioncl($event)\"\n [(ngModel)]=\"ric_libera\"\n style=\"\n width: 200px;\n border: 1px solid;\n min-height: 30px;\n \"\n />\n </div>\n\n <div\n matTooltip=\"REMOVE FILTER\"\n matTooltipPosition=\"above\"\n *ngIf=\"show_pulisci_filtri\"\n >\n <button mat-flat-button (click)=\"pulisci_filtri()\" color=\"warn\">\n <mat-icon>filter_none</mat-icon>&nbsp;\n </button>\n </div>\n <div matTooltip=\"AUTO SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"autoSizeAll()\"\n color=\"primary\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>swap_horiz</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"FIT SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"fitSizeAll()\"\n color=\"primary\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>keyboard_tab</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"Refresh\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"Refresh()\"\n color=\"primary\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>autorenew</mat-icon>\n </button>\n </div>\n <FHFilterComboBox\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (selchange)=\"ch_config()\"\n (fillend)=\"fe_cfg()\"\n #gf\n init_fill=\"false\"\n ></FHFilterComboBox>\n <div\n matTooltip=\"Modifica Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"edit_config()\">save</mat-icon>\n </button>\n </div>\n <div\n matTooltip=\"Elimina Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"elimina_config()\">delete</mat-icon>\n </button>\n </div>\n <div\n fxHide\n fxShow.gt-sm\n matTooltip=\"Crea Nuova Preferenza\"\n matTooltipPosition=\"above\"\n >\n <button\n mat-icon-button\n style=\"color: rgb(16, 98, 16);\"\n *ngIf=\"show_buttons && !pref_hidden\"\n >\n <mat-icon (click)=\"insert_config()\">library_add</mat-icon>\n </button>\n </div>\n\n <mat-slide-toggle\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (click)=\"ck_flag()\"\n #toggle_mantieni\n >\n {{mantieni_impostazioni}}\n </mat-slide-toggle>\n\n &nbsp;\n <div fxHide fxShow.gt-sm matTooltip=\"HELP\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"help_window()\"\n color=\"primary\"\n *ngIf=\"show_buttons && show_help\"\n >\n <mat-icon>help</mat-icon>\n </button>\n </div>\n &nbsp;&nbsp;&nbsp;&nbsp;\n\n <img\n *ngIf=\"enable_export && enable_export_pdf\"\n matTooltip=\"EXPORT PDF\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/pdf.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"print()\"\n alt=\"Export Excel\"\n width=\"24\" height=\"24\"\n />\n\n\n <img *ngIf=\"enable_export && enable_export_xls\"\n matTooltip=\"EXPORT EXCEL\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/xlsx.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"export_excel()\"\n alt=\"Export Excel\"\n width=\"24\" height=\"24\"\n />\n\n </div>\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"end center\"\n\n [style.width]=\"width_max\"\n *ngIf=\"enabled\"\n >\n\n <FHGridToolBar\n (command)=\"docmd($event)\"\n [type]=\"toolbar_type\"\n [show_link]=\"show_link\"\n [show_help]=\"show_help_bar\"\n [help_label]=\"help_label_bar\"\n [custom_commands]=\"toolbar_custom_commands\"\n [toolbar_wkfapp]=\"toolbar_wkfapp\"\n [elimina_label]=\"elimina_label\"\n ></FHGridToolBar>\n </div>\n </div>\n\n\n <div fxLayout=\"row\" style=\"width: 100%;\" [fxFlex]=\"show_buttons ? 100:95\">\n <ag-grid-angular\n ref-agGrid\n style=\"width: 100%; height: 100%;\"\n id=\"myGrid\"\n (cellDoubleClicked)=\"onColumnEvent($event)\"\n (cellClicked)=\"onCellClicked($event)\"\n [headerHeight]=\"header_h\"\n [groupHeaderHeight]=\"header_h\"\n class=\"ag-theme-balham\"\n [singleClickEdit]=\"true\"\n [gridOptions]=\"gridOptions\"\n [columnDefs]=\"columnDefs\"\n [rowData]=\"rowData\"\n [rowSelection]=\"selection_mode\"\n\n [getContextMenuItems]=\"enable_export ? getContextMenuItems_e:getContextMenuItems_n_e\"\n (filterModified)=\"onFilterModified()\"\n (rowDoubleClicked)=\"onRowDClicked($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n (columnVisible)=\"oncolumnEverythingChanged($event)\"\n (columnResized)=\"oncolumnEverythingChanged($event)\"\n (columnMoved)=\"oncolumnEverythingChanged($event)\"\n (cellValueChanged)=\"okr($event)\"\n (sortChanged)=\"onAfterSortChanged()\"\n [paginationPageSize]=\"num_per_pag\"\n (gridReady)=\"onReady($event)\"\n >\n </ag-grid-angular>\n </div>\n</div>\n",
9419
+ template: "<div fxLayout=\"column\" fxFlexFill>\n <div\n fxLayout=\"row\"\n fxLayout.xs=\"column\"\n fxLayoutAlign=\"center start\"\n fxLayoutGap=\"3px\"\n style=\"min-height: 55px;\"\n [hidden]=\"!show_buttons\"\n >\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n <div fxLayout=\"row\" fxLayoutGap=\"3px\" fxLayoutAlign=\"start center\">\n <div>\n <h5>{{num_r}}&nbsp;{{label_elementi}}</h5>\n </div>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <input\n matInput\n [placeholder]=\"trova_label\"\n (keydown)=\"keyDownFunctioncl($event)\"\n [(ngModel)]=\"ric_libera\"\n style=\"\n width: 200px;\n border: 1px solid;\n min-height: 30px;\n \"\n />\n </div>\n\n <div\n matTooltip=\"REMOVE FILTER\"\n matTooltipPosition=\"above\"\n *ngIf=\"show_pulisci_filtri\"\n >\n <button mat-flat-button (click)=\"pulisci_filtri()\" color=\"warn\">\n <mat-icon>filter_none</mat-icon>&nbsp;\n </button>\n </div>\n <div matTooltip=\"AUTO SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"autoSizeAll()\"\n color=\"primary\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>swap_horiz</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"FIT SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"fitSizeAll()\"\n color=\"primary\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>keyboard_tab</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"Refresh\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"Refresh()\"\n color=\"primary\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>autorenew</mat-icon>\n </button>\n </div>\n <FHFilterComboBox\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (selchange)=\"ch_config()\"\n (fillend)=\"fe_cfg()\"\n #gf\n init_fill=\"false\"\n ></FHFilterComboBox>\n <div\n matTooltip=\"Modifica Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"edit_config()\">save</mat-icon>\n </button>\n </div>\n <div\n matTooltip=\"Elimina Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"elimina_config()\">delete</mat-icon>\n </button>\n </div>\n <div\n fxHide\n fxShow.gt-sm\n matTooltip=\"Crea Nuova Preferenza\"\n matTooltipPosition=\"above\"\n >\n <button\n mat-icon-button\n style=\"color: rgb(16, 98, 16);\"\n *ngIf=\"show_buttons && !pref_hidden\"\n >\n <mat-icon (click)=\"insert_config()\">library_add</mat-icon>\n </button>\n </div>\n\n <mat-slide-toggle\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (click)=\"ck_flag()\"\n #toggle_mantieni\n >\n {{mantieni_impostazioni}}\n </mat-slide-toggle>\n\n &nbsp;\n <div fxHide fxShow.gt-sm matTooltip=\"HELP\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"help_window()\"\n color=\"primary\"\n *ngIf=\"show_buttons && show_help\"\n >\n <mat-icon>help</mat-icon>\n </button>\n </div>\n &nbsp;&nbsp;&nbsp;&nbsp;\n\n <img\n *ngIf=\"enable_export && enable_export_pdf\"\n matTooltip=\"EXPORT PDF\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/pdf.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"print()\"\n alt=\"Export Excel\"\n width=\"24\" height=\"24\"\n />\n\n\n <img *ngIf=\"enable_export && enable_export_xls\"\n matTooltip=\"EXPORT EXCEL\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/xlsx.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"export_excel()\"\n alt=\"Export Excel\"\n width=\"24\" height=\"24\"\n />\n\n </div>\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"end center\"\n\n [style.width]=\"width_max\"\n *ngIf=\"enabled\"\n >\n\n <FHGridToolBar\n (command)=\"docmd($event)\"\n [type]=\"toolbar_type\"\n [show_link]=\"show_link\"\n [show_help]=\"show_help_bar\"\n [help_label]=\"help_label_bar\"\n [custom_commands]=\"toolbar_custom_commands\"\n [toolbar_wkfapp]=\"toolbar_wkfapp\"\n [elimina_label]=\"elimina_label\"\n [sRow]=\"sRow\"\n ></FHGridToolBar>\n </div>\n </div>\n\n\n <div fxLayout=\"row\" style=\"width: 100%;\" [fxFlex]=\"show_buttons ? 100:95\">\n <ag-grid-angular\n ref-agGrid\n style=\"width: 100%; height: 100%;\"\n id=\"myGrid\"\n (cellDoubleClicked)=\"onColumnEvent($event)\"\n (cellClicked)=\"onCellClicked($event)\"\n [headerHeight]=\"header_h\"\n [groupHeaderHeight]=\"header_h\"\n class=\"ag-theme-balham\"\n [singleClickEdit]=\"true\"\n [gridOptions]=\"gridOptions\"\n [columnDefs]=\"columnDefs\"\n [rowData]=\"rowData\"\n [rowSelection]=\"selection_mode\"\n\n [getContextMenuItems]=\"enable_export ? getContextMenuItems_e:getContextMenuItems_n_e\"\n (filterModified)=\"onFilterModified()\"\n (rowDoubleClicked)=\"onRowDClicked($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n (columnVisible)=\"oncolumnEverythingChanged($event)\"\n (columnResized)=\"oncolumnEverythingChanged($event)\"\n (columnMoved)=\"oncolumnEverythingChanged($event)\"\n (cellValueChanged)=\"okr($event)\"\n (sortChanged)=\"onAfterSortChanged()\"\n [paginationPageSize]=\"num_per_pag\"\n (gridReady)=\"onReady($event)\"\n >\n </ag-grid-angular>\n </div>\n</div>\n",
9376
9420
  styles: [``]
9377
9421
  },] }
9378
9422
  ];
@@ -15659,6 +15703,7 @@ class FHGridToolBarComponent {
15659
15703
  this.type = "NONE";
15660
15704
  this.toolbar_wkfapp = null;
15661
15705
  this.custom_commands = [];
15706
+ this.sRow = null;
15662
15707
  this.command = new EventEmitter();
15663
15708
  }
15664
15709
  refresh_access(wkfx) {
@@ -15691,6 +15736,9 @@ class FHGridToolBarComponent {
15691
15736
  sostituisci_utente() {
15692
15737
  this.command.emit({ cmd: "sostituisci_utente" });
15693
15738
  }
15739
+ reclama_bozza() {
15740
+ this.command.emit({ cmd: "reclama_bozza" });
15741
+ }
15694
15742
  test_utente() {
15695
15743
  this.command.emit({ cmd: "test_utente" });
15696
15744
  }
@@ -15736,7 +15784,7 @@ FHGridToolBarComponent.decorators = [
15736
15784
  }}
15737
15785
  </button>
15738
15786
  <mat-menu #gest_menu="matMenu">
15739
- <button
15787
+ <button [hidden]="sRow==null"
15740
15788
  mat-menu-item
15741
15789
  style="background-color: #F5F5F5"
15742
15790
  (click)="annulla_richiesta()"
@@ -15750,7 +15798,7 @@ FHGridToolBarComponent.decorators = [
15750
15798
  >
15751
15799
  {{ "RECUPERA DOCUMENTO" | translate }}
15752
15800
  </button>
15753
- <button
15801
+ <button [hidden]="sRow==null"
15754
15802
  mat-menu-item
15755
15803
  style="background-color: #F5F5F5"
15756
15804
  (click)="riassegna_richiesta()"
@@ -15759,14 +15807,21 @@ FHGridToolBarComponent.decorators = [
15759
15807
  {{ "RIASSEGNA DOCUMENTO" | translate }}
15760
15808
  </button>
15761
15809
  <button
15762
- mat-menu-item
15810
+ mat-menu-item [hidden]="sRow==null"
15763
15811
  style="background-color: #F5F5F5"
15764
15812
  (click)="sostituisci_utente()"
15765
15813
  *ngIf="toolbar_wkfapp?.is_Admin"
15766
15814
  >
15767
15815
  {{ "SOSTITUISCI UTENTE" | translate }}
15768
15816
  </button>
15769
-
15817
+ <button
15818
+ mat-menu-item [hidden]="sRow==null || sRow?.stato<=10"
15819
+ style="background-color: #F5F5F5"
15820
+ (click)="reclama_bozza()"
15821
+ *ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin"
15822
+ >
15823
+ {{ "RECLAMA BOZZA" | translate }}
15824
+ </button>
15770
15825
  <button
15771
15826
  mat-menu-item
15772
15827
  style="background-color: #F5F5F5"
@@ -15857,23 +15912,30 @@ FHGridToolBarComponent.decorators = [
15857
15912
  </button>
15858
15913
  </td></tr></table>
15859
15914
  <mat-menu #gest_menu="matMenu">
15860
- <button mat-menu-item (click)="annulla_richiesta()">
15915
+ <button mat-menu-item [hidden]="sRow==null" (click)="annulla_richiesta()">
15861
15916
  {{ "ANNULLA DOCUMENTO" | translate }}
15862
15917
  </button>
15863
15918
  <button mat-menu-item (click)="recupera_richiesta()">
15864
15919
  {{ "RECUPERA DOCUMENTO" | translate }}
15865
15920
  </button>
15866
- <button mat-menu-item (click)="riassegna_richiesta()">
15921
+ <button mat-menu-item [hidden]="sRow==null" (click)="riassegna_richiesta()">
15867
15922
  {{ "RIASSEGNA DOCUMENTO" | translate }}
15868
15923
  </button>
15869
15924
  <button
15870
- mat-menu-item
15925
+ mat-menu-item [hidden]="sRow==null"
15871
15926
  (click)="sostituisci_utente()"
15872
15927
  *ngIf="toolbar_wkfapp?.is_Admin"
15873
15928
  >
15874
15929
  {{ "SOSTITUISCI UTENTE" | translate }}
15875
15930
  </button>
15876
-
15931
+ <button
15932
+ mat-menu-item [hidden]="sRow==null || sRow?.stato<=10"
15933
+ style="background-color: #F5F5F5"
15934
+ (click)="reclama_bozza()"
15935
+ *ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin"
15936
+ >
15937
+ {{ "RECLAMA BOZZA" | translate }}
15938
+ </button>
15877
15939
  <button
15878
15940
  mat-menu-item
15879
15941
  (click)="test_utente()"
@@ -16057,6 +16119,7 @@ FHGridToolBarComponent.propDecorators = {
16057
16119
  type: [{ type: Input }],
16058
16120
  toolbar_wkfapp: [{ type: Input }],
16059
16121
  custom_commands: [{ type: Input }],
16122
+ sRow: [{ type: Input }],
16060
16123
  command: [{ type: Output }]
16061
16124
  };
16062
16125
 
@@ -25488,6 +25551,8 @@ class wkfapp_v2 {
25488
25551
  this.test_utente();
25489
25552
  if (o.cmd == "insert_doc")
25490
25553
  this.insert_doc();
25554
+ if (o.cmd == "reclama_bozza")
25555
+ this.reclama_bozza();
25491
25556
  }
25492
25557
  annulla_richiesta() {
25493
25558
  if (this.get_grid().sRow == null) {
@@ -25526,6 +25591,49 @@ class wkfapp_v2 {
25526
25591
  this.get_grid().doFill("");
25527
25592
  });
25528
25593
  }
25594
+ reclama_bozza() {
25595
+ if (this.get_grid().sRow == null) {
25596
+ this._toastr.error("Selezionare il documento");
25597
+ return;
25598
+ }
25599
+ let p = new QParam();
25600
+ p.sql = "SELECT_WKF2_SELECT_USER_MIN";
25601
+ p.types = ["string", "string"];
25602
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
25603
+ this.m_dataService.doQuery(p).subscribe((data) => {
25604
+ let b_found = false;
25605
+ let livello = 0;
25606
+ let descri_livello = '';
25607
+ for (let i = 0; i < data.result_data.length; i++) {
25608
+ if (data.result_data[i].username == this.app_s.user) {
25609
+ livello = data.result_data[i].step;
25610
+ descri_livello = data.result_data[i].des_step;
25611
+ b_found = true;
25612
+ break;
25613
+ }
25614
+ }
25615
+ if (b_found) {
25616
+ if (livello != this.get_grid().sRow.stato) {
25617
+ this._toastr.error('Il documento non è in stato Bozza');
25618
+ return;
25619
+ }
25620
+ let p = new QParam();
25621
+ p.sql = "UPDATE_WKF_STATO_BOZZA";
25622
+ p.types = ["string", "string", "int", 'string'];
25623
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
25624
+ this.m_dataService.doQuery(p).subscribe((data) => {
25625
+ if (data != null)
25626
+ if (data.result_msg == "OK") {
25627
+ this._toastr.info('Documento aggiornato');
25628
+ this.get_grid().doFill("");
25629
+ }
25630
+ });
25631
+ }
25632
+ else {
25633
+ this._toastr.error('L\'utente non è configurato per lo step BOZZA');
25634
+ }
25635
+ });
25636
+ }
25529
25637
  sostituisci_utente() {
25530
25638
  if (this.get_grid().sRow == null) {
25531
25639
  this._toastr.error("Selezionare il documento");