@fluxhub/fluxhub-lib 10.0.746 → 10.0.748
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 +459 -344
- 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/wkfdatiaggiuntivi.js +467 -350
- package/fesm2015/fluxhub-fluxhub-lib.js +466 -349
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -23013,7 +23013,7 @@
|
|
|
23013
23013
|
this.m_obj = {};
|
|
23014
23014
|
this.sort_field = "";
|
|
23015
23015
|
this.in_carico = false;
|
|
23016
|
-
this.wkf_users_roles =
|
|
23016
|
+
this.wkf_users_roles = "";
|
|
23017
23017
|
this.b_rip_pulsanti = true;
|
|
23018
23018
|
this.save_alreadypressed = false;
|
|
23019
23019
|
this.b_respingi = false;
|
|
@@ -23094,7 +23094,7 @@
|
|
|
23094
23094
|
px.sql = "SELECT_ROLES_WKF_V2";
|
|
23095
23095
|
px.values = [_this.id_applicativo];
|
|
23096
23096
|
px.types = ["string"];
|
|
23097
|
-
console.log(
|
|
23097
|
+
console.log("start SELECT_ROLES_WKF_V2", new Date());
|
|
23098
23098
|
_this.m_dataService.doQuery(px).subscribe(function (data) {
|
|
23099
23099
|
if (data != null)
|
|
23100
23100
|
if (data.result_msg == "OK") {
|
|
@@ -23114,13 +23114,13 @@
|
|
|
23114
23114
|
p.sql = "SELECT_WKF_APP_INFO_BYUID";
|
|
23115
23115
|
p.types = ["string"];
|
|
23116
23116
|
p.values = [_this.id_applicativo];
|
|
23117
|
-
console.log(
|
|
23117
|
+
console.log("start SELECT_WKF_APP_INFO_BYUID", new Date());
|
|
23118
23118
|
_this.m_dataService.doQuery(p).subscribe(function (data) {
|
|
23119
23119
|
if (data != null)
|
|
23120
23120
|
if (data.result_msg == "OK") {
|
|
23121
23121
|
console.log(data.result_data.length);
|
|
23122
23122
|
if (data.result_data.length > 0) {
|
|
23123
|
-
console.log(
|
|
23123
|
+
console.log("end SELECT_WKF_APP_INFO_BYUID", new Date());
|
|
23124
23124
|
// this.app_info=data.result_data[0];
|
|
23125
23125
|
_this.setta_info_app(data.result_data[0]);
|
|
23126
23126
|
_this.init_engine();
|
|
@@ -23132,14 +23132,14 @@
|
|
|
23132
23132
|
});
|
|
23133
23133
|
}
|
|
23134
23134
|
dati_aggiuntivi_v2.prototype.ripristina_imp = function () {
|
|
23135
|
-
if (localStorage.getItem(this.app_s.COMPANY_KEY +
|
|
23135
|
+
if (localStorage.getItem(this.app_s.COMPANY_KEY + "_imp_user") == null) {
|
|
23136
23136
|
this.user_idp = this.app_s.user;
|
|
23137
23137
|
this.user_nome = this.app_s.user_name;
|
|
23138
23138
|
this.user_cognome = this.app_s.user_surname;
|
|
23139
23139
|
this.user_email = this.app_s.user_email;
|
|
23140
23140
|
return;
|
|
23141
23141
|
}
|
|
23142
|
-
var obj = JSON.parse(this.uti_s.decrypt_v3(localStorage.getItem(this.app_s.COMPANY_KEY +
|
|
23142
|
+
var obj = JSON.parse(this.uti_s.decrypt_v3(localStorage.getItem(this.app_s.COMPANY_KEY + "_imp_user")));
|
|
23143
23143
|
if (obj == null) {
|
|
23144
23144
|
this.user_idp = this.app_s.user;
|
|
23145
23145
|
this.user_nome = this.app_s.user_name;
|
|
@@ -23180,7 +23180,8 @@
|
|
|
23180
23180
|
this.app_s.getState().wkf_doc_info = {};
|
|
23181
23181
|
this.app_s.getState().wkf_doc_info.curr_user = this.user_idp;
|
|
23182
23182
|
this.app_s.getState().wkf_doc_info.codice = this.m_obj.codice;
|
|
23183
|
-
this.app_s.getState().wkf_doc_info.data_richiesta =
|
|
23183
|
+
this.app_s.getState().wkf_doc_info.data_richiesta =
|
|
23184
|
+
this.m_obj.data_richiesta;
|
|
23184
23185
|
this.app_s.getState().wkf_doc_info.richiedente =
|
|
23185
23186
|
this.m_obj.nc + " (" + this.m_obj.richiesta_da + ")";
|
|
23186
23187
|
this.app_s.getState().wkf_doc_info.in_carico_a = this.m_obj.in_carico_a;
|
|
@@ -23202,20 +23203,30 @@
|
|
|
23202
23203
|
dati_aggiuntivi_v2.prototype.prendi_in_carico = function () {
|
|
23203
23204
|
this.in_carico = false;
|
|
23204
23205
|
if (this.m_obj.assegnati_paralleli != null)
|
|
23205
|
-
if (this.m_obj.assegnati_paralleli.split(
|
|
23206
|
+
if (this.m_obj.assegnati_paralleli.split(",").length != 1)
|
|
23206
23207
|
if (this.m_obj.assegnati_paralleli.indexOf(this.app_s.user) > -1)
|
|
23207
23208
|
this.b_assengna_a = true;
|
|
23208
23209
|
this.update_status(true, null, this.in_carico, this.b_assengna_a, 1);
|
|
23209
23210
|
this.m_obj.autori = this.app_s.user;
|
|
23210
23211
|
var p = new QParam();
|
|
23211
23212
|
p.sql = "UPDATE_WKF_PRENDI_IN_CARICO";
|
|
23212
|
-
p.types = [
|
|
23213
|
-
p.values = [
|
|
23213
|
+
p.types = ["string", "string", "string"];
|
|
23214
|
+
p.values = [
|
|
23215
|
+
this.id_applicativo,
|
|
23216
|
+
this.id_documento,
|
|
23217
|
+
this.app_s.user_surname + " " + this.app_s.user_name,
|
|
23218
|
+
];
|
|
23214
23219
|
this.m_dataService.doQuery(p).subscribe();
|
|
23215
23220
|
p = new QParam();
|
|
23216
23221
|
p.sql = "INSERT_WORKFLOW_LOG";
|
|
23217
|
-
p.types = [
|
|
23218
|
-
p.values = [
|
|
23222
|
+
p.types = ["string", "string", "string", "string", "string"];
|
|
23223
|
+
p.values = [
|
|
23224
|
+
this.id_applicativo,
|
|
23225
|
+
this.app_s.user,
|
|
23226
|
+
"Presa in carico",
|
|
23227
|
+
this.m_obj.stat_stato,
|
|
23228
|
+
this.id_documento,
|
|
23229
|
+
];
|
|
23219
23230
|
this.m_dataService.doQuery(p).subscribe();
|
|
23220
23231
|
};
|
|
23221
23232
|
dati_aggiuntivi_v2.prototype.salva = function () {
|
|
@@ -23253,32 +23264,32 @@
|
|
|
23253
23264
|
}
|
|
23254
23265
|
else {
|
|
23255
23266
|
liv = this.m_obj.stato;
|
|
23256
|
-
console.log(
|
|
23257
|
-
if (this.m_obj.canale != null && this.m_obj.canale !=
|
|
23267
|
+
console.log("this.m_obj.canale ", this.m_obj.canale, liv);
|
|
23268
|
+
if (this.m_obj.canale != null && this.m_obj.canale != "")
|
|
23258
23269
|
for (var i = 0; i < this.livs.length; i++)
|
|
23259
23270
|
if (this.livs[i].step == liv) {
|
|
23260
23271
|
console.log(" liv ", this.livs[i]);
|
|
23261
23272
|
if (this.user_idp.toUpperCase() == this.livs[i].username.toUpperCase()) {
|
|
23262
23273
|
console.log(this.m_obj.canale + " " + this.livs[i].context);
|
|
23263
23274
|
if (this.m_obj.canale == this.livs[i].context) {
|
|
23264
|
-
console.log(
|
|
23275
|
+
console.log("clevel 1 ", this.livs[i]);
|
|
23265
23276
|
this.clevel = this.livs[i];
|
|
23266
23277
|
break;
|
|
23267
23278
|
}
|
|
23268
23279
|
}
|
|
23269
23280
|
}
|
|
23270
|
-
console.log(
|
|
23281
|
+
console.log("clevel 2 ", this.clevel);
|
|
23271
23282
|
if (this.clevel == null)
|
|
23272
23283
|
for (var i = 0; i < this.livs.length; i++) {
|
|
23273
23284
|
if (this.livs[i].username == null)
|
|
23274
|
-
this.livs[i].username =
|
|
23285
|
+
this.livs[i].username = "ZZZ";
|
|
23275
23286
|
if (this.livs[i].step == liv) {
|
|
23276
23287
|
if (this.livs[i].context == "*ALLUSERS" ||
|
|
23277
23288
|
this.user_idp.toUpperCase() == this.livs[i].username.toUpperCase()) {
|
|
23278
|
-
if (
|
|
23289
|
+
if (this.c_canale == "" ||
|
|
23279
23290
|
this.livs[i].context == "" ||
|
|
23280
23291
|
this.c_canale == this.livs[i].context ||
|
|
23281
|
-
this.livs[i].context == "*ALLUSERS")
|
|
23292
|
+
this.livs[i].context == "*ALLUSERS") {
|
|
23282
23293
|
this.clevel = this.livs[i];
|
|
23283
23294
|
break;
|
|
23284
23295
|
}
|
|
@@ -23286,9 +23297,9 @@
|
|
|
23286
23297
|
}
|
|
23287
23298
|
}
|
|
23288
23299
|
}
|
|
23289
|
-
console.log(
|
|
23300
|
+
console.log("clevel 2 ", this.clevel);
|
|
23290
23301
|
this.clevel = this.check_n_levels(this.clevel);
|
|
23291
|
-
if (this.clevel == null || this.clevel ==
|
|
23302
|
+
if (this.clevel == null || this.clevel == "") {
|
|
23292
23303
|
this.alert("Errore di configurazione pratica contattare ufficio IT [0x002]", 1);
|
|
23293
23304
|
return;
|
|
23294
23305
|
}
|
|
@@ -23298,7 +23309,8 @@
|
|
|
23298
23309
|
if (this.clevel.salto_iniziale == 1) {
|
|
23299
23310
|
liv = this.clevel.livello;
|
|
23300
23311
|
for (var i = 0; i < this.livs.length; i++)
|
|
23301
|
-
if (this.user_idp.toUpperCase() ==
|
|
23312
|
+
if (this.user_idp.toUpperCase() ==
|
|
23313
|
+
this.livs[i].username.toUpperCase() &&
|
|
23302
23314
|
this.livs[i].notifica == 0)
|
|
23303
23315
|
if (this.livs[i].step > liv &&
|
|
23304
23316
|
liv != 0 &&
|
|
@@ -23337,10 +23349,10 @@
|
|
|
23337
23349
|
if (data != null)
|
|
23338
23350
|
if (data.result_msg == "OK") {
|
|
23339
23351
|
var transazioni = data.result_data;
|
|
23340
|
-
console.log(
|
|
23352
|
+
console.log("transazioni ", transazioni);
|
|
23341
23353
|
transazioni = _this.wkf_rule_before(transazioni, _this.clevel.step, _this.clevel.context);
|
|
23342
23354
|
if (transazioni.length == 0) {
|
|
23343
|
-
_this.alert(
|
|
23355
|
+
_this.alert("Nessuna transizione definita dallo step: " + _this.clevel.step, 1);
|
|
23344
23356
|
return;
|
|
23345
23357
|
}
|
|
23346
23358
|
if (transazioni.length == 1) {
|
|
@@ -23349,10 +23361,10 @@
|
|
|
23349
23361
|
else {
|
|
23350
23362
|
var dialogRef = _this.m_dialog.open(win_select_level_v2, {
|
|
23351
23363
|
disableClose: true,
|
|
23352
|
-
data: transazioni
|
|
23364
|
+
data: transazioni,
|
|
23353
23365
|
});
|
|
23354
23366
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
23355
|
-
console.log(
|
|
23367
|
+
console.log("ris select level", result);
|
|
23356
23368
|
if (result == null) {
|
|
23357
23369
|
_this.update_status(true, null, null, null, 2);
|
|
23358
23370
|
return;
|
|
@@ -23364,20 +23376,20 @@
|
|
|
23364
23376
|
});
|
|
23365
23377
|
};
|
|
23366
23378
|
dati_aggiuntivi_v2.prototype.calcolanextandjump2 = function (o) {
|
|
23367
|
-
console.log(
|
|
23379
|
+
console.log("calcolanextandjump2", o);
|
|
23368
23380
|
this.transizione_info = o;
|
|
23369
23381
|
var cliv = 0;
|
|
23370
23382
|
var liv = 0;
|
|
23371
23383
|
for (var i = 0; i < this.livs.length; i++)
|
|
23372
|
-
if (
|
|
23384
|
+
if (o.step_d == this.livs[i].step) {
|
|
23373
23385
|
this.nlevel = this.livs[i];
|
|
23374
23386
|
cliv = this.livs[i].step;
|
|
23375
23387
|
}
|
|
23376
23388
|
liv = this.wkf_rule(cliv);
|
|
23377
23389
|
var bfound = false;
|
|
23378
23390
|
for (var i = 0; i < this.livs.length; i++)
|
|
23379
|
-
if (
|
|
23380
|
-
this.clevel.context == this.livs[i].context)
|
|
23391
|
+
if (this.clevel.context == "" ||
|
|
23392
|
+
this.clevel.context == this.livs[i].context)
|
|
23381
23393
|
if (this.livs[i].step == liv) {
|
|
23382
23394
|
this.nlevel = this.livs[i];
|
|
23383
23395
|
liv = this.livs[i].step;
|
|
@@ -23415,7 +23427,7 @@
|
|
|
23415
23427
|
};
|
|
23416
23428
|
dati_aggiuntivi_v2.prototype.calcola_destinari = function (o) {
|
|
23417
23429
|
var _this = this;
|
|
23418
|
-
console.log(
|
|
23430
|
+
console.log("this. this.transizione_info ", o);
|
|
23419
23431
|
if (this.nlevel == null) {
|
|
23420
23432
|
this.alert("problema di configurazione passaggio avanti dal livello " +
|
|
23421
23433
|
this.clevel.descri_livello +
|
|
@@ -23424,7 +23436,7 @@
|
|
|
23424
23436
|
}
|
|
23425
23437
|
//let arrayNexl: Array<any> = new Array();
|
|
23426
23438
|
var arrAutori = new Array();
|
|
23427
|
-
if (this.clevel.context ==
|
|
23439
|
+
if (this.clevel.context == "") {
|
|
23428
23440
|
for (var i = 0; i < this.livs.length; i++)
|
|
23429
23441
|
if (this.livs[i].step == this.nlevel.step)
|
|
23430
23442
|
arrAutori.push(this.livs[i]);
|
|
@@ -23432,14 +23444,14 @@
|
|
|
23432
23444
|
else {
|
|
23433
23445
|
var b_canale = false;
|
|
23434
23446
|
for (var i = 0; i < this.livs.length; i++)
|
|
23435
|
-
if (this.livs[i].step == this.nlevel.step &&
|
|
23436
|
-
this.livs[i].context != "")
|
|
23447
|
+
if (this.livs[i].step == this.nlevel.step && this.livs[i].context != "")
|
|
23437
23448
|
b_canale = true;
|
|
23438
23449
|
console.log("canale: " + this.clevel.context);
|
|
23439
23450
|
for (var i = 0; i < this.livs.length; i++)
|
|
23440
23451
|
if (this.livs[i].step == this.nlevel.step) {
|
|
23441
23452
|
if (this.clevel.context == this.livs[i].context ||
|
|
23442
|
-
|
|
23453
|
+
!b_canale ||
|
|
23454
|
+
this.livs[i].context == "*SYSTEM") {
|
|
23443
23455
|
arrAutori.push(this.livs[i]);
|
|
23444
23456
|
this.nlevel = this.livs[i];
|
|
23445
23457
|
}
|
|
@@ -23455,7 +23467,7 @@
|
|
|
23455
23467
|
var att_autor_1 = [];
|
|
23456
23468
|
//console.log('this.m_obj.creatore ',this.m_obj.creatore);
|
|
23457
23469
|
if (this.m_obj.creatore != null)
|
|
23458
|
-
if (this.m_obj.creatore !=
|
|
23470
|
+
if (this.m_obj.creatore != "")
|
|
23459
23471
|
arrAutori.map(function (v) {
|
|
23460
23472
|
// console.log('v ',v);
|
|
23461
23473
|
if (v.username == _this.m_obj.creatore) {
|
|
@@ -23474,16 +23486,16 @@
|
|
|
23474
23486
|
var dialogRef = this.m_dialog.open(win_assegna_v2, {
|
|
23475
23487
|
disableClose: true,
|
|
23476
23488
|
data: {
|
|
23477
|
-
title: this.tsr.instant(
|
|
23489
|
+
title: this.tsr.instant("Conferma Assegnazione"),
|
|
23478
23490
|
lbl: o.description,
|
|
23479
|
-
commento_default:
|
|
23491
|
+
commento_default: "",
|
|
23480
23492
|
comm_notrequired: o.comments_opt,
|
|
23481
23493
|
utenti: arrAutori,
|
|
23482
|
-
user_sel: o.pre_assegna_req == 0 ? [] : att_autor_1
|
|
23494
|
+
user_sel: o.pre_assegna_req == 0 ? [] : att_autor_1,
|
|
23483
23495
|
},
|
|
23484
23496
|
});
|
|
23485
23497
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
23486
|
-
if (result ==
|
|
23498
|
+
if (result == "" || result == null) {
|
|
23487
23499
|
_this.update_status(true, false, null, null, 4);
|
|
23488
23500
|
if (_this.respingi_enabled)
|
|
23489
23501
|
_this.update_status(true, true, null, null, 5);
|
|
@@ -23496,7 +23508,7 @@
|
|
|
23496
23508
|
var sp = "";
|
|
23497
23509
|
arrAutori.map(function (v) {
|
|
23498
23510
|
if (v.nc == null)
|
|
23499
|
-
v.nc = v.value.split(
|
|
23511
|
+
v.nc = v.value.split("*").join("");
|
|
23500
23512
|
});
|
|
23501
23513
|
var arr_aut_1 = [];
|
|
23502
23514
|
var arr_aut_all_1 = JSON.parse(JSON.stringify(arrAutori));
|
|
@@ -23506,7 +23518,7 @@
|
|
|
23506
23518
|
if (v.default_value == 1)
|
|
23507
23519
|
b_f_1 = true;
|
|
23508
23520
|
});
|
|
23509
|
-
console.log(
|
|
23521
|
+
console.log("b_f ", b_f_1);
|
|
23510
23522
|
if (b_f_1) {
|
|
23511
23523
|
arrAutori.map(function (v) {
|
|
23512
23524
|
if (v.default_value != null)
|
|
@@ -23515,7 +23527,7 @@
|
|
|
23515
23527
|
});
|
|
23516
23528
|
arrAutori = JSON.parse(JSON.stringify(arr_aut_1));
|
|
23517
23529
|
}
|
|
23518
|
-
console.log(
|
|
23530
|
+
console.log("arrAutori ", arrAutori); //qui6
|
|
23519
23531
|
for (var i = 0; i < arrAutori.length; i++)
|
|
23520
23532
|
if (arrAutori[i].nc != null)
|
|
23521
23533
|
if (sp.indexOf(arrAutori[i].nc) == -1) {
|
|
@@ -23523,16 +23535,16 @@
|
|
|
23523
23535
|
sp = sp + ";";
|
|
23524
23536
|
sp = sp + arrAutori[i].nc;
|
|
23525
23537
|
}
|
|
23526
|
-
console.log(
|
|
23538
|
+
console.log(" sp ", sp);
|
|
23527
23539
|
var dialogRef = this.m_dialog.open(win_conferma_v2, {
|
|
23528
23540
|
disableClose: true,
|
|
23529
23541
|
data: {
|
|
23530
|
-
title:
|
|
23542
|
+
title: "Conferma Avanzamento",
|
|
23531
23543
|
lbl: o.description,
|
|
23532
23544
|
icon: o.icon,
|
|
23533
23545
|
color_font: o.color_font,
|
|
23534
23546
|
color: o.color,
|
|
23535
|
-
commento_default:
|
|
23547
|
+
commento_default: "",
|
|
23536
23548
|
comm_notrequired: o.comments_opt,
|
|
23537
23549
|
utenti: sp,
|
|
23538
23550
|
},
|
|
@@ -23548,87 +23560,87 @@
|
|
|
23548
23560
|
});
|
|
23549
23561
|
}
|
|
23550
23562
|
/*
|
|
23551
|
-
|
|
23552
|
-
|
|
23553
|
-
|
|
23554
|
-
|
|
23555
|
-
|
|
23556
|
-
|
|
23557
|
-
|
|
23558
|
-
|
|
23559
|
-
}
|
|
23560
|
-
this.app_s.getState().wkf_doc_info.utenti = "";
|
|
23561
|
-
if (this.nlevel.step < 900)
|
|
23562
|
-
this.app_s.getState().wkf_doc_info.lbl =
|
|
23563
|
-
"" + this.nlevel.description;
|
|
23564
|
-
else
|
|
23565
|
-
this.app_s.getState().wkf_doc_info.lbl =
|
|
23566
|
-
"" + this.nlevel.description;
|
|
23567
|
-
this.app_s.getState().wkf_doc_info.utenti = sp;
|
|
23568
|
-
this.app_s.getState().wkf_doc_info.comm_notrequired = this.transizione_info.comments_opt;
|
|
23569
|
-
|
|
23570
|
-
let dialogRef = this.m_dialog.open(win_conferma_v2, {
|
|
23571
|
-
disableClose: true,
|
|
23572
|
-
data: {
|
|
23573
|
-
commento_default: this.app_s.temp_var4,
|
|
23574
|
-
comm_notrequired: this.transizione_info.comments_opt,
|
|
23575
|
-
},
|
|
23576
|
-
});
|
|
23577
|
-
this.app_s.temp_var4 = "";
|
|
23578
|
-
|
|
23579
|
-
dialogRef.afterClosed().subscribe((result) => {
|
|
23580
|
-
if (result == "abort") {
|
|
23581
|
-
this.edit_b(true);
|
|
23582
|
-
if (this.respingi_enabled) this.resp_b(true);
|
|
23583
|
-
return;
|
|
23563
|
+
if (!this.transizione_info.manual_assignment) {
|
|
23564
|
+
this.app_s.getState().wkf_doc_info.title = "Avanzamento";
|
|
23565
|
+
let sp: string = "";
|
|
23566
|
+
for (let i: number = 0; i < arrAutori.length; i++)
|
|
23567
|
+
if (arrAutori[i].nc != null)
|
|
23568
|
+
if (sp.indexOf(arrAutori[i].nc) == -1) {
|
|
23569
|
+
if (sp != "") sp = sp + ";";
|
|
23570
|
+
sp = sp + arrAutori[i].nc;
|
|
23584
23571
|
}
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
this.app_s.getState().wkf_doc_info.
|
|
23591
|
-
|
|
23592
|
-
|
|
23593
|
-
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
-
|
|
23572
|
+
this.app_s.getState().wkf_doc_info.utenti = "";
|
|
23573
|
+
if (this.nlevel.step < 900)
|
|
23574
|
+
this.app_s.getState().wkf_doc_info.lbl =
|
|
23575
|
+
"" + this.nlevel.description;
|
|
23576
|
+
else
|
|
23577
|
+
this.app_s.getState().wkf_doc_info.lbl =
|
|
23578
|
+
"" + this.nlevel.description;
|
|
23579
|
+
this.app_s.getState().wkf_doc_info.utenti = sp;
|
|
23580
|
+
this.app_s.getState().wkf_doc_info.comm_notrequired = this.transizione_info.comments_opt;
|
|
23581
|
+
|
|
23582
|
+
let dialogRef = this.m_dialog.open(win_conferma_v2, {
|
|
23583
|
+
disableClose: true,
|
|
23584
|
+
data: {
|
|
23585
|
+
commento_default: this.app_s.temp_var4,
|
|
23586
|
+
comm_notrequired: this.transizione_info.comments_opt,
|
|
23587
|
+
},
|
|
23588
|
+
});
|
|
23589
|
+
this.app_s.temp_var4 = "";
|
|
23590
|
+
|
|
23591
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
23592
|
+
if (result == "abort") {
|
|
23593
|
+
this.edit_b(true);
|
|
23594
|
+
if (this.respingi_enabled) this.resp_b(true);
|
|
23595
|
+
return;
|
|
23596
|
+
}
|
|
23597
|
+
this.arrUsersSelected = arrAutori;
|
|
23598
|
+
this.nota = result;
|
|
23599
|
+
this.OKCOM();
|
|
23600
|
+
});
|
|
23601
|
+
} else {
|
|
23602
|
+
this.app_s.getState().wkf_doc_info.title = "Assegnazione";
|
|
23603
|
+
|
|
23604
|
+
this.app_s.getState().wkf_doc_info.comm_notrequired = this.transizione_info.comments_opt;
|
|
23605
|
+
|
|
23606
|
+
this.app_s.getState().wkf_doc_info.arrAutori = arrAutori.sort(
|
|
23607
|
+
(n1, n2) => {
|
|
23608
|
+
if (n1.nc > n2.nc) {
|
|
23609
|
+
return 1;
|
|
23605
23610
|
}
|
|
23606
|
-
|
|
23607
|
-
|
|
23608
|
-
|
|
23609
|
-
let dialogRef = this.m_dialog.open(win_assegna_v2, {
|
|
23610
|
-
disableClose: true,
|
|
23611
|
-
data: {
|
|
23612
|
-
commento_default: this.app_s.temp_var4,
|
|
23613
|
-
comm_notrequired: this.transizione_info.comments_opt,
|
|
23614
|
-
},
|
|
23615
|
-
});
|
|
23616
|
-
this.app_s.temp_var4 = "";
|
|
23617
|
-
dialogRef.afterClosed().subscribe((result) => {
|
|
23618
|
-
if (result == "" || result == null) {
|
|
23619
|
-
this.edit_b(true);
|
|
23620
|
-
if (this.respingi_enabled) this.resp_b(true);
|
|
23621
|
-
return;
|
|
23611
|
+
|
|
23612
|
+
if (n1.nc < n2.nc) {
|
|
23613
|
+
return -1;
|
|
23622
23614
|
}
|
|
23623
|
-
|
|
23624
|
-
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
|
|
23615
|
+
|
|
23616
|
+
return 0;
|
|
23617
|
+
}
|
|
23618
|
+
);
|
|
23619
|
+
if (this.app_s.temp_var4 == null) this.app_s.temp_var4 = "";
|
|
23620
|
+
|
|
23621
|
+
let dialogRef = this.m_dialog.open(win_assegna_v2, {
|
|
23622
|
+
disableClose: true,
|
|
23623
|
+
data: {
|
|
23624
|
+
commento_default: this.app_s.temp_var4,
|
|
23625
|
+
comm_notrequired: this.transizione_info.comments_opt,
|
|
23626
|
+
},
|
|
23627
|
+
});
|
|
23628
|
+
this.app_s.temp_var4 = "";
|
|
23629
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
23630
|
+
if (result == "" || result == null) {
|
|
23631
|
+
this.edit_b(true);
|
|
23632
|
+
if (this.respingi_enabled) this.resp_b(true);
|
|
23633
|
+
return;
|
|
23634
|
+
}
|
|
23635
|
+
this.arrUsersSelected = result.arrsel;
|
|
23636
|
+
this.nota = result.nota;
|
|
23637
|
+
this.OKCOM();
|
|
23638
|
+
});
|
|
23639
|
+
}*/
|
|
23628
23640
|
};
|
|
23629
23641
|
dati_aggiuntivi_v2.prototype.assegna_a = function () {
|
|
23630
23642
|
var _this = this;
|
|
23631
|
-
var arx = this.m_obj.assegnati_paralleli.split(
|
|
23643
|
+
var arx = this.m_obj.assegnati_paralleli.split(",");
|
|
23632
23644
|
var arrAutori = [];
|
|
23633
23645
|
for (var x = 0; x < arx.length; x++)
|
|
23634
23646
|
for (var y = 0; y < this.livs.length; y++) {
|
|
@@ -23647,14 +23659,18 @@
|
|
|
23647
23659
|
}
|
|
23648
23660
|
return 0;
|
|
23649
23661
|
});
|
|
23650
|
-
var dialogRef = this.m_dialog.open(win_assegna_a, {
|
|
23651
|
-
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
|
|
23662
|
+
var dialogRef = this.m_dialog.open(win_assegna_a, {
|
|
23663
|
+
disableClose: true,
|
|
23664
|
+
width: "800px",
|
|
23665
|
+
data: {
|
|
23666
|
+
title: this.tsr.instant("Conferma Assegnazione"),
|
|
23667
|
+
lbl: "",
|
|
23668
|
+
commento_default: "",
|
|
23669
|
+
comm_notrequired: "",
|
|
23655
23670
|
utenti: arrAutori,
|
|
23656
|
-
prendi_in_carico: this.m_obj.autori != this.app_s.user
|
|
23657
|
-
}
|
|
23671
|
+
prendi_in_carico: this.m_obj.autori != this.app_s.user,
|
|
23672
|
+
},
|
|
23673
|
+
});
|
|
23658
23674
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
23659
23675
|
if (result) {
|
|
23660
23676
|
if (result.arrsel.length == 0) {
|
|
@@ -23662,21 +23678,21 @@
|
|
|
23662
23678
|
return;
|
|
23663
23679
|
}
|
|
23664
23680
|
// console.log(' result.arrsel ', result.arrsel);
|
|
23665
|
-
var arr_new_arr_1 =
|
|
23666
|
-
_this.m_obj.autori =
|
|
23667
|
-
_this.m_obj.pers_int =
|
|
23681
|
+
var arr_new_arr_1 = "";
|
|
23682
|
+
_this.m_obj.autori = "";
|
|
23683
|
+
_this.m_obj.pers_int = "";
|
|
23668
23684
|
var b_edit_1 = false;
|
|
23669
23685
|
result.arrsel.map(function (v) {
|
|
23670
|
-
if (arr_new_arr_1 !=
|
|
23671
|
-
arr_new_arr_1 +=
|
|
23686
|
+
if (arr_new_arr_1 != "")
|
|
23687
|
+
arr_new_arr_1 += ",";
|
|
23672
23688
|
arr_new_arr_1 += v.username;
|
|
23673
23689
|
if (_this.m_obj.autori.indexOf(v.username) == -1) {
|
|
23674
|
-
console.log(
|
|
23675
|
-
if (_this.m_obj.autori !=
|
|
23676
|
-
_this.m_obj.autori = _this.m_obj.autori +
|
|
23690
|
+
console.log("VVV ", v);
|
|
23691
|
+
if (_this.m_obj.autori != "")
|
|
23692
|
+
_this.m_obj.autori = _this.m_obj.autori + ",";
|
|
23677
23693
|
_this.m_obj.autori = _this.m_obj.autori + v.username;
|
|
23678
|
-
if (_this.m_obj.pers_int !=
|
|
23679
|
-
_this.m_obj.pers_int = _this.m_obj.pers_int +
|
|
23694
|
+
if (_this.m_obj.pers_int != "")
|
|
23695
|
+
_this.m_obj.pers_int = _this.m_obj.pers_int + ",";
|
|
23680
23696
|
_this.m_obj.pers_int = _this.m_obj.pers_int + v.nc;
|
|
23681
23697
|
}
|
|
23682
23698
|
if (v.username == _this.app_info.user)
|
|
@@ -23684,12 +23700,12 @@
|
|
|
23684
23700
|
});
|
|
23685
23701
|
_this.in_carico = false;
|
|
23686
23702
|
if (_this.m_obj.autori != null)
|
|
23687
|
-
if (_this.m_obj.autori.split(
|
|
23703
|
+
if (_this.m_obj.autori.split(",").length != 1)
|
|
23688
23704
|
_this.in_carico = true;
|
|
23689
23705
|
console.log(_this.m_obj.autori, _this.in_carico);
|
|
23690
23706
|
_this.b_assengna_a = false;
|
|
23691
23707
|
if (_this.m_obj.assegnati_paralleli != null)
|
|
23692
|
-
if (_this.m_obj.assegnati_paralleli.split(
|
|
23708
|
+
if (_this.m_obj.assegnati_paralleli.split(",").length != 1)
|
|
23693
23709
|
if (_this.m_obj.assegnati_paralleli.indexOf(_this.app_s.user) > -1)
|
|
23694
23710
|
_this.b_assengna_a = true;
|
|
23695
23711
|
// console.log('this.m_obj.autori ',this.m_obj.autori, this.in_carico, this.b_assengna_a);
|
|
@@ -23698,19 +23714,34 @@
|
|
|
23698
23714
|
_this.update_status(b_edit_1, true, _this.in_carico, _this.b_assengna_a, 19);
|
|
23699
23715
|
var p = new QParam();
|
|
23700
23716
|
p.sql = "UPDATE_WKF_DOC_AUTHOR";
|
|
23701
|
-
p.values = [
|
|
23717
|
+
p.values = [
|
|
23718
|
+
_this.id_applicativo,
|
|
23719
|
+
_this.id_documento,
|
|
23720
|
+
_this.m_obj.autori,
|
|
23721
|
+
_this.m_obj.pers_int,
|
|
23722
|
+
];
|
|
23702
23723
|
p.types = ["string", "string", "string", "string"];
|
|
23703
23724
|
_this.m_dataService.doQuery(p).subscribe(function (data) {
|
|
23704
23725
|
if (data != null)
|
|
23705
23726
|
if (data.result_msg == "OK") {
|
|
23706
|
-
_this.m_dataService
|
|
23707
|
-
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
|
|
23727
|
+
_this.m_dataService
|
|
23728
|
+
.doQuery({
|
|
23729
|
+
sql: "INSERT_WORKFLOW_LOG",
|
|
23730
|
+
values: [
|
|
23731
|
+
_this.id_applicativo,
|
|
23732
|
+
_this.user_idp,
|
|
23733
|
+
"DOCUMENTO RIASSEGNATO",
|
|
23734
|
+
"DOCUMENTO RIASSEGNATO A: " + arr_new_arr_1,
|
|
23735
|
+
_this.id_documento,
|
|
23736
|
+
],
|
|
23737
|
+
types: ["string", "string", "string", "string", "string"],
|
|
23738
|
+
names: [],
|
|
23739
|
+
})
|
|
23740
|
+
.subscribe(function (data) { });
|
|
23741
|
+
if (result.op == "C") {
|
|
23711
23742
|
_this.update_status(true, _this.respingi_enabled, _this.in_carico, _this.b_assengna_a, 18);
|
|
23712
23743
|
}
|
|
23713
|
-
if (result.op ==
|
|
23744
|
+
if (result.op == "A") {
|
|
23714
23745
|
var oggetto_email = _this.app_info.descrizione_breve +
|
|
23715
23746
|
", Ti è stato assegnato il documento numero: " +
|
|
23716
23747
|
_this.m_obj.codice +
|
|
@@ -23730,57 +23761,61 @@
|
|
|
23730
23761
|
if (_this.app_info.body_riassegna != null)
|
|
23731
23762
|
if (_this.app_info.body_riassegna != "")
|
|
23732
23763
|
body_email = _this.app_info.body_riassegna;
|
|
23733
|
-
oggetto_email = oggetto_email
|
|
23734
|
-
|
|
23764
|
+
oggetto_email = oggetto_email
|
|
23765
|
+
.split("{{TRANSITION_DESCRI}}")
|
|
23766
|
+
.join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
|
|
23767
|
+
body_email = body_email
|
|
23768
|
+
.split("{{TRANSITION_DESCRI}}")
|
|
23769
|
+
.join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
|
|
23735
23770
|
/* for (let prop in this.m_obj)
|
|
23736
|
-
|
|
23737
|
-
|
|
23738
|
-
|
|
23739
|
-
|
|
23740
|
-
|
|
23741
|
-
|
|
23742
|
-
|
|
23743
|
-
|
|
23744
|
-
|
|
23745
|
-
|
|
23746
|
-
|
|
23747
|
-
|
|
23748
|
-
|
|
23749
|
-
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23753
|
-
|
|
23754
|
-
|
|
23755
|
-
|
|
23756
|
-
|
|
23757
|
-
|
|
23758
|
-
|
|
23759
|
-
|
|
23760
|
-
|
|
23761
|
-
|
|
23762
|
-
|
|
23763
|
-
|
|
23764
|
-
|
|
23765
|
-
|
|
23766
|
-
|
|
23767
|
-
|
|
23768
|
-
|
|
23769
|
-
|
|
23770
|
-
|
|
23771
|
-
|
|
23772
|
-
|
|
23773
|
-
|
|
23774
|
-
|
|
23775
|
-
|
|
23776
|
-
|
|
23777
|
-
|
|
23778
|
-
|
|
23779
|
-
|
|
23780
|
-
|
|
23781
|
-
|
|
23782
|
-
|
|
23783
|
-
|
|
23771
|
+
if (this.m_obj[prop] != null) {
|
|
23772
|
+
|
|
23773
|
+
if (
|
|
23774
|
+
Object.prototype.toString.call(this.m_obj[prop]) ===
|
|
23775
|
+
"[object Date]"
|
|
23776
|
+
) {
|
|
23777
|
+
oggetto_email = oggetto_email
|
|
23778
|
+
.split("{{" + prop + "}}")
|
|
23779
|
+
.join(this.uti_s.date2String(this.m_obj[prop]));
|
|
23780
|
+
} else if (
|
|
23781
|
+
("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
|
|
23782
|
+
)
|
|
23783
|
+
oggetto_email = oggetto_email
|
|
23784
|
+
.split("{{" + prop + "}}")
|
|
23785
|
+
.join(this.m_obj[prop]);
|
|
23786
|
+
else
|
|
23787
|
+
oggetto_email = oggetto_email
|
|
23788
|
+
.split("{{" + prop + "}}")
|
|
23789
|
+
.join(
|
|
23790
|
+
this.uti_s.date2String(
|
|
23791
|
+
this.uti_s.string2date(this.m_obj[prop], 2)
|
|
23792
|
+
)
|
|
23793
|
+
);
|
|
23794
|
+
|
|
23795
|
+
|
|
23796
|
+
|
|
23797
|
+
if (
|
|
23798
|
+
Object.prototype.toString.call(this.m_obj[prop]) ===
|
|
23799
|
+
"[object Date]"
|
|
23800
|
+
) {
|
|
23801
|
+
body_email = body_email
|
|
23802
|
+
.split("{{" + prop + "}}")
|
|
23803
|
+
.join(this.uti_s.date2String(this.m_obj[prop]));
|
|
23804
|
+
} else if (
|
|
23805
|
+
("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
|
|
23806
|
+
)
|
|
23807
|
+
body_email = body_email
|
|
23808
|
+
.split("{{" + prop + "}}")
|
|
23809
|
+
.join(this.m_obj[prop]);
|
|
23810
|
+
else
|
|
23811
|
+
body_email = body_email
|
|
23812
|
+
.split("{{" + prop + "}}")
|
|
23813
|
+
.join(
|
|
23814
|
+
this.uti_s.date2String(
|
|
23815
|
+
this.uti_s.string2date(this.m_obj[prop], 2)
|
|
23816
|
+
)
|
|
23817
|
+
);
|
|
23818
|
+
}*/
|
|
23784
23819
|
_this.sendEMail_ex(_this.user_idp, arr_new_arr_1, oggetto_email, body_email, _this.id_applicativo, _this.id_documento, _this.app_info.COMPANY_SITE_ROOT +
|
|
23785
23820
|
"#/" +
|
|
23786
23821
|
_this.app_info.modulo_swf +
|
|
@@ -23788,40 +23823,41 @@
|
|
|
23788
23823
|
_this.id_applicativo +
|
|
23789
23824
|
"/" +
|
|
23790
23825
|
_this.id_documento +
|
|
23791
|
-
"/edit", _this.m_obj.codice, "", true, "", false,
|
|
23826
|
+
"/edit", _this.m_obj.codice, "", true, "", false, "");
|
|
23792
23827
|
}
|
|
23793
23828
|
/* else
|
|
23794
|
-
|
|
23795
|
-
|
|
23796
|
-
|
|
23797
|
-
|
|
23798
|
-
|
|
23799
|
-
|
|
23800
|
-
|
|
23801
|
-
|
|
23802
|
-
|
|
23803
|
-
|
|
23804
|
-
|
|
23805
|
-
|
|
23806
|
-
|
|
23807
|
-
|
|
23808
|
-
|
|
23809
|
-
|
|
23810
|
-
|
|
23811
|
-
|
|
23812
|
-
|
|
23813
|
-
|
|
23814
|
-
|
|
23815
|
-
|
|
23816
|
-
|
|
23817
|
-
|
|
23818
|
-
|
|
23819
|
-
|
|
23820
|
-
|
|
23821
|
-
|
|
23822
|
-
|
|
23823
|
-
|
|
23824
|
-
|
|
23829
|
+
this.sendEMail_ex(
|
|
23830
|
+
this.user_idp,
|
|
23831
|
+
arr_new_arr,
|
|
23832
|
+
this.app_info.descrizione_breve +
|
|
23833
|
+
", Ti è stato assegnato il documento numero: " +
|
|
23834
|
+
this.m_obj.codice +
|
|
23835
|
+
" " +
|
|
23836
|
+
this.getTitle() +
|
|
23837
|
+
" - " +
|
|
23838
|
+
this.getLvlDescri(String(this.m_liv), this.m_statox),
|
|
23839
|
+
"<br>Attività:" +
|
|
23840
|
+
this.getLvlDescri(String(this.m_liv), this.m_statox) +
|
|
23841
|
+
"<br>" +
|
|
23842
|
+
this.m_statox +
|
|
23843
|
+
"<br>" +
|
|
23844
|
+
this.getDescri(),
|
|
23845
|
+
this.id_applicativo,
|
|
23846
|
+
this.id_documento,
|
|
23847
|
+
this.app_info.COMPANY_SITE_ROOT +
|
|
23848
|
+
"#/" +
|
|
23849
|
+
this.app_info.modulo_swf +
|
|
23850
|
+
"/" +
|
|
23851
|
+
this.id_applicativo +
|
|
23852
|
+
"/" +
|
|
23853
|
+
this.id_documento +
|
|
23854
|
+
"/edit",
|
|
23855
|
+
this.m_obj.codice,
|
|
23856
|
+
"",
|
|
23857
|
+
true,
|
|
23858
|
+
"",false
|
|
23859
|
+
);*/
|
|
23860
|
+
}
|
|
23825
23861
|
});
|
|
23826
23862
|
}
|
|
23827
23863
|
});
|
|
@@ -23833,11 +23869,12 @@
|
|
|
23833
23869
|
if (this.app_s.dev_mode != null)
|
|
23834
23870
|
if (this.app_s.dev_mode == "1")
|
|
23835
23871
|
dev_mode = true;
|
|
23836
|
-
console.log(
|
|
23872
|
+
console.log("exec_wkf ", arrdest, assegnati_paralleli);
|
|
23837
23873
|
if (crea_ver == null)
|
|
23838
23874
|
crea_ver = false;
|
|
23839
23875
|
this.dialogRef_ww = this.m_dialog.open(fh_win_wait, {
|
|
23840
|
-
disableClose: true,
|
|
23876
|
+
disableClose: true,
|
|
23877
|
+
data: { label: this.tsr.instant("Attendere") },
|
|
23841
23878
|
});
|
|
23842
23879
|
this.ttw = 0;
|
|
23843
23880
|
if (assegnati_paralleli == null)
|
|
@@ -23845,15 +23882,17 @@
|
|
|
23845
23882
|
var fs = new FSInput();
|
|
23846
23883
|
fs.command = "exec_app";
|
|
23847
23884
|
if (!crea_ver)
|
|
23848
|
-
fs.p1 =
|
|
23885
|
+
fs.p1 = "exec_wkf";
|
|
23849
23886
|
else
|
|
23850
|
-
fs.p1 =
|
|
23887
|
+
fs.p1 = "create_ver";
|
|
23851
23888
|
var uiid_op = this.uti_s.newGuid();
|
|
23852
23889
|
fs.p2 = uiid_op;
|
|
23853
23890
|
var p = new QParam();
|
|
23854
23891
|
p.sql = "INSERT_WKF_OP";
|
|
23855
23892
|
if (!crea_ver)
|
|
23856
|
-
p.values = [
|
|
23893
|
+
p.values = [
|
|
23894
|
+
uiid_op,
|
|
23895
|
+
JSON.stringify({
|
|
23857
23896
|
transizione: trans,
|
|
23858
23897
|
destinatari: arrdest,
|
|
23859
23898
|
commento: comm,
|
|
@@ -23863,16 +23902,25 @@
|
|
|
23863
23902
|
username: this.app_s.user,
|
|
23864
23903
|
title: this.getTitle().split('"').join("_doppiap_"),
|
|
23865
23904
|
descri: this.getDescri().split('"').join("_doppiap_"),
|
|
23866
|
-
dev_mode: dev_mode ? 1 : 0
|
|
23867
|
-
})
|
|
23905
|
+
dev_mode: dev_mode ? 1 : 0,
|
|
23906
|
+
}),
|
|
23907
|
+
];
|
|
23868
23908
|
else
|
|
23869
|
-
p.values = [
|
|
23870
|
-
|
|
23909
|
+
p.values = [
|
|
23910
|
+
uiid_op,
|
|
23911
|
+
JSON.stringify({
|
|
23912
|
+
transizione: {
|
|
23913
|
+
uiid_wkf: trans.uiid_wkf,
|
|
23914
|
+
uiid: trans.uiid,
|
|
23915
|
+
step_d: trans.step_d,
|
|
23916
|
+
step_o: trans.step_o,
|
|
23917
|
+
},
|
|
23871
23918
|
commento: comm,
|
|
23872
23919
|
id_applicazione: this.id_applicativo,
|
|
23873
23920
|
id_documento: this.id_documento,
|
|
23874
|
-
username: this.app_s.user
|
|
23875
|
-
})
|
|
23921
|
+
username: this.app_s.user,
|
|
23922
|
+
}),
|
|
23923
|
+
];
|
|
23876
23924
|
p.types = ["string", "string"];
|
|
23877
23925
|
this.m_dataService.doQuery(p).subscribe(function (data) {
|
|
23878
23926
|
_this.reset_updw();
|
|
@@ -23895,7 +23943,9 @@
|
|
|
23895
23943
|
if (this.dialogRef_ww != null)
|
|
23896
23944
|
if (this.dialogRef_ww.componentInstance != null)
|
|
23897
23945
|
this.dialogRef_ww.componentInstance.update_progess(this.ttw);
|
|
23898
|
-
setTimeout(function () {
|
|
23946
|
+
setTimeout(function () {
|
|
23947
|
+
_this.reset_updw();
|
|
23948
|
+
}, 800);
|
|
23899
23949
|
};
|
|
23900
23950
|
dati_aggiuntivi_v2.prototype.back = function (edit_button) {
|
|
23901
23951
|
var _this = this;
|
|
@@ -23903,24 +23953,25 @@
|
|
|
23903
23953
|
console.log(arrd);
|
|
23904
23954
|
var flt = [];
|
|
23905
23955
|
for (var i = 0; i < arrd.length; i++) {
|
|
23906
|
-
if (arrd[i].val ==
|
|
23907
|
-
arrd[i].val =
|
|
23908
|
-
if (arrd[i].oldVal ==
|
|
23909
|
-
arrd[i].oldVal =
|
|
23910
|
-
if (arrd[i].val ==
|
|
23911
|
-
arrd[i].val =
|
|
23912
|
-
if (arrd[i].oldVal ==
|
|
23913
|
-
arrd[i].oldVal =
|
|
23956
|
+
if (arrd[i].val == "-1")
|
|
23957
|
+
arrd[i].val = "";
|
|
23958
|
+
if (arrd[i].oldVal == "-1")
|
|
23959
|
+
arrd[i].oldVal = "";
|
|
23960
|
+
if (arrd[i].val == " ")
|
|
23961
|
+
arrd[i].val = "";
|
|
23962
|
+
if (arrd[i].oldVal == " ")
|
|
23963
|
+
arrd[i].oldVal = "";
|
|
23914
23964
|
if (arrd[i].val instanceof Number && arrd[i].oldVal instanceof String) {
|
|
23915
|
-
arrd[i].oldVal = Number(arrd[i].oldVal.split(
|
|
23965
|
+
arrd[i].oldVal = Number(arrd[i].oldVal.split(",").join("."));
|
|
23916
23966
|
}
|
|
23917
23967
|
}
|
|
23918
23968
|
for (var i = 0; i < arrd.length; i++)
|
|
23919
|
-
if (!(arrd[i].op ==
|
|
23920
|
-
|
|
23969
|
+
if (!(arrd[i].op == "update" &&
|
|
23970
|
+
(arrd[i].val == "date" || arrd[i].val == "string")))
|
|
23971
|
+
if (!(arrd[i].op == "add" && arrd[i].val == null && arrd[i].oldVal == ""))
|
|
23921
23972
|
if (!(arrd[i].val == arrd[i].oldVal))
|
|
23922
|
-
if (!(arrd[i].val ==
|
|
23923
|
-
if (!(arrd[i].val ==
|
|
23973
|
+
if (!(arrd[i].val == "" && arrd[i].oldVal == "0"))
|
|
23974
|
+
if (!(arrd[i].val == "0" && arrd[i].oldVal == null))
|
|
23924
23975
|
if (!(arrd[i].val instanceof Date))
|
|
23925
23976
|
flt.push(arrd[i]);
|
|
23926
23977
|
for (var i = 0; i < arrd.length; i++)
|
|
@@ -23955,7 +24006,7 @@
|
|
|
23955
24006
|
if (this.app_s.dev_mode == "1")
|
|
23956
24007
|
dev_mode = true;
|
|
23957
24008
|
var obj_r = {
|
|
23958
|
-
destinatari: to.split(
|
|
24009
|
+
destinatari: to.split(","),
|
|
23959
24010
|
commento: commento,
|
|
23960
24011
|
id_applicazione: idapp,
|
|
23961
24012
|
id_documento: iddoc,
|
|
@@ -23966,13 +24017,13 @@
|
|
|
23966
24017
|
};
|
|
23967
24018
|
var fs = new FSInput();
|
|
23968
24019
|
fs.command = "exec_app";
|
|
23969
|
-
fs.p1 =
|
|
24020
|
+
fs.p1 = "send_email";
|
|
23970
24021
|
var uiid_op = this.uti_s.newGuid();
|
|
23971
24022
|
fs.p2 = uiid_op;
|
|
23972
24023
|
var p = new QParam();
|
|
23973
24024
|
p.sql = "INSERT_WKF_OP";
|
|
23974
24025
|
p.values = [uiid_op, JSON.stringify(obj_r)];
|
|
23975
|
-
p.types = [
|
|
24026
|
+
p.types = ["string", "string"];
|
|
23976
24027
|
this.m_dataService.doQuery(p).subscribe(function (data) {
|
|
23977
24028
|
_this.m_fileservice.doQuery(fs).subscribe(function (data) {
|
|
23978
24029
|
if (b_exit)
|
|
@@ -24045,13 +24096,13 @@
|
|
|
24045
24096
|
var _this = this;
|
|
24046
24097
|
if (inser_c === void 0) { inser_c = false; }
|
|
24047
24098
|
if (edit_c === void 0) { edit_c = true; }
|
|
24048
|
-
console.log(
|
|
24099
|
+
console.log("inser_c = false,edit_c=true ", inser_c, edit_c);
|
|
24049
24100
|
var s_h = this.app_s.getState().body_h - 40 + "px";
|
|
24050
24101
|
var dialogRef = this.m_dialog.open(win_log_v2, {
|
|
24051
24102
|
disableClose: true,
|
|
24052
24103
|
width: "95%",
|
|
24053
24104
|
height: s_h,
|
|
24054
|
-
data: { edit_c: edit_c }
|
|
24105
|
+
data: { edit_c: edit_c },
|
|
24055
24106
|
});
|
|
24056
24107
|
setTimeout(function () {
|
|
24057
24108
|
dialogRef.componentInstance.subject =
|
|
@@ -24074,15 +24125,17 @@
|
|
|
24074
24125
|
_this.id_documento +
|
|
24075
24126
|
"/edit";
|
|
24076
24127
|
dialogRef.componentInstance.codice_doc = _this.m_obj.codice;
|
|
24077
|
-
dialogRef.componentInstance.notifica_commenti =
|
|
24078
|
-
|
|
24128
|
+
dialogRef.componentInstance.notifica_commenti =
|
|
24129
|
+
_this.app_info.notifica_commenti;
|
|
24130
|
+
dialogRef.componentInstance.notifica_commenti_obbl =
|
|
24131
|
+
_this.app_info.notifica_commenti_obbl;
|
|
24079
24132
|
dialogRef.componentInstance.commenti_insert = inser_c;
|
|
24080
24133
|
dialogRef.componentInstance.init_v();
|
|
24081
24134
|
});
|
|
24082
24135
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
24083
24136
|
if (result == null)
|
|
24084
|
-
if (result ==
|
|
24085
|
-
console.log(
|
|
24137
|
+
if (result == "i") {
|
|
24138
|
+
console.log("inserito commento");
|
|
24086
24139
|
em.emit();
|
|
24087
24140
|
}
|
|
24088
24141
|
_this.r_count();
|
|
@@ -24115,15 +24168,17 @@
|
|
|
24115
24168
|
_this.id_documento +
|
|
24116
24169
|
"/edit";
|
|
24117
24170
|
dialogRef.componentInstance.codice_doc = _this.m_obj.codice;
|
|
24118
|
-
dialogRef.componentInstance.notifica_commenti =
|
|
24119
|
-
|
|
24171
|
+
dialogRef.componentInstance.notifica_commenti =
|
|
24172
|
+
_this.app_info.notifica_commenti;
|
|
24173
|
+
dialogRef.componentInstance.notifica_commenti_obbl =
|
|
24174
|
+
_this.app_info.notifica_commenti_obbl;
|
|
24120
24175
|
dialogRef.componentInstance.init_v();
|
|
24121
24176
|
});
|
|
24122
24177
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
24123
24178
|
if (result != null)
|
|
24124
|
-
if (result ==
|
|
24179
|
+
if (result == "i") {
|
|
24125
24180
|
em.emit();
|
|
24126
|
-
console.log(
|
|
24181
|
+
console.log("emetto insert");
|
|
24127
24182
|
}
|
|
24128
24183
|
_this.r_count();
|
|
24129
24184
|
});
|
|
@@ -24132,10 +24187,15 @@
|
|
|
24132
24187
|
var _this = this;
|
|
24133
24188
|
if (sovra_path === void 0) { sovra_path = ""; }
|
|
24134
24189
|
if (admin_role === void 0) { admin_role = "[ZZZ_DIS_CC]"; }
|
|
24135
|
-
console.log(
|
|
24190
|
+
console.log("open_upload ", sovra_path, admin_role);
|
|
24136
24191
|
var dialogRef = this.m_dialog.open(win_uploads_v2, {
|
|
24137
24192
|
disableClose: true,
|
|
24138
|
-
width: "90%",
|
|
24193
|
+
width: "90%",
|
|
24194
|
+
data: {
|
|
24195
|
+
admin_role: admin_role,
|
|
24196
|
+
App: this.id_applicativo,
|
|
24197
|
+
K: this.id_documento,
|
|
24198
|
+
},
|
|
24139
24199
|
});
|
|
24140
24200
|
setTimeout(function () {
|
|
24141
24201
|
dialogRef.componentInstance.sovrascrivi_path = sovra_path;
|
|
@@ -24159,10 +24219,20 @@
|
|
|
24159
24219
|
this.m_wkf.doQuery(p).subscribe(function (data) {
|
|
24160
24220
|
if (data != null)
|
|
24161
24221
|
if (data.result_msg == "OK") {
|
|
24162
|
-
_this.m_dataService
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24222
|
+
_this.m_dataService
|
|
24223
|
+
.doQuery({
|
|
24224
|
+
sql: "INSERT_WORKFLOW_LOG",
|
|
24225
|
+
values: [
|
|
24226
|
+
_this.id_applicativo,
|
|
24227
|
+
_this.user_idp,
|
|
24228
|
+
"INSERIMENTO",
|
|
24229
|
+
"INSERIMENTO DOCUMENTO",
|
|
24230
|
+
_this.id_documento,
|
|
24231
|
+
],
|
|
24232
|
+
types: ["string", "string", "string", "string", "string"],
|
|
24233
|
+
names: [],
|
|
24234
|
+
})
|
|
24235
|
+
.subscribe(function (data) { });
|
|
24166
24236
|
_this.save_agg();
|
|
24167
24237
|
}
|
|
24168
24238
|
});
|
|
@@ -24209,9 +24279,9 @@
|
|
|
24209
24279
|
arr[i].values = "dbnull";
|
|
24210
24280
|
}
|
|
24211
24281
|
if (arr[i].types == "datetime") {
|
|
24212
|
-
console.log(
|
|
24282
|
+
console.log("typeof ", typeof arr[i].values, arr[i].values);
|
|
24213
24283
|
arr[i].values = this.uti_s.sql_date_time(arr[i].values);
|
|
24214
|
-
console.log(
|
|
24284
|
+
console.log("arr[i].values ", arr[i].values);
|
|
24215
24285
|
if (arr[i].values.split("0").join("") == "NaN-NaN-NaN NaN:NaN")
|
|
24216
24286
|
arr[i].values = "dbnull";
|
|
24217
24287
|
}
|
|
@@ -24266,7 +24336,9 @@
|
|
|
24266
24336
|
dati_aggiuntivi_v2.prototype.load_document = function () {
|
|
24267
24337
|
var _this = this;
|
|
24268
24338
|
if (this.app_info == null) {
|
|
24269
|
-
setTimeout(function () {
|
|
24339
|
+
setTimeout(function () {
|
|
24340
|
+
_this.load_document();
|
|
24341
|
+
}, 200);
|
|
24270
24342
|
return;
|
|
24271
24343
|
}
|
|
24272
24344
|
var p = new QParam();
|
|
@@ -24292,67 +24364,89 @@
|
|
|
24292
24364
|
};
|
|
24293
24365
|
dati_aggiuntivi_v2.prototype.ok_load_document = function (o) {
|
|
24294
24366
|
var _this = this;
|
|
24295
|
-
this.m_obj =
|
|
24367
|
+
this.m_obj = JSON.parse(JSON.stringify(o));
|
|
24296
24368
|
if (this.m_obj.assegnati_paralleli != null)
|
|
24297
|
-
if (this.m_obj.assegnati_paralleli.split(
|
|
24369
|
+
if (this.m_obj.assegnati_paralleli.split(",").length != 1)
|
|
24298
24370
|
if (this.m_obj.assegnati_paralleli.indexOf(this.app_s.user) > -1)
|
|
24299
24371
|
this.b_assengna_a = true;
|
|
24300
24372
|
this.in_carico = false;
|
|
24301
24373
|
if (this.b_assengna_a) {
|
|
24302
24374
|
if (this.m_obj.autori == null)
|
|
24303
24375
|
this.in_carico = true;
|
|
24304
|
-
else if (this.m_obj.autori ==
|
|
24376
|
+
else if (this.m_obj.autori == "")
|
|
24305
24377
|
this.in_carico = true;
|
|
24306
|
-
else if (this.m_obj.autori.split(
|
|
24378
|
+
else if (this.m_obj.autori.split(",").length != 1)
|
|
24307
24379
|
this.in_carico = true;
|
|
24308
24380
|
}
|
|
24309
24381
|
this.update_status(false, null, this.b_assengna_a && this.in_carico, this.b_assengna_a, 14);
|
|
24310
24382
|
this.save_to_app_state();
|
|
24311
24383
|
var p = new QParam();
|
|
24312
24384
|
p.sql = "SELECT_WLIVELLIV2_2";
|
|
24313
|
-
p.types = [
|
|
24385
|
+
p.types = ["string"];
|
|
24314
24386
|
p.values = [this.id_applicativo];
|
|
24315
24387
|
this.m_dataService.doQuery(p).subscribe(function (data) {
|
|
24316
24388
|
if (data != null)
|
|
24317
24389
|
if (data.result_msg == "OK") {
|
|
24318
|
-
console.log(
|
|
24390
|
+
console.log("end SELECT_WLIVELLIV2_2", new Date());
|
|
24319
24391
|
if (_this.override_livs != null)
|
|
24320
24392
|
if (data.result_data != null)
|
|
24321
24393
|
for (var y = 0; y < _this.override_livs.length; y++)
|
|
24322
24394
|
for (var i = 0; i < data.result_data.length; i++)
|
|
24323
24395
|
if (data.result_data[i].id_Applicativo != null)
|
|
24324
|
-
if (data.result_data[i].id_Applicativo ==
|
|
24396
|
+
if (data.result_data[i].id_Applicativo ==
|
|
24397
|
+
_this.override_livs[y].id_Applicativo) {
|
|
24325
24398
|
data.result_data[i].idp = _this.override_livs[y].idp;
|
|
24326
|
-
data.result_data[i].context =
|
|
24399
|
+
data.result_data[i].context =
|
|
24400
|
+
_this.override_livs[y].context;
|
|
24327
24401
|
data.result_data[i].nc = _this.override_livs[y].nc;
|
|
24328
24402
|
}
|
|
24329
24403
|
data.result_data.map(function (v) {
|
|
24330
24404
|
if (v.username == null)
|
|
24331
|
-
v.username =
|
|
24405
|
+
v.username = "SYSTEM";
|
|
24332
24406
|
});
|
|
24333
24407
|
var p_1 = new QParam();
|
|
24334
24408
|
p_1.sql = "SELECT_WKF_VARIABILES_V2";
|
|
24335
|
-
p_1.types = [
|
|
24409
|
+
p_1.types = ["string"];
|
|
24336
24410
|
p_1.values = [_this.id_documento];
|
|
24337
24411
|
_this.m_dataService.doQuery(p_1).subscribe(function (datav) {
|
|
24338
24412
|
if (datav != null)
|
|
24339
24413
|
if (datav.result_msg == "OK") {
|
|
24414
|
+
datav.result_data.push({
|
|
24415
|
+
k: "*CURRENT_USER",
|
|
24416
|
+
v: _this.app_s.user,
|
|
24417
|
+
nc: _this.app_s.user_surname + " " + _this.app_s.user_name,
|
|
24418
|
+
});
|
|
24419
|
+
if (_this.m_obj.stato == null || _this.m_obj.stato <= 10)
|
|
24420
|
+
datav.result_data.push({
|
|
24421
|
+
k: "*ALLUSERS",
|
|
24422
|
+
v: _this.app_s.user,
|
|
24423
|
+
nc: _this.app_s.user_surname + " " + _this.app_s.user_name,
|
|
24424
|
+
});
|
|
24425
|
+
else
|
|
24426
|
+
datav.result_data.map(function (v1) {
|
|
24427
|
+
console.log('v1 ', v1);
|
|
24428
|
+
if ("REQUESTER" == v1.k.split("CREATOR").join("REQUESTER"))
|
|
24429
|
+
datav.result_data.push({
|
|
24430
|
+
k: "*ALLUSERS",
|
|
24431
|
+
v: v1.v,
|
|
24432
|
+
nc: v1.nc,
|
|
24433
|
+
});
|
|
24434
|
+
return true;
|
|
24435
|
+
});
|
|
24340
24436
|
data.result_data.map(function (v) {
|
|
24341
|
-
if (v.value.indexOf(
|
|
24437
|
+
if (v.value.indexOf("*") == 0) {
|
|
24342
24438
|
v.context = _this.m_obj.canale;
|
|
24343
|
-
v.description =
|
|
24344
|
-
v.name =
|
|
24345
|
-
if (_this.m_obj.stato == null || _this.m_obj.stato <= 10)
|
|
24346
|
-
datav.result_data.push({ k: '*ALLUSERS', v: _this.app_s.user, nc: _this.app_s.user_surname + ' ' + _this.app_s.user_name });
|
|
24347
|
-
datav.result_data.push({
|
|
24348
|
-
k: '*CURRENT_USER',
|
|
24349
|
-
v: _this.app_s.user,
|
|
24350
|
-
nc: _this.app_s.user_surname + ' ' + _this.app_s.user_name
|
|
24351
|
-
});
|
|
24439
|
+
v.description = "";
|
|
24440
|
+
v.name = "";
|
|
24352
24441
|
datav.result_data.map(function (v1) {
|
|
24353
|
-
if (v.value.split(
|
|
24442
|
+
if (v.value.split("CREATOR").join("REQUESTER") ==
|
|
24443
|
+
v1.k.split("CREATOR").join("REQUESTER")) {
|
|
24354
24444
|
if (_this.m_obj.stato != null || _this.m_obj.stato > 10)
|
|
24355
|
-
datav.result_data.push({
|
|
24445
|
+
datav.result_data.push({
|
|
24446
|
+
k: "*ALLUSERS",
|
|
24447
|
+
v: v1.v,
|
|
24448
|
+
nc: v1.nc,
|
|
24449
|
+
});
|
|
24356
24450
|
v.username = v1.v;
|
|
24357
24451
|
v.nc = v1.nc;
|
|
24358
24452
|
v.ncx = v1.nc;
|
|
@@ -24360,6 +24454,7 @@
|
|
|
24360
24454
|
});
|
|
24361
24455
|
}
|
|
24362
24456
|
});
|
|
24457
|
+
console.log("Var speciali ", datav.result_data);
|
|
24363
24458
|
_this.ok_livelli_doc(data.result_data);
|
|
24364
24459
|
}
|
|
24365
24460
|
});
|
|
@@ -24425,7 +24520,7 @@
|
|
|
24425
24520
|
dati_aggiuntivi_v2.prototype.over_canale_iniz = function () {
|
|
24426
24521
|
if (this.forza_canale == null)
|
|
24427
24522
|
return;
|
|
24428
|
-
if (this.forza_canale ==
|
|
24523
|
+
if (this.forza_canale == "")
|
|
24429
24524
|
return;
|
|
24430
24525
|
var min_liv = 0;
|
|
24431
24526
|
for (var i = 0; i < this.livs.length; i++)
|
|
@@ -24441,20 +24536,20 @@
|
|
|
24441
24536
|
};
|
|
24442
24537
|
dati_aggiuntivi_v2.prototype.ck_canale_multiplo = function () {
|
|
24443
24538
|
var _this = this;
|
|
24444
|
-
console.log(
|
|
24539
|
+
console.log("ck_canale_multiplo ", this.livs);
|
|
24445
24540
|
var min_liv = 0;
|
|
24446
24541
|
for (var i = 0; i < this.livs.length; i++)
|
|
24447
24542
|
if (this.livs[i].step < min_liv || min_liv == 0) {
|
|
24448
24543
|
this.clevel = this.livs[i];
|
|
24449
24544
|
min_liv = this.livs[i].step;
|
|
24450
24545
|
}
|
|
24451
|
-
console.log(
|
|
24546
|
+
console.log("min_liv ", min_liv);
|
|
24452
24547
|
var sv = [];
|
|
24453
24548
|
for (var i = 0; i < this.livs.length; i++)
|
|
24454
24549
|
if (this.livs[i].step == min_liv &&
|
|
24455
24550
|
this.app_s.getState().wkf_doc_info.curr_user.toUpperCase() ==
|
|
24456
24551
|
this.livs[i].username.toUpperCase()) {
|
|
24457
|
-
console.log(
|
|
24552
|
+
console.log(" this.livs[i].step ", this.livs[i].step, this.livs[i].username.toUpperCase(), this.livs[i].context);
|
|
24458
24553
|
var b_found = false;
|
|
24459
24554
|
for (var y = 0; y < this.livs.length; y++)
|
|
24460
24555
|
if (this.livs[y].context == this.livs[i].context) {
|
|
@@ -24487,7 +24582,7 @@
|
|
|
24487
24582
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
24488
24583
|
if (result == null)
|
|
24489
24584
|
return;
|
|
24490
|
-
if (result ==
|
|
24585
|
+
if (result == "")
|
|
24491
24586
|
return;
|
|
24492
24587
|
_this.c_canale = result;
|
|
24493
24588
|
_this.create_new_document();
|
|
@@ -24502,7 +24597,7 @@
|
|
|
24502
24597
|
};
|
|
24503
24598
|
dati_aggiuntivi_v2.prototype.open_info = function () {
|
|
24504
24599
|
var _this = this;
|
|
24505
|
-
this.s_uto =
|
|
24600
|
+
this.s_uto = "";
|
|
24506
24601
|
var aut = this.m_obj.autori.split(",");
|
|
24507
24602
|
for (var i = 0; i < aut.length; i++)
|
|
24508
24603
|
for (var y = 0; y < this.livs.length; y++)
|
|
@@ -24514,9 +24609,10 @@
|
|
|
24514
24609
|
}
|
|
24515
24610
|
this.app_s.getState().wkf_doc_info.in_carico_a = this.s_uto;
|
|
24516
24611
|
this.m_obj.s_uto = this.s_uto;
|
|
24517
|
-
console.log(
|
|
24612
|
+
console.log("this.m_obj ", this.m_obj);
|
|
24518
24613
|
var dialogRef = this.m_dialog.open(win_info_doc_v2, {
|
|
24519
|
-
disableClose: true,
|
|
24614
|
+
disableClose: true,
|
|
24615
|
+
data: this.m_obj,
|
|
24520
24616
|
});
|
|
24521
24617
|
setTimeout(function () {
|
|
24522
24618
|
dialogRef.componentInstance.hide_richiedente = _this.hide_richiedente;
|
|
@@ -24658,27 +24754,33 @@
|
|
|
24658
24754
|
if (data != null)
|
|
24659
24755
|
if (data.result_msg == "OK") {
|
|
24660
24756
|
if (b_send_email && s_notif != "") {
|
|
24661
|
-
oggetto_email =
|
|
24662
|
-
|
|
24663
|
-
|
|
24664
|
-
|
|
24665
|
-
|
|
24666
|
-
|
|
24667
|
-
|
|
24668
|
-
|
|
24669
|
-
|
|
24670
|
-
"<br>" +
|
|
24671
|
-
|
|
24672
|
-
|
|
24673
|
-
|
|
24757
|
+
oggetto_email =
|
|
24758
|
+
_this.app_info.descrizione_breve +
|
|
24759
|
+
", Ti è stato assegnato il documento numero: " +
|
|
24760
|
+
_this.m_obj.codice +
|
|
24761
|
+
" " +
|
|
24762
|
+
_this.getTitle() +
|
|
24763
|
+
" - " +
|
|
24764
|
+
_this.getLvlDescri(String(_this.m_liv), _this.m_statox);
|
|
24765
|
+
body_email =
|
|
24766
|
+
"<br>Attività:" +
|
|
24767
|
+
_this.getLvlDescri(String(_this.m_liv), _this.m_statox) +
|
|
24768
|
+
"<br>" +
|
|
24769
|
+
_this.m_statox +
|
|
24770
|
+
"<br>" +
|
|
24771
|
+
_this.getDescri();
|
|
24674
24772
|
if (_this.app_info.subject_riassegna != null)
|
|
24675
24773
|
if (_this.app_info.subject_riassegna != "")
|
|
24676
24774
|
oggetto_email = _this.app_info.subject_riassegna;
|
|
24677
24775
|
if (_this.app_info.body_riassegna != null)
|
|
24678
24776
|
if (_this.app_info.body_riassegna != "")
|
|
24679
24777
|
body_email = _this.app_info.body_riassegna;
|
|
24680
|
-
oggetto_email = oggetto_email
|
|
24681
|
-
|
|
24778
|
+
oggetto_email = oggetto_email
|
|
24779
|
+
.split("{{TRANSITION_DESCRI}}")
|
|
24780
|
+
.join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
|
|
24781
|
+
body_email = body_email
|
|
24782
|
+
.split("{{TRANSITION_DESCRI}}")
|
|
24783
|
+
.join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
|
|
24682
24784
|
_this.sendEMail_ex(_this.user_idp, s_notif, oggetto_email, body_email, _this.id_applicativo, _this.id_documento, _this.app_s.COMPANY_SITE_ROOT +
|
|
24683
24785
|
"#/" +
|
|
24684
24786
|
_this.app_info.modulo_swf +
|
|
@@ -24686,7 +24788,7 @@
|
|
|
24686
24788
|
_this.id_applicativo +
|
|
24687
24789
|
"/" +
|
|
24688
24790
|
_this.id_documento +
|
|
24689
|
-
"/edit", _this.m_obj.codice, "", true, "", true,
|
|
24791
|
+
"/edit", _this.m_obj.codice, "", true, "", true, "");
|
|
24690
24792
|
}
|
|
24691
24793
|
else
|
|
24692
24794
|
_this.goto_edit_doc();
|
|
@@ -24756,8 +24858,12 @@
|
|
|
24756
24858
|
this.btnApprova_label = this.tsr.instant("APPROVA");
|
|
24757
24859
|
this.btnAssegna_label = this.tsr.instant("Assegna");
|
|
24758
24860
|
this.btnRespingi_label = this.tsr.instant("RESPINGI");
|
|
24759
|
-
this.uti_s.set_home_title(this.tsr.instant(this.app_info.descrizione_breve) +
|
|
24760
|
-
|
|
24861
|
+
this.uti_s.set_home_title(this.tsr.instant(this.app_info.descrizione_breve) +
|
|
24862
|
+
" - " +
|
|
24863
|
+
this.tsr.instant("Nuova Richiesta"));
|
|
24864
|
+
this.reset_form_v(this.tsr.instant(this.app_info.descrizione_breve) +
|
|
24865
|
+
" - " +
|
|
24866
|
+
this.tsr.instant("Nuova Richiesta"));
|
|
24761
24867
|
this.reset_counters_int(0, 0);
|
|
24762
24868
|
/*
|
|
24763
24869
|
dati_aggiuntivi.id_doc=id_documento;
|
|
@@ -24792,7 +24898,7 @@
|
|
|
24792
24898
|
//console.log('this.user_idp.toUpperCase() ',this.user_idp.toUpperCase());
|
|
24793
24899
|
//console.log('this.livs[i].username.toUpperCase() ',this.livs[i].username.toUpperCase() );
|
|
24794
24900
|
if (this.livs[i].username == null)
|
|
24795
|
-
this.livs[i].username =
|
|
24901
|
+
this.livs[i].username = "ZZZ";
|
|
24796
24902
|
if (this.user_idp.toUpperCase() == this.livs[i].username.toUpperCase() ||
|
|
24797
24903
|
this.livs[i].context == "*ALLUSERS") {
|
|
24798
24904
|
// if (this.livs[i].abilita_indietro == 1) this.respingi_enabled = true;
|
|
@@ -24804,7 +24910,10 @@
|
|
|
24804
24910
|
};
|
|
24805
24911
|
dati_aggiuntivi_v2.prototype.after_save = function () { };
|
|
24806
24912
|
dati_aggiuntivi_v2.prototype.before_save = function () { };
|
|
24807
|
-
dati_aggiuntivi_v2.prototype.can_save = function () {
|
|
24913
|
+
dati_aggiuntivi_v2.prototype.can_save = function () {
|
|
24914
|
+
console.log("can_save interno");
|
|
24915
|
+
return true;
|
|
24916
|
+
};
|
|
24808
24917
|
dati_aggiuntivi_v2.prototype.edit_doc = function () {
|
|
24809
24918
|
this.load_document();
|
|
24810
24919
|
};
|
|
@@ -24820,13 +24929,13 @@
|
|
|
24820
24929
|
if (this.m_obj.autori == null)
|
|
24821
24930
|
this.m_obj.autori = "";
|
|
24822
24931
|
if (("," + this.m_obj.autori.toLowerCase() + ",").indexOf("," + this.user_idp.toLowerCase() + ",") != -1) {
|
|
24823
|
-
console.log(
|
|
24932
|
+
console.log("this.m_obj.autori ", this.m_obj.autori);
|
|
24824
24933
|
if (this.m_obj.autori != null)
|
|
24825
|
-
if (this.m_obj.autori.split(
|
|
24934
|
+
if (this.m_obj.autori.split(",").length != 1)
|
|
24826
24935
|
this.in_carico = true;
|
|
24827
24936
|
// if(!this.in_carico){
|
|
24828
24937
|
if (this.m_obj.assegnati_paralleli != null)
|
|
24829
|
-
if (this.m_obj.assegnati_paralleli.split(
|
|
24938
|
+
if (this.m_obj.assegnati_paralleli.split(",").length != 1)
|
|
24830
24939
|
if (this.m_obj.assegnati_paralleli.indexOf(this.app_s.user) > -1)
|
|
24831
24940
|
this.b_assengna_a = true;
|
|
24832
24941
|
// }
|
|
@@ -24835,7 +24944,7 @@
|
|
|
24835
24944
|
this.update_status(null, true, this.in_carico, this.b_assengna_a, 17);
|
|
24836
24945
|
}
|
|
24837
24946
|
this.r_count();
|
|
24838
|
-
this.s_uto =
|
|
24947
|
+
this.s_uto = "";
|
|
24839
24948
|
var aut = this.m_obj.autori.split(",");
|
|
24840
24949
|
for (var i = 0; i < aut.length; i++)
|
|
24841
24950
|
for (var y = 0; y < this.livs.length; y++)
|
|
@@ -24858,7 +24967,9 @@
|
|
|
24858
24967
|
else
|
|
24859
24968
|
this.uti_s.set_home_title(this.tsr.instant(this.app_info.descrizione_breve) +
|
|
24860
24969
|
" " +
|
|
24861
|
-
this.m_obj.codice +
|
|
24970
|
+
this.m_obj.codice +
|
|
24971
|
+
"/" +
|
|
24972
|
+
this.m_obj.v +
|
|
24862
24973
|
" - " +
|
|
24863
24974
|
this.tsr.instant(this.m_obj.stat_stato));
|
|
24864
24975
|
this.reset_form_v(this.tsr.instant(this.app_info.descrizione_breve) +
|
|
@@ -24866,37 +24977,41 @@
|
|
|
24866
24977
|
this.m_obj.codice +
|
|
24867
24978
|
" - " +
|
|
24868
24979
|
this.tsr.instant(this.m_obj.stat_stato));
|
|
24869
|
-
this.old_doc =
|
|
24980
|
+
this.old_doc = JSON.parse(JSON.stringify(this.getfieldvalues()));
|
|
24870
24981
|
//+' ('+s_uto+')');
|
|
24871
24982
|
};
|
|
24872
24983
|
dati_aggiuntivi_v2.prototype.reset_form_v = function (t) {
|
|
24873
24984
|
var _this = this;
|
|
24874
|
-
console.log(
|
|
24985
|
+
console.log("reset_form_v ", this.loaded);
|
|
24875
24986
|
if (!this.loaded) {
|
|
24876
|
-
setTimeout(function () {
|
|
24987
|
+
setTimeout(function () {
|
|
24988
|
+
_this.reset_form_v(t);
|
|
24989
|
+
return;
|
|
24990
|
+
}, 500);
|
|
24877
24991
|
return;
|
|
24878
24992
|
}
|
|
24879
24993
|
this.reset_form(t);
|
|
24880
|
-
this.old_doc =
|
|
24994
|
+
this.old_doc = JSON.parse(JSON.stringify(this.getfieldvalues()));
|
|
24881
24995
|
};
|
|
24882
24996
|
dati_aggiuntivi_v2.prototype.revisione = function () {
|
|
24883
24997
|
var _this = this;
|
|
24884
24998
|
var dialogRef = this.m_dialog.open(fh_win_confirm, {
|
|
24885
|
-
disableClose: true,
|
|
24999
|
+
disableClose: true,
|
|
25000
|
+
data: {
|
|
24886
25001
|
title_dialog: this.tsr.instant("Conferma Operazione"),
|
|
24887
|
-
msg_dialog: this.tsr.instant("Confermi di voler revisionare il documento?")
|
|
24888
|
-
}
|
|
25002
|
+
msg_dialog: this.tsr.instant("Confermi di voler revisionare il documento?"),
|
|
25003
|
+
},
|
|
24889
25004
|
});
|
|
24890
25005
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
24891
25006
|
if (result) {
|
|
24892
25007
|
var p = new QParam();
|
|
24893
25008
|
p.sql = "UPDATE_DOCUMENTO_REV";
|
|
24894
25009
|
p.values = [_this.id_applicativo, _this.id_documento];
|
|
24895
|
-
p.types = [
|
|
25010
|
+
p.types = ["string", "string"];
|
|
24896
25011
|
_this.m_dataService.doQuery(p).subscribe(function (data) {
|
|
24897
25012
|
if (data != null)
|
|
24898
25013
|
if (data.result_msg == "OK") {
|
|
24899
|
-
_this.alert(_this.tsr.instant(
|
|
25014
|
+
_this.alert(_this.tsr.instant("Revisione generata"), 0);
|
|
24900
25015
|
window.location.reload();
|
|
24901
25016
|
}
|
|
24902
25017
|
});
|
|
@@ -24908,20 +25023,20 @@
|
|
|
24908
25023
|
var _this = this;
|
|
24909
25024
|
if (this.app_s.user != null)
|
|
24910
25025
|
this.user_idp = this.app_s.user;
|
|
24911
|
-
console.log(
|
|
25026
|
+
console.log("this.user_idp == null || this.m_route.params==null ", this.user_idp, this.m_route.params, new Date());
|
|
24912
25027
|
if (this.user_idp == null || this.m_route.params == null) {
|
|
24913
25028
|
setTimeout(function () {
|
|
24914
25029
|
_this.init_engine();
|
|
24915
25030
|
}, 500);
|
|
24916
25031
|
return;
|
|
24917
25032
|
}
|
|
24918
|
-
console.log(
|
|
25033
|
+
console.log("init_engine", new Date());
|
|
24919
25034
|
this.init_user_i();
|
|
24920
25035
|
this.m_route.params.subscribe(function (params) {
|
|
24921
25036
|
var id = params["op"];
|
|
24922
25037
|
_this.id_applicativo = params["idapp"];
|
|
24923
25038
|
_this.id_documento = params["id_doc"];
|
|
24924
|
-
console.log(
|
|
25039
|
+
console.log("qui!");
|
|
24925
25040
|
_this.b_edit = id != "new" ? true : false;
|
|
24926
25041
|
_this.init_app_wkf();
|
|
24927
25042
|
if (!_this.b_edit)
|
|
@@ -24937,7 +25052,7 @@
|
|
|
24937
25052
|
});
|
|
24938
25053
|
};
|
|
24939
25054
|
dati_aggiuntivi_v2.prototype.init_app_wkf = function () {
|
|
24940
|
-
console.log(
|
|
25055
|
+
console.log("init_app_wkf ", this.b_edit);
|
|
24941
25056
|
if (!this.b_edit)
|
|
24942
25057
|
this.insert_doc();
|
|
24943
25058
|
else
|