@fluxhub/fluxhub-lib 10.0.437 → 10.0.439
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.
- package/bundles/fluxhub-fluxhub-lib.umd.js +141 -119
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +2 -2
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhgrid_toolbar.js +4 -4
- package/esm2015/lib/services/utility.service.js +8 -1
- package/esm2015/lib/wkf_engine/wkfapp.js +38 -31
- package/esm2015/lib/wkf_engine_v2/wkfapp.js +39 -31
- package/fesm2015/fluxhub-fluxhub-lib.js +85 -63
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -441,6 +441,13 @@ class UtilityService {
|
|
|
441
441
|
const m = dt.split("/").map((m) => parseInt(m));
|
|
442
442
|
return new Date(m[2], m[1] - 1, m[0]);
|
|
443
443
|
}
|
|
444
|
+
if (f == 5) {
|
|
445
|
+
// parse date in 20181017 (dd/MM/YYYY)
|
|
446
|
+
if (!dt || dt.length != 8) {
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
return new Date(parseInt(dt.substring(0, 4)), parseInt(dt.substring(4, 2)) - 1, parseInt(dt.substring(6, 2)));
|
|
450
|
+
}
|
|
444
451
|
return null;
|
|
445
452
|
}
|
|
446
453
|
sql_number(a) {
|
|
@@ -7037,41 +7044,48 @@ class wkfapp {
|
|
|
7037
7044
|
dialogRef.afterClosed().subscribe((result) => {
|
|
7038
7045
|
if (result) {
|
|
7039
7046
|
let p = new QParam();
|
|
7040
|
-
p.sql = "
|
|
7047
|
+
p.sql = "SELECT_DOCUMENTS_BY_UIID";
|
|
7041
7048
|
p.types = ["string", "string"];
|
|
7042
7049
|
p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
|
|
7043
7050
|
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
7044
|
-
let
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7051
|
+
let stato_doc = data.result_data[0].stato;
|
|
7052
|
+
p = new QParam();
|
|
7053
|
+
p.sql = "SELECT_WKF_SELECT_USER_MIN";
|
|
7054
|
+
p.types = ["string", "string"];
|
|
7055
|
+
p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
|
|
7056
|
+
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
7057
|
+
let b_found = false;
|
|
7058
|
+
let livello = 0;
|
|
7059
|
+
let descri_livello = '';
|
|
7060
|
+
for (let i = 0; i < data.result_data.length; i++) {
|
|
7061
|
+
if (data.result_data[i].idp == this.app_s.user) {
|
|
7062
|
+
livello = data.result_data[i].livello;
|
|
7063
|
+
descri_livello = data.result_data[i].descri_livello;
|
|
7064
|
+
b_found = true;
|
|
7065
|
+
break;
|
|
7066
|
+
}
|
|
7053
7067
|
}
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7068
|
+
if (b_found) {
|
|
7069
|
+
if (livello != stato_doc) {
|
|
7070
|
+
this._toastr.error('Il documento non è in stato Bozza');
|
|
7071
|
+
return;
|
|
7072
|
+
}
|
|
7073
|
+
let p = new QParam();
|
|
7074
|
+
p.sql = "UPDATE_WKF_STATO_BOZZA";
|
|
7075
|
+
p.types = ["string", "string", "int", 'string'];
|
|
7076
|
+
p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
|
|
7077
|
+
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
7078
|
+
if (data != null)
|
|
7079
|
+
if (data.result_msg == "OK") {
|
|
7080
|
+
this._toastr.info('Documento aggiornato');
|
|
7081
|
+
this.get_grid().doFill("");
|
|
7082
|
+
}
|
|
7083
|
+
});
|
|
7059
7084
|
}
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
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
|
-
}
|
|
7085
|
+
else {
|
|
7086
|
+
this._toastr.error('L\'utente non è configurato per lo step BOZZA');
|
|
7087
|
+
}
|
|
7088
|
+
});
|
|
7075
7089
|
});
|
|
7076
7090
|
}
|
|
7077
7091
|
});
|
|
@@ -15761,7 +15775,7 @@ FHGridToolBarComponent.decorators = [
|
|
|
15761
15775
|
{ type: Component, args: [{
|
|
15762
15776
|
selector: "FHGridToolBar",
|
|
15763
15777
|
template: `
|
|
15764
|
-
|
|
15778
|
+
|
|
15765
15779
|
<div
|
|
15766
15780
|
*ngIf="type == 'WKF_NO_EDIT'"
|
|
15767
15781
|
fxLayoutGap="3px"
|
|
@@ -15821,7 +15835,7 @@ FHGridToolBarComponent.decorators = [
|
|
|
15821
15835
|
{{ "SOSTITUISCI UTENTE" | translate }}
|
|
15822
15836
|
</button>
|
|
15823
15837
|
<button
|
|
15824
|
-
mat-menu-item [hidden]="sRow==null
|
|
15838
|
+
mat-menu-item [hidden]="sRow==null"
|
|
15825
15839
|
style="background-color: #F5F5F5"
|
|
15826
15840
|
(click)="reclama_bozza()"
|
|
15827
15841
|
*ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin"
|
|
@@ -15935,7 +15949,7 @@ FHGridToolBarComponent.decorators = [
|
|
|
15935
15949
|
{{ "SOSTITUISCI UTENTE" | translate }}
|
|
15936
15950
|
</button>
|
|
15937
15951
|
<button
|
|
15938
|
-
mat-menu-item [hidden]="sRow==null
|
|
15952
|
+
mat-menu-item [hidden]="sRow==null"
|
|
15939
15953
|
style="background-color: #F5F5F5"
|
|
15940
15954
|
(click)="reclama_bozza()"
|
|
15941
15955
|
*ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin"
|
|
@@ -25608,41 +25622,49 @@ class wkfapp_v2 {
|
|
|
25608
25622
|
dialogRef.afterClosed().subscribe((result) => {
|
|
25609
25623
|
if (result) {
|
|
25610
25624
|
let p = new QParam();
|
|
25611
|
-
p.sql = "
|
|
25625
|
+
p.sql = "SELECT_DOCUMENTS_BY_UIID";
|
|
25612
25626
|
p.types = ["string", "string"];
|
|
25613
25627
|
p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
|
|
25614
25628
|
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
25615
|
-
let
|
|
25616
|
-
|
|
25617
|
-
|
|
25618
|
-
|
|
25619
|
-
|
|
25620
|
-
|
|
25621
|
-
|
|
25622
|
-
|
|
25623
|
-
|
|
25629
|
+
let stato_doc = data.result_data[0].stato;
|
|
25630
|
+
p = new QParam();
|
|
25631
|
+
p.sql = "SELECT_WKF2_SELECT_USER_MIN";
|
|
25632
|
+
p.types = ["string", "string"];
|
|
25633
|
+
p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
|
|
25634
|
+
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
25635
|
+
let b_found = false;
|
|
25636
|
+
let livello = 0;
|
|
25637
|
+
let descri_livello = '';
|
|
25638
|
+
for (let i = 0; i < data.result_data.length; i++) {
|
|
25639
|
+
if (data.result_data[i].username == this.app_s.user) {
|
|
25640
|
+
livello = data.result_data[i].step;
|
|
25641
|
+
descri_livello = data.result_data[i].des_step;
|
|
25642
|
+
b_found = true;
|
|
25643
|
+
break;
|
|
25644
|
+
}
|
|
25624
25645
|
}
|
|
25625
|
-
|
|
25626
|
-
|
|
25627
|
-
|
|
25628
|
-
|
|
25629
|
-
|
|
25646
|
+
if (b_found) {
|
|
25647
|
+
console.log(livello, stato_doc);
|
|
25648
|
+
if (livello != stato_doc) {
|
|
25649
|
+
this._toastr.error('Il documento non è in stato Bozza');
|
|
25650
|
+
return;
|
|
25651
|
+
}
|
|
25652
|
+
let p = new QParam();
|
|
25653
|
+
p.sql = "UPDATE_WKF_STATO_BOZZA";
|
|
25654
|
+
p.types = ["string", "string", "int", 'string'];
|
|
25655
|
+
p.values = [this.id_applicativo, this.get_grid().sRow.uiid, livello, descri_livello];
|
|
25656
|
+
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
25657
|
+
if (data != null)
|
|
25658
|
+
if (data.result_msg == "OK") {
|
|
25659
|
+
this._toastr.info('Documento aggiornato');
|
|
25660
|
+
this.get_grid().doFill("");
|
|
25661
|
+
}
|
|
25662
|
+
});
|
|
25630
25663
|
}
|
|
25631
|
-
|
|
25632
|
-
|
|
25633
|
-
|
|
25634
|
-
|
|
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
|
-
}
|
|
25664
|
+
else {
|
|
25665
|
+
this._toastr.error('L\'utente non è configurato per lo step BOZZA');
|
|
25666
|
+
}
|
|
25667
|
+
});
|
|
25646
25668
|
});
|
|
25647
25669
|
}
|
|
25648
25670
|
});
|