@fluxhub/fluxhub-lib 10.0.723 → 10.0.725
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 +206 -65
- 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/wkf_engine_v2/wkfapp.js +161 -25
- package/esm2015/lib/wkf_engine_v2/wkfdatiaggiuntivi.js +5 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +161 -25
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/wkf_engine_v2/wkfapp.d.ts +6 -2
- package/package.json +1 -1
|
@@ -24994,7 +24994,8 @@ class dati_aggiuntivi_v2 {
|
|
|
24994
24994
|
if (this.app_info.body_riassegna != null)
|
|
24995
24995
|
if (this.app_info.body_riassegna != "")
|
|
24996
24996
|
body_email = this.app_info.body_riassegna;
|
|
24997
|
-
|
|
24997
|
+
oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
|
|
24998
|
+
body_email = body_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
|
|
24998
24999
|
/* for (let prop in this.m_obj)
|
|
24999
25000
|
if (this.m_obj[prop] != null) {
|
|
25000
25001
|
|
|
@@ -25891,6 +25892,8 @@ class dati_aggiuntivi_v2 {
|
|
|
25891
25892
|
if (this.app_info.body_riassegna != null)
|
|
25892
25893
|
if (this.app_info.body_riassegna != "")
|
|
25893
25894
|
body_email = this.app_info.body_riassegna;
|
|
25895
|
+
oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
|
|
25896
|
+
body_email = body_email.split('{{TRANSITION_DESCRI}}').join(this.getLvlDescri(String(this.m_liv), this.m_statox));
|
|
25894
25897
|
/*
|
|
25895
25898
|
for (let prop in this.m_obj)
|
|
25896
25899
|
if (this.m_obj[prop] != null) {
|
|
@@ -28879,7 +28882,7 @@ class FSResult {
|
|
|
28879
28882
|
}
|
|
28880
28883
|
|
|
28881
28884
|
class wkfapp_v2 {
|
|
28882
|
-
constructor(app_s, m_service, m_dataService, m_router, _toastr, dialog, m_wkf, m_uti, tsr) {
|
|
28885
|
+
constructor(app_s, m_service, m_dataService, m_router, _toastr, dialog, m_wkf, m_uti, tsr, m_fileservice) {
|
|
28883
28886
|
this.app_s = app_s;
|
|
28884
28887
|
this.m_service = m_service;
|
|
28885
28888
|
this.m_dataService = m_dataService;
|
|
@@ -28889,6 +28892,7 @@ class wkfapp_v2 {
|
|
|
28889
28892
|
this.m_wkf = m_wkf;
|
|
28890
28893
|
this.m_uti = m_uti;
|
|
28891
28894
|
this.tsr = tsr;
|
|
28895
|
+
this.m_fileservice = m_fileservice;
|
|
28892
28896
|
this.b_editing = false;
|
|
28893
28897
|
this.is_Supervisor = false;
|
|
28894
28898
|
this.is_Visor = false;
|
|
@@ -28913,6 +28917,7 @@ class wkfapp_v2 {
|
|
|
28913
28917
|
this.is_init = false;
|
|
28914
28918
|
this.imp = "";
|
|
28915
28919
|
this.m_cod_documento = "";
|
|
28920
|
+
this.app_info = {};
|
|
28916
28921
|
this.sort_field = "";
|
|
28917
28922
|
if (!m_service.checkCredentials()) {
|
|
28918
28923
|
return;
|
|
@@ -28947,6 +28952,117 @@ class wkfapp_v2 {
|
|
|
28947
28952
|
if (o.cmd == "reclama_bozza")
|
|
28948
28953
|
this.reclama_bozza();
|
|
28949
28954
|
}
|
|
28955
|
+
riassegna_a(o) {
|
|
28956
|
+
let p = new QParam();
|
|
28957
|
+
p.sql = "SELECT_DOCUMENTS_BY_UIID";
|
|
28958
|
+
p.types = ["string", "string"];
|
|
28959
|
+
p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
|
|
28960
|
+
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
28961
|
+
o = data.result_data[0];
|
|
28962
|
+
let arx = o.assegnati_paralleli.split(',');
|
|
28963
|
+
let arrAutori = [];
|
|
28964
|
+
for (let x = 0; x < arx.length; x++)
|
|
28965
|
+
for (let y = 0; y < this.livs.length; y++) {
|
|
28966
|
+
if (arx[x] == this.livs[y].username) {
|
|
28967
|
+
arrAutori.push({ username: arx[x], nc: this.livs[y].nc });
|
|
28968
|
+
break;
|
|
28969
|
+
}
|
|
28970
|
+
}
|
|
28971
|
+
// console.log('arrAutori ',arrAutori);
|
|
28972
|
+
arrAutori = arrAutori.sort((n1, n2) => {
|
|
28973
|
+
if (n1.nc > n2.nc) {
|
|
28974
|
+
return 1;
|
|
28975
|
+
}
|
|
28976
|
+
if (n1.nc < n2.nc) {
|
|
28977
|
+
return -1;
|
|
28978
|
+
}
|
|
28979
|
+
return 0;
|
|
28980
|
+
});
|
|
28981
|
+
const dialogRef = this.dialog.open(win_assegna_a, { 'disableClose': true, width: '800px', data: {
|
|
28982
|
+
title: this.tsr.instant('Conferma Assegnazione'),
|
|
28983
|
+
lbl: '',
|
|
28984
|
+
commento_default: '',
|
|
28985
|
+
comm_notrequired: '',
|
|
28986
|
+
utenti: arrAutori,
|
|
28987
|
+
prendi_in_carico: false
|
|
28988
|
+
} });
|
|
28989
|
+
dialogRef.afterClosed().subscribe(result => {
|
|
28990
|
+
if (result) {
|
|
28991
|
+
if (result.arrsel.length == 0) {
|
|
28992
|
+
this._toastr.error("Impossibile riassegnare");
|
|
28993
|
+
return;
|
|
28994
|
+
}
|
|
28995
|
+
// console.log(' result.arrsel ', result.arrsel);
|
|
28996
|
+
let arr_new_arr = '';
|
|
28997
|
+
o.autori = '';
|
|
28998
|
+
o.pers_int = '';
|
|
28999
|
+
let b_edit = false;
|
|
29000
|
+
result.arrsel.map((v) => {
|
|
29001
|
+
if (arr_new_arr != '')
|
|
29002
|
+
arr_new_arr += ',';
|
|
29003
|
+
arr_new_arr += v.username;
|
|
29004
|
+
if (o.autori.indexOf(v.username) == -1) {
|
|
29005
|
+
console.log('VVV ', v);
|
|
29006
|
+
if (o.autori != '')
|
|
29007
|
+
o.autori = o.autori + ',';
|
|
29008
|
+
o.autori = o.autori + v.username;
|
|
29009
|
+
if (o.pers_int != '')
|
|
29010
|
+
o.pers_int = o.pers_int + ',';
|
|
29011
|
+
o.pers_int = o.pers_int + v.nc;
|
|
29012
|
+
}
|
|
29013
|
+
if (v.username == this.app_info.user)
|
|
29014
|
+
b_edit = true;
|
|
29015
|
+
});
|
|
29016
|
+
let in_carico = false;
|
|
29017
|
+
if (o.autori != null)
|
|
29018
|
+
if (o.autori.split(',').length != 1)
|
|
29019
|
+
in_carico = true;
|
|
29020
|
+
console.log(o.autori, in_carico);
|
|
29021
|
+
let b_assengna_a = false;
|
|
29022
|
+
if (o.assegnati_paralleli != null)
|
|
29023
|
+
if (o.assegnati_paralleli.split(',').length != 1)
|
|
29024
|
+
if (o.assegnati_paralleli.indexOf(this.app_s.user) > -1)
|
|
29025
|
+
b_assengna_a = true;
|
|
29026
|
+
// console.log('this.m_obj.autori ',this.m_obj.autori, this.in_carico, this.b_assengna_a);
|
|
29027
|
+
let p = new QParam();
|
|
29028
|
+
p.sql = "UPDATE_WKF_DOC_AUTHOR";
|
|
29029
|
+
p.values = [this.id_applicativo, o.id_documento, o.autori, o.pers_int];
|
|
29030
|
+
p.types = ["string", "string", "string", "string"];
|
|
29031
|
+
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
29032
|
+
if (data != null)
|
|
29033
|
+
if (data.result_msg == "OK") {
|
|
29034
|
+
this.m_dataService.doQuery({ sql: 'INSERT_WORKFLOW_LOG',
|
|
29035
|
+
values: [this.id_applicativo, this.user_idp, 'DOCUMENTO RIASSEGNATO', 'DOCUMENTO RIASSEGNATO A: ' + arr_new_arr, o.uiid],
|
|
29036
|
+
types: ['string', 'string', 'string', 'string', 'string'], names: [] }).subscribe((data) => {
|
|
29037
|
+
});
|
|
29038
|
+
if (result.op == 'A') {
|
|
29039
|
+
let body_email = '';
|
|
29040
|
+
let oggetto_email = this.app_info.descrizione_breve +
|
|
29041
|
+
", Ti è stato assegnato il documento numero: " +
|
|
29042
|
+
o.codice;
|
|
29043
|
+
if (this.app_info.subject_riassegna != null)
|
|
29044
|
+
if (this.app_info.subject_riassegna != "")
|
|
29045
|
+
oggetto_email = this.app_info.subject_riassegna;
|
|
29046
|
+
if (this.app_info.body_riassegna != null)
|
|
29047
|
+
if (this.app_info.body_riassegna != "")
|
|
29048
|
+
body_email = this.app_info.body_riassegna;
|
|
29049
|
+
oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(o.stat_stato);
|
|
29050
|
+
body_email = body_email.split('{{TRANSITION_DESCRI}}').join(o.stat_stato);
|
|
29051
|
+
this.sendEMail_ex(this.user_idp, arr_new_arr, oggetto_email, body_email, this.id_applicativo, o.uiid, this.app_info.COMPANY_SITE_ROOT +
|
|
29052
|
+
"#/" +
|
|
29053
|
+
this.app_info.modulo_swf +
|
|
29054
|
+
"/" +
|
|
29055
|
+
this.id_applicativo +
|
|
29056
|
+
"/" +
|
|
29057
|
+
o.uiid +
|
|
29058
|
+
"/edit", o.codice, "", true, "", false, '');
|
|
29059
|
+
}
|
|
29060
|
+
}
|
|
29061
|
+
});
|
|
29062
|
+
}
|
|
29063
|
+
});
|
|
29064
|
+
});
|
|
29065
|
+
}
|
|
28950
29066
|
annulla_richiesta() {
|
|
28951
29067
|
if (this.get_grid().sRow == null) {
|
|
28952
29068
|
this._toastr.error(this.tsr.instant("Selezionare il documento da annullare"));
|
|
@@ -29314,13 +29430,23 @@ class wkfapp_v2 {
|
|
|
29314
29430
|
a_aut = a_aut + this.wax[i].username;
|
|
29315
29431
|
}
|
|
29316
29432
|
forkJoin(op).subscribe((result) => { });
|
|
29317
|
-
|
|
29433
|
+
let oggetto_email = this.titolo_email +
|
|
29318
29434
|
this.tsr.instant("L'utente ") +
|
|
29319
29435
|
this.user_cognome +
|
|
29320
29436
|
" " +
|
|
29321
29437
|
this.user_nome +
|
|
29322
29438
|
this.tsr.instant(" ti ha riassegnato il documento: ") +
|
|
29323
|
-
this.get_grid().sRow.codice
|
|
29439
|
+
this.get_grid().sRow.codice;
|
|
29440
|
+
let body_email = "Commento:\n\n" + this.nota_wax;
|
|
29441
|
+
if (this.app_info.subject_riassegna != null)
|
|
29442
|
+
if (this.app_info.subject_riassegna != "")
|
|
29443
|
+
oggetto_email = this.app_info.subject_riassegna;
|
|
29444
|
+
if (this.app_info.body_riassegna != null)
|
|
29445
|
+
if (this.app_info.body_riassegna != "")
|
|
29446
|
+
body_email = this.app_info.body_riassegna;
|
|
29447
|
+
oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(this.os_r.description);
|
|
29448
|
+
body_email = body_email.split('{{TRANSITION_DESCRI}}').join(this.os_r.description);
|
|
29449
|
+
this.sendEMail_ex(this.user_idp, a_datanot, oggetto_email, body_email, this.id_applicativo, this.get_grid().sRow.uiid, this.app_s.COMPANY_SITE_ROOT +
|
|
29324
29450
|
"#/" +
|
|
29325
29451
|
this.app_root +
|
|
29326
29452
|
"/" +
|
|
@@ -29427,26 +29553,34 @@ class wkfapp_v2 {
|
|
|
29427
29553
|
});
|
|
29428
29554
|
}
|
|
29429
29555
|
}
|
|
29430
|
-
sendEMail_ex(mit, to, ogg, descri, idapp, iddoc, link, cc, nota, ical = "") {
|
|
29431
|
-
|
|
29432
|
-
|
|
29433
|
-
|
|
29434
|
-
|
|
29556
|
+
sendEMail_ex(mit, to, ogg, descri, idapp, iddoc, link, cc, nota, notif_av = true, ical = "", b_exit = true, commento = "") {
|
|
29557
|
+
let dev_mode = false;
|
|
29558
|
+
if (this.app_s.dev_mode != null)
|
|
29559
|
+
if (this.app_s.dev_mode == "1")
|
|
29560
|
+
dev_mode = true;
|
|
29561
|
+
let obj_r = {
|
|
29562
|
+
destinatari: to.split(','),
|
|
29563
|
+
commento: commento,
|
|
29564
|
+
id_applicazione: idapp,
|
|
29565
|
+
id_documento: iddoc,
|
|
29566
|
+
username: mit,
|
|
29567
|
+
e_subject: ogg,
|
|
29568
|
+
e_body: descri,
|
|
29569
|
+
dev_mode: dev_mode ? 1 : 0,
|
|
29570
|
+
};
|
|
29571
|
+
let fs = new FSInput();
|
|
29572
|
+
fs.command = "exec_app";
|
|
29573
|
+
fs.p1 = 'send_email';
|
|
29574
|
+
let uiid_op = this.m_uti.newGuid();
|
|
29575
|
+
fs.p2 = uiid_op;
|
|
29435
29576
|
let p = new QParam();
|
|
29436
|
-
p.sql = "
|
|
29437
|
-
p.values = [
|
|
29438
|
-
|
|
29439
|
-
|
|
29440
|
-
|
|
29441
|
-
|
|
29442
|
-
|
|
29443
|
-
iddoc,
|
|
29444
|
-
link,
|
|
29445
|
-
cc,
|
|
29446
|
-
nota,
|
|
29447
|
-
ical,
|
|
29448
|
-
];
|
|
29449
|
-
this.m_wkf.doQuery(p).subscribe((data) => { });
|
|
29577
|
+
p.sql = "INSERT_WKF_OP";
|
|
29578
|
+
p.values = [uiid_op, JSON.stringify(obj_r)];
|
|
29579
|
+
p.types = ['string', 'string'];
|
|
29580
|
+
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
29581
|
+
this.m_fileservice.doQuery(fs).subscribe((data) => {
|
|
29582
|
+
});
|
|
29583
|
+
});
|
|
29450
29584
|
}
|
|
29451
29585
|
annulla_imp() {
|
|
29452
29586
|
let p = new QParam();
|
|
@@ -29520,7 +29654,7 @@ class wkfapp_v2 {
|
|
|
29520
29654
|
data.result_data[0].cognome +
|
|
29521
29655
|
" " +
|
|
29522
29656
|
data.result_data[0].nome;
|
|
29523
|
-
console.log('SETTO LOCALSTORAGE: ',
|
|
29657
|
+
// console.log('SETTO LOCALSTORAGE: ',this.app_s.COMPANY_KEY+'_imp_user',this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
|
|
29524
29658
|
localStorage.setItem(this.app_s.COMPANY_KEY + '_imp_user', this.m_uti.encrypt_v3(JSON.stringify(data.result_data[0])));
|
|
29525
29659
|
this.get_grid().doFill("");
|
|
29526
29660
|
}
|
|
@@ -29636,6 +29770,7 @@ class wkfapp_v2 {
|
|
|
29636
29770
|
if (data.result_msg == "OK") {
|
|
29637
29771
|
let a_conf = data.result_data;
|
|
29638
29772
|
this.id_applicativo = a_conf[0].id_gruppo;
|
|
29773
|
+
this.app_info = a_conf[0];
|
|
29639
29774
|
this.app_root = a_conf[0].modulo_swf;
|
|
29640
29775
|
this.codice_app = a_conf[0].codice_documento; //codice documento
|
|
29641
29776
|
this.att_panelcat = a_conf[0].descrizione_breve; //descrizione breve
|
|
@@ -29786,7 +29921,8 @@ wkfapp_v2.ctorParameters = () => [
|
|
|
29786
29921
|
{ type: MatDialog },
|
|
29787
29922
|
{ type: WkfService },
|
|
29788
29923
|
{ type: UtilityService },
|
|
29789
|
-
{ type: TranslateService }
|
|
29924
|
+
{ type: TranslateService },
|
|
29925
|
+
{ type: FileService }
|
|
29790
29926
|
];
|
|
29791
29927
|
|
|
29792
29928
|
/**
|