@fluxhub/fluxhub-lib 10.0.437 → 10.0.438

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.
@@ -7037,41 +7037,48 @@ class wkfapp {
7037
7037
  dialogRef.afterClosed().subscribe((result) => {
7038
7038
  if (result) {
7039
7039
  let p = new QParam();
7040
- p.sql = "SELECT_WKF_SELECT_USER_MIN";
7040
+ p.sql = "SELECT_DOCUMENTS_BY_UIID";
7041
7041
  p.types = ["string", "string"];
7042
7042
  p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
7043
7043
  this.m_dataService.doQuery(p).subscribe((data) => {
7044
- let b_found = false;
7045
- let livello = 0;
7046
- let descri_livello = '';
7047
- for (let i = 0; i < data.result_data.length; i++) {
7048
- if (data.result_data[i].idp == this.app_s.user) {
7049
- livello = data.result_data[i].livello;
7050
- descri_livello = data.result_data[i].descri_livello;
7051
- b_found = true;
7052
- break;
7044
+ let stato_doc = data.result_data[0].stato;
7045
+ p = new QParam();
7046
+ p.sql = "SELECT_WKF_SELECT_USER_MIN";
7047
+ p.types = ["string", "string"];
7048
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
7049
+ this.m_dataService.doQuery(p).subscribe((data) => {
7050
+ let b_found = false;
7051
+ let livello = 0;
7052
+ let descri_livello = '';
7053
+ for (let i = 0; i < data.result_data.length; i++) {
7054
+ if (data.result_data[i].idp == this.app_s.user) {
7055
+ livello = data.result_data[i].livello;
7056
+ descri_livello = data.result_data[i].descri_livello;
7057
+ b_found = true;
7058
+ break;
7059
+ }
7053
7060
  }
7054
- }
7055
- if (b_found) {
7056
- if (livello != this.get_grid().sRow.stato) {
7057
- this._toastr.error('Il documento non è in stato Bozza');
7058
- return;
7061
+ if (b_found) {
7062
+ if (livello != stato_doc) {
7063
+ this._toastr.error('Il documento non è in stato Bozza');
7064
+ return;
7065
+ }
7066
+ let p = new QParam();
7067
+ p.sql = "UPDATE_WKF_STATO_BOZZA";
7068
+ p.types = ["string", "string", "int", 'string'];
7069
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
7070
+ this.m_dataService.doQuery(p).subscribe((data) => {
7071
+ if (data != null)
7072
+ if (data.result_msg == "OK") {
7073
+ this._toastr.info('Documento aggiornato');
7074
+ this.get_grid().doFill("");
7075
+ }
7076
+ });
7059
7077
  }
7060
- let p = new QParam();
7061
- p.sql = "UPDATE_WKF_STATO_BOZZA";
7062
- p.types = ["string", "string", "int", 'string'];
7063
- p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
7064
- this.m_dataService.doQuery(p).subscribe((data) => {
7065
- if (data != null)
7066
- if (data.result_msg == "OK") {
7067
- this._toastr.info('Documento aggiornato');
7068
- this.get_grid().doFill("");
7069
- }
7070
- });
7071
- }
7072
- else {
7073
- this._toastr.error('L\'utente non è configurato per lo step BOZZA');
7074
- }
7078
+ else {
7079
+ this._toastr.error('L\'utente non è configurato per lo step BOZZA');
7080
+ }
7081
+ });
7075
7082
  });
7076
7083
  }
7077
7084
  });
@@ -15761,7 +15768,7 @@ FHGridToolBarComponent.decorators = [
15761
15768
  { type: Component, args: [{
15762
15769
  selector: "FHGridToolBar",
15763
15770
  template: `
15764
- SROW: {{sRow | json}}
15771
+
15765
15772
  <div
15766
15773
  *ngIf="type == 'WKF_NO_EDIT'"
15767
15774
  fxLayoutGap="3px"
@@ -15821,7 +15828,7 @@ FHGridToolBarComponent.decorators = [
15821
15828
  {{ "SOSTITUISCI UTENTE" | translate }}
15822
15829
  </button>
15823
15830
  <button
15824
- mat-menu-item [hidden]="sRow==null || sRow?.stato<=10"
15831
+ mat-menu-item [hidden]="sRow==null"
15825
15832
  style="background-color: #F5F5F5"
15826
15833
  (click)="reclama_bozza()"
15827
15834
  *ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin"
@@ -15935,7 +15942,7 @@ FHGridToolBarComponent.decorators = [
15935
15942
  {{ "SOSTITUISCI UTENTE" | translate }}
15936
15943
  </button>
15937
15944
  <button
15938
- mat-menu-item [hidden]="sRow==null || sRow?.stato<=10"
15945
+ mat-menu-item [hidden]="sRow==null"
15939
15946
  style="background-color: #F5F5F5"
15940
15947
  (click)="reclama_bozza()"
15941
15948
  *ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin"
@@ -25608,41 +25615,49 @@ class wkfapp_v2 {
25608
25615
  dialogRef.afterClosed().subscribe((result) => {
25609
25616
  if (result) {
25610
25617
  let p = new QParam();
25611
- p.sql = "SELECT_WKF2_SELECT_USER_MIN";
25618
+ p.sql = "SELECT_DOCUMENTS_BY_UIID";
25612
25619
  p.types = ["string", "string"];
25613
25620
  p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
25614
25621
  this.m_dataService.doQuery(p).subscribe((data) => {
25615
- let b_found = false;
25616
- let livello = 0;
25617
- let descri_livello = '';
25618
- for (let i = 0; i < data.result_data.length; i++) {
25619
- if (data.result_data[i].username == this.app_s.user) {
25620
- livello = data.result_data[i].step;
25621
- descri_livello = data.result_data[i].des_step;
25622
- b_found = true;
25623
- break;
25622
+ let stato_doc = data.result_data[0].stato;
25623
+ p = new QParam();
25624
+ p.sql = "SELECT_WKF2_SELECT_USER_MIN";
25625
+ p.types = ["string", "string"];
25626
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
25627
+ this.m_dataService.doQuery(p).subscribe((data) => {
25628
+ let b_found = false;
25629
+ let livello = 0;
25630
+ let descri_livello = '';
25631
+ for (let i = 0; i < data.result_data.length; i++) {
25632
+ if (data.result_data[i].username == this.app_s.user) {
25633
+ livello = data.result_data[i].step;
25634
+ descri_livello = data.result_data[i].des_step;
25635
+ b_found = true;
25636
+ break;
25637
+ }
25624
25638
  }
25625
- }
25626
- if (b_found) {
25627
- if (livello != this.get_grid().sRow.stato) {
25628
- this._toastr.error('Il documento non è in stato Bozza');
25629
- return;
25639
+ if (b_found) {
25640
+ console.log(livello, stato_doc);
25641
+ if (livello != stato_doc) {
25642
+ this._toastr.error('Il documento non è in stato Bozza');
25643
+ return;
25644
+ }
25645
+ let p = new QParam();
25646
+ p.sql = "UPDATE_WKF_STATO_BOZZA";
25647
+ p.types = ["string", "string", "int", 'string'];
25648
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
25649
+ this.m_dataService.doQuery(p).subscribe((data) => {
25650
+ if (data != null)
25651
+ if (data.result_msg == "OK") {
25652
+ this._toastr.info('Documento aggiornato');
25653
+ this.get_grid().doFill("");
25654
+ }
25655
+ });
25630
25656
  }
25631
- let p = new QParam();
25632
- p.sql = "UPDATE_WKF_STATO_BOZZA";
25633
- p.types = ["string", "string", "int", 'string'];
25634
- p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
25635
- this.m_dataService.doQuery(p).subscribe((data) => {
25636
- if (data != null)
25637
- if (data.result_msg == "OK") {
25638
- this._toastr.info('Documento aggiornato');
25639
- this.get_grid().doFill("");
25640
- }
25641
- });
25642
- }
25643
- else {
25644
- this._toastr.error('L\'utente non è configurato per lo step BOZZA');
25645
- }
25657
+ else {
25658
+ this._toastr.error('L\'utente non è configurato per lo step BOZZA');
25659
+ }
25660
+ });
25646
25661
  });
25647
25662
  }
25648
25663
  });