@fluxhub/fluxhub-lib 10.0.745 → 10.0.747

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.
@@ -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('start SELECT_ROLES_WKF_V2', new Date());
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('start SELECT_WKF_APP_INFO_BYUID', new Date());
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('end SELECT_WKF_APP_INFO_BYUID', new Date());
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 + '_imp_user') == null) {
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 + '_imp_user')));
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 = this.m_obj.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(',').length != 1)
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 = ['string', 'string', 'string'];
23213
- p.values = [this.id_applicativo, this.id_documento, this.app_s.user_surname + ' ' + this.app_s.user_name];
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 = ['string', 'string', 'string', 'string', 'string'];
23218
- p.values = [this.id_applicativo, this.app_s.user, 'Presa in carico', this.m_obj.stat_stato, this.id_documento];
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('this.m_obj.canale ', this.m_obj.canale, liv);
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('clevel 1 ', this.livs[i]);
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('clevel 2 ', this.clevel);
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 = 'ZZZ';
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 ((this.c_canale == "" ||
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('clevel 2 ', this.clevel);
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() == this.livs[i].username.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('transazioni ', transazioni);
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('Nessuna transizione definita dallo step: ' + _this.clevel.step, 1);
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('ris select level', result);
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('calcolanextandjump2', o);
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 ((o.step_d == this.livs[i].step)) {
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 ((this.clevel.context == "" ||
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('this. this.transizione_info ', o);
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
- (!b_canale || this.livs[i].context == '*SYSTEM')) {
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('Conferma Assegnazione'),
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 == '' || result == null) {
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('*').join('');
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('b_f ', b_f_1);
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('arrAutori ', arrAutori); //qui6
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(' sp ', sp);
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: 'Conferma Avanzamento',
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
- if (!this.transizione_info.manual_assignment) {
23552
- this.app_s.getState().wkf_doc_info.title = "Avanzamento";
23553
- let sp: string = "";
23554
- for (let i: number = 0; i < arrAutori.length; i++)
23555
- if (arrAutori[i].nc != null)
23556
- if (sp.indexOf(arrAutori[i].nc) == -1) {
23557
- if (sp != "") sp = sp + ";";
23558
- sp = sp + arrAutori[i].nc;
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
- this.arrUsersSelected = arrAutori;
23586
- this.nota = result;
23587
- this.OKCOM();
23588
- });
23589
- } else {
23590
- this.app_s.getState().wkf_doc_info.title = "Assegnazione";
23591
-
23592
- this.app_s.getState().wkf_doc_info.comm_notrequired = this.transizione_info.comments_opt;
23593
-
23594
- this.app_s.getState().wkf_doc_info.arrAutori = arrAutori.sort(
23595
- (n1, n2) => {
23596
- if (n1.nc > n2.nc) {
23597
- return 1;
23598
- }
23599
-
23600
- if (n1.nc < n2.nc) {
23601
- return -1;
23602
- }
23603
-
23604
- return 0;
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
- if (this.app_s.temp_var4 == null) this.app_s.temp_var4 = "";
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
- this.arrUsersSelected = result.arrsel;
23624
- this.nota = result.nota;
23625
- this.OKCOM();
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, { 'disableClose': true, width: '800px', data: {
23651
- title: this.tsr.instant('Conferma Assegnazione'),
23652
- lbl: '',
23653
- commento_default: '',
23654
- comm_notrequired: '',
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('VVV ', v);
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(',').length != 1)
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(',').length != 1)
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 = [_this.id_applicativo, _this.id_documento, _this.m_obj.autori, _this.m_obj.pers_int];
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.doQuery({ sql: 'INSERT_WORKFLOW_LOG',
23707
- values: [_this.id_applicativo, _this.user_idp, 'DOCUMENTO RIASSEGNATO', 'DOCUMENTO RIASSEGNATO A: ' + arr_new_arr_1, _this.id_documento],
23708
- types: ['string', 'string', 'string', 'string', 'string'], names: [] }).subscribe(function (data) {
23709
- });
23710
- if (result.op == 'C') {
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 == 'A') {
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.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
23734
- body_email = body_email.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
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
- if (this.m_obj[prop] != null) {
23737
-
23738
- if (
23739
- Object.prototype.toString.call(this.m_obj[prop]) ===
23740
- "[object Date]"
23741
- ) {
23742
- oggetto_email = oggetto_email
23743
- .split("{{" + prop + "}}")
23744
- .join(this.uti_s.date2String(this.m_obj[prop]));
23745
- } else if (
23746
- ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
23747
- )
23748
- oggetto_email = oggetto_email
23749
- .split("{{" + prop + "}}")
23750
- .join(this.m_obj[prop]);
23751
- else
23752
- oggetto_email = oggetto_email
23753
- .split("{{" + prop + "}}")
23754
- .join(
23755
- this.uti_s.date2String(
23756
- this.uti_s.string2date(this.m_obj[prop], 2)
23757
- )
23758
- );
23759
-
23760
-
23761
-
23762
- if (
23763
- Object.prototype.toString.call(this.m_obj[prop]) ===
23764
- "[object Date]"
23765
- ) {
23766
- body_email = body_email
23767
- .split("{{" + prop + "}}")
23768
- .join(this.uti_s.date2String(this.m_obj[prop]));
23769
- } else if (
23770
- ("" + this.m_obj[prop]).indexOf("T00:00:00") == -1
23771
- )
23772
- body_email = body_email
23773
- .split("{{" + prop + "}}")
23774
- .join(this.m_obj[prop]);
23775
- else
23776
- body_email = body_email
23777
- .split("{{" + prop + "}}")
23778
- .join(
23779
- this.uti_s.date2String(
23780
- this.uti_s.string2date(this.m_obj[prop], 2)
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
- this.sendEMail_ex(
23795
- this.user_idp,
23796
- arr_new_arr,
23797
- this.app_info.descrizione_breve +
23798
- ", Ti è stato assegnato il documento numero: " +
23799
- this.m_obj.codice +
23800
- " " +
23801
- this.getTitle() +
23802
- " - " +
23803
- this.getLvlDescri(String(this.m_liv), this.m_statox),
23804
- "<br>Attività:" +
23805
- this.getLvlDescri(String(this.m_liv), this.m_statox) +
23806
- "<br>" +
23807
- this.m_statox +
23808
- "<br>" +
23809
- this.getDescri(),
23810
- this.id_applicativo,
23811
- this.id_documento,
23812
- this.app_info.COMPANY_SITE_ROOT +
23813
- "#/" +
23814
- this.app_info.modulo_swf +
23815
- "/" +
23816
- this.id_applicativo +
23817
- "/" +
23818
- this.id_documento +
23819
- "/edit",
23820
- this.m_obj.codice,
23821
- "",
23822
- true,
23823
- "",false
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('exec_wkf ', arrdest, assegnati_paralleli);
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, data: { label: this.tsr.instant('Attendere') }
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 = 'exec_wkf';
23885
+ fs.p1 = "exec_wkf";
23849
23886
  else
23850
- fs.p1 = 'create_ver';
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 = [uiid_op, JSON.stringify({
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 = [uiid_op, JSON.stringify({
23870
- transizione: { uiid_wkf: trans.uiid_wkf, uiid: trans.uiid, step_d: trans.step_d, step_o: trans.step_o },
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 () { _this.reset_updw(); }, 800);
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 == '-1')
23907
- arrd[i].val = '';
23908
- if (arrd[i].oldVal == '-1')
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(',').join('.'));
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 == 'update' && (arrd[i].val == 'date' || arrd[i].val == 'string')))
23920
- if (!(arrd[i].op == 'add' && arrd[i].val == null && arrd[i].oldVal == ''))
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 == '' && arrd[i].oldVal == '0'))
23923
- if (!(arrd[i].val == '0' && arrd[i].oldVal == null))
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 = 'send_email';
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 = ['string', 'string'];
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('inser_c = false,edit_c=true ', inser_c, edit_c);
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 = _this.app_info.notifica_commenti;
24078
- dialogRef.componentInstance.notifica_commenti_obbl = _this.app_info.notifica_commenti_obbl;
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 == 'i') {
24085
- console.log('inserito commento');
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 = _this.app_info.notifica_commenti;
24119
- dialogRef.componentInstance.notifica_commenti_obbl = _this.app_info.notifica_commenti_obbl;
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 == 'i') {
24179
+ if (result == "i") {
24125
24180
  em.emit();
24126
- console.log('emetto insert');
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('open_upload ', sovra_path, admin_role);
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%", data: { admin_role: admin_role, App: this.id_applicativo, K: this.id_documento }
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.doQuery({ sql: 'INSERT_WORKFLOW_LOG',
24163
- values: [_this.id_applicativo, _this.user_idp, 'INSERIMENTO', 'INSERIMENTO DOCUMENTO', _this.id_documento],
24164
- types: ['string', 'string', 'string', 'string', 'string'], names: [] }).subscribe(function (data) {
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('typeof ', typeof (arr[i].values), arr[i].values);
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('arr[i].values ', arr[i].values);
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 () { _this.load_document(); }, 200);
24339
+ setTimeout(function () {
24340
+ _this.load_document();
24341
+ }, 200);
24270
24342
  return;
24271
24343
  }
24272
24344
  var p = new QParam();
@@ -24292,64 +24364,88 @@
24292
24364
  };
24293
24365
  dati_aggiuntivi_v2.prototype.ok_load_document = function (o) {
24294
24366
  var _this = this;
24295
- this.m_obj = (JSON.parse(JSON.stringify(o)));
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(',').length != 1)
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(',').length != 1)
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 = ['string'];
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('end SELECT_WLIVELLIV2_2', new Date());
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 == _this.override_livs[y].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 = _this.override_livs[y].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 = 'SYSTEM';
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 = ['string'];
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
+ if ("REQUESTER" == v1.k.split("CREATOR").join("REQUESTER"))
24428
+ datav.result_data.push({
24429
+ k: "*ALLUSERS",
24430
+ v: v1.v,
24431
+ nc: v1.nc,
24432
+ });
24433
+ });
24434
+ console.log("Var speciali ", datav.result_data);
24340
24435
  data.result_data.map(function (v) {
24341
- if (v.value.indexOf('*') == 0) {
24436
+ if (v.value.indexOf("*") == 0) {
24342
24437
  v.context = _this.m_obj.canale;
24343
- v.description = '';
24344
- v.name = '';
24345
- datav.result_data.push({ k: '*ALLUSERS', v: _this.app_s.user, nc: _this.app_s.user_surname + ' ' + _this.app_s.user_name });
24346
- datav.result_data.push({
24347
- k: '*CURRENT_USER',
24348
- v: _this.app_s.user,
24349
- nc: _this.app_s.user_surname + ' ' + _this.app_s.user_name
24350
- });
24438
+ v.description = "";
24439
+ v.name = "";
24351
24440
  datav.result_data.map(function (v1) {
24352
- if (v.value.split('CREATOR').join('REQUESTER') == v1.k.split('CREATOR').join('REQUESTER')) {
24441
+ if (v.value.split("CREATOR").join("REQUESTER") ==
24442
+ v1.k.split("CREATOR").join("REQUESTER")) {
24443
+ if (_this.m_obj.stato != null || _this.m_obj.stato > 10)
24444
+ datav.result_data.push({
24445
+ k: "*ALLUSERS",
24446
+ v: v1.v,
24447
+ nc: v1.nc,
24448
+ });
24353
24449
  v.username = v1.v;
24354
24450
  v.nc = v1.nc;
24355
24451
  v.ncx = v1.nc;
@@ -24422,7 +24518,7 @@
24422
24518
  dati_aggiuntivi_v2.prototype.over_canale_iniz = function () {
24423
24519
  if (this.forza_canale == null)
24424
24520
  return;
24425
- if (this.forza_canale == '')
24521
+ if (this.forza_canale == "")
24426
24522
  return;
24427
24523
  var min_liv = 0;
24428
24524
  for (var i = 0; i < this.livs.length; i++)
@@ -24438,20 +24534,20 @@
24438
24534
  };
24439
24535
  dati_aggiuntivi_v2.prototype.ck_canale_multiplo = function () {
24440
24536
  var _this = this;
24441
- console.log('ck_canale_multiplo ', this.livs);
24537
+ console.log("ck_canale_multiplo ", this.livs);
24442
24538
  var min_liv = 0;
24443
24539
  for (var i = 0; i < this.livs.length; i++)
24444
24540
  if (this.livs[i].step < min_liv || min_liv == 0) {
24445
24541
  this.clevel = this.livs[i];
24446
24542
  min_liv = this.livs[i].step;
24447
24543
  }
24448
- console.log('min_liv ', min_liv);
24544
+ console.log("min_liv ", min_liv);
24449
24545
  var sv = [];
24450
24546
  for (var i = 0; i < this.livs.length; i++)
24451
24547
  if (this.livs[i].step == min_liv &&
24452
24548
  this.app_s.getState().wkf_doc_info.curr_user.toUpperCase() ==
24453
24549
  this.livs[i].username.toUpperCase()) {
24454
- console.log(' this.livs[i].step ', this.livs[i].step, this.livs[i].username.toUpperCase(), this.livs[i].context);
24550
+ console.log(" this.livs[i].step ", this.livs[i].step, this.livs[i].username.toUpperCase(), this.livs[i].context);
24455
24551
  var b_found = false;
24456
24552
  for (var y = 0; y < this.livs.length; y++)
24457
24553
  if (this.livs[y].context == this.livs[i].context) {
@@ -24484,7 +24580,7 @@
24484
24580
  dialogRef.afterClosed().subscribe(function (result) {
24485
24581
  if (result == null)
24486
24582
  return;
24487
- if (result == '')
24583
+ if (result == "")
24488
24584
  return;
24489
24585
  _this.c_canale = result;
24490
24586
  _this.create_new_document();
@@ -24499,7 +24595,7 @@
24499
24595
  };
24500
24596
  dati_aggiuntivi_v2.prototype.open_info = function () {
24501
24597
  var _this = this;
24502
- this.s_uto = '';
24598
+ this.s_uto = "";
24503
24599
  var aut = this.m_obj.autori.split(",");
24504
24600
  for (var i = 0; i < aut.length; i++)
24505
24601
  for (var y = 0; y < this.livs.length; y++)
@@ -24511,9 +24607,10 @@
24511
24607
  }
24512
24608
  this.app_s.getState().wkf_doc_info.in_carico_a = this.s_uto;
24513
24609
  this.m_obj.s_uto = this.s_uto;
24514
- console.log('this.m_obj ', this.m_obj);
24610
+ console.log("this.m_obj ", this.m_obj);
24515
24611
  var dialogRef = this.m_dialog.open(win_info_doc_v2, {
24516
- disableClose: true, data: this.m_obj
24612
+ disableClose: true,
24613
+ data: this.m_obj,
24517
24614
  });
24518
24615
  setTimeout(function () {
24519
24616
  dialogRef.componentInstance.hide_richiedente = _this.hide_richiedente;
@@ -24655,27 +24752,33 @@
24655
24752
  if (data != null)
24656
24753
  if (data.result_msg == "OK") {
24657
24754
  if (b_send_email && s_notif != "") {
24658
- oggetto_email = _this.app_info.descrizione_breve +
24659
- ", Ti è stato assegnato il documento numero: " +
24660
- _this.m_obj.codice +
24661
- " " +
24662
- _this.getTitle() +
24663
- " - " +
24664
- _this.getLvlDescri(String(_this.m_liv), _this.m_statox);
24665
- body_email = "<br>Attività:" +
24666
- _this.getLvlDescri(String(_this.m_liv), _this.m_statox) +
24667
- "<br>" +
24668
- _this.m_statox +
24669
- "<br>" +
24670
- _this.getDescri();
24755
+ oggetto_email =
24756
+ _this.app_info.descrizione_breve +
24757
+ ", Ti è stato assegnato il documento numero: " +
24758
+ _this.m_obj.codice +
24759
+ " " +
24760
+ _this.getTitle() +
24761
+ " - " +
24762
+ _this.getLvlDescri(String(_this.m_liv), _this.m_statox);
24763
+ body_email =
24764
+ "<br>Attività:" +
24765
+ _this.getLvlDescri(String(_this.m_liv), _this.m_statox) +
24766
+ "<br>" +
24767
+ _this.m_statox +
24768
+ "<br>" +
24769
+ _this.getDescri();
24671
24770
  if (_this.app_info.subject_riassegna != null)
24672
24771
  if (_this.app_info.subject_riassegna != "")
24673
24772
  oggetto_email = _this.app_info.subject_riassegna;
24674
24773
  if (_this.app_info.body_riassegna != null)
24675
24774
  if (_this.app_info.body_riassegna != "")
24676
24775
  body_email = _this.app_info.body_riassegna;
24677
- oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
24678
- body_email = body_email.split('{{TRANSITION_DESCRI}}').join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
24776
+ oggetto_email = oggetto_email
24777
+ .split("{{TRANSITION_DESCRI}}")
24778
+ .join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
24779
+ body_email = body_email
24780
+ .split("{{TRANSITION_DESCRI}}")
24781
+ .join(_this.getLvlDescri(String(_this.m_liv), _this.m_statox));
24679
24782
  _this.sendEMail_ex(_this.user_idp, s_notif, oggetto_email, body_email, _this.id_applicativo, _this.id_documento, _this.app_s.COMPANY_SITE_ROOT +
24680
24783
  "#/" +
24681
24784
  _this.app_info.modulo_swf +
@@ -24683,7 +24786,7 @@
24683
24786
  _this.id_applicativo +
24684
24787
  "/" +
24685
24788
  _this.id_documento +
24686
- "/edit", _this.m_obj.codice, "", true, "", true, '');
24789
+ "/edit", _this.m_obj.codice, "", true, "", true, "");
24687
24790
  }
24688
24791
  else
24689
24792
  _this.goto_edit_doc();
@@ -24753,8 +24856,12 @@
24753
24856
  this.btnApprova_label = this.tsr.instant("APPROVA");
24754
24857
  this.btnAssegna_label = this.tsr.instant("Assegna");
24755
24858
  this.btnRespingi_label = this.tsr.instant("RESPINGI");
24756
- this.uti_s.set_home_title(this.tsr.instant(this.app_info.descrizione_breve) + " - " + this.tsr.instant("Nuova Richiesta"));
24757
- this.reset_form_v(this.tsr.instant(this.app_info.descrizione_breve) + " - " + this.tsr.instant("Nuova Richiesta"));
24859
+ this.uti_s.set_home_title(this.tsr.instant(this.app_info.descrizione_breve) +
24860
+ " - " +
24861
+ this.tsr.instant("Nuova Richiesta"));
24862
+ this.reset_form_v(this.tsr.instant(this.app_info.descrizione_breve) +
24863
+ " - " +
24864
+ this.tsr.instant("Nuova Richiesta"));
24758
24865
  this.reset_counters_int(0, 0);
24759
24866
  /*
24760
24867
  dati_aggiuntivi.id_doc=id_documento;
@@ -24789,7 +24896,7 @@
24789
24896
  //console.log('this.user_idp.toUpperCase() ',this.user_idp.toUpperCase());
24790
24897
  //console.log('this.livs[i].username.toUpperCase() ',this.livs[i].username.toUpperCase() );
24791
24898
  if (this.livs[i].username == null)
24792
- this.livs[i].username = 'ZZZ';
24899
+ this.livs[i].username = "ZZZ";
24793
24900
  if (this.user_idp.toUpperCase() == this.livs[i].username.toUpperCase() ||
24794
24901
  this.livs[i].context == "*ALLUSERS") {
24795
24902
  // if (this.livs[i].abilita_indietro == 1) this.respingi_enabled = true;
@@ -24801,7 +24908,10 @@
24801
24908
  };
24802
24909
  dati_aggiuntivi_v2.prototype.after_save = function () { };
24803
24910
  dati_aggiuntivi_v2.prototype.before_save = function () { };
24804
- dati_aggiuntivi_v2.prototype.can_save = function () { console.log('can_save interno'); return true; };
24911
+ dati_aggiuntivi_v2.prototype.can_save = function () {
24912
+ console.log("can_save interno");
24913
+ return true;
24914
+ };
24805
24915
  dati_aggiuntivi_v2.prototype.edit_doc = function () {
24806
24916
  this.load_document();
24807
24917
  };
@@ -24817,13 +24927,13 @@
24817
24927
  if (this.m_obj.autori == null)
24818
24928
  this.m_obj.autori = "";
24819
24929
  if (("," + this.m_obj.autori.toLowerCase() + ",").indexOf("," + this.user_idp.toLowerCase() + ",") != -1) {
24820
- console.log('this.m_obj.autori ', this.m_obj.autori);
24930
+ console.log("this.m_obj.autori ", this.m_obj.autori);
24821
24931
  if (this.m_obj.autori != null)
24822
- if (this.m_obj.autori.split(',').length != 1)
24932
+ if (this.m_obj.autori.split(",").length != 1)
24823
24933
  this.in_carico = true;
24824
24934
  // if(!this.in_carico){
24825
24935
  if (this.m_obj.assegnati_paralleli != null)
24826
- if (this.m_obj.assegnati_paralleli.split(',').length != 1)
24936
+ if (this.m_obj.assegnati_paralleli.split(",").length != 1)
24827
24937
  if (this.m_obj.assegnati_paralleli.indexOf(this.app_s.user) > -1)
24828
24938
  this.b_assengna_a = true;
24829
24939
  // }
@@ -24832,7 +24942,7 @@
24832
24942
  this.update_status(null, true, this.in_carico, this.b_assengna_a, 17);
24833
24943
  }
24834
24944
  this.r_count();
24835
- this.s_uto = '';
24945
+ this.s_uto = "";
24836
24946
  var aut = this.m_obj.autori.split(",");
24837
24947
  for (var i = 0; i < aut.length; i++)
24838
24948
  for (var y = 0; y < this.livs.length; y++)
@@ -24855,7 +24965,9 @@
24855
24965
  else
24856
24966
  this.uti_s.set_home_title(this.tsr.instant(this.app_info.descrizione_breve) +
24857
24967
  " " +
24858
- this.m_obj.codice + "/" + this.m_obj.v +
24968
+ this.m_obj.codice +
24969
+ "/" +
24970
+ this.m_obj.v +
24859
24971
  " - " +
24860
24972
  this.tsr.instant(this.m_obj.stat_stato));
24861
24973
  this.reset_form_v(this.tsr.instant(this.app_info.descrizione_breve) +
@@ -24863,37 +24975,41 @@
24863
24975
  this.m_obj.codice +
24864
24976
  " - " +
24865
24977
  this.tsr.instant(this.m_obj.stat_stato));
24866
- this.old_doc = (JSON.parse(JSON.stringify(this.getfieldvalues())));
24978
+ this.old_doc = JSON.parse(JSON.stringify(this.getfieldvalues()));
24867
24979
  //+' ('+s_uto+')');
24868
24980
  };
24869
24981
  dati_aggiuntivi_v2.prototype.reset_form_v = function (t) {
24870
24982
  var _this = this;
24871
- console.log('reset_form_v ', this.loaded);
24983
+ console.log("reset_form_v ", this.loaded);
24872
24984
  if (!this.loaded) {
24873
- setTimeout(function () { _this.reset_form_v(t); return; }, 500);
24985
+ setTimeout(function () {
24986
+ _this.reset_form_v(t);
24987
+ return;
24988
+ }, 500);
24874
24989
  return;
24875
24990
  }
24876
24991
  this.reset_form(t);
24877
- this.old_doc = (JSON.parse(JSON.stringify(this.getfieldvalues())));
24992
+ this.old_doc = JSON.parse(JSON.stringify(this.getfieldvalues()));
24878
24993
  };
24879
24994
  dati_aggiuntivi_v2.prototype.revisione = function () {
24880
24995
  var _this = this;
24881
24996
  var dialogRef = this.m_dialog.open(fh_win_confirm, {
24882
- disableClose: true, data: {
24997
+ disableClose: true,
24998
+ data: {
24883
24999
  title_dialog: this.tsr.instant("Conferma Operazione"),
24884
- msg_dialog: this.tsr.instant("Confermi di voler revisionare il documento?")
24885
- }
25000
+ msg_dialog: this.tsr.instant("Confermi di voler revisionare il documento?"),
25001
+ },
24886
25002
  });
24887
25003
  dialogRef.afterClosed().subscribe(function (result) {
24888
25004
  if (result) {
24889
25005
  var p = new QParam();
24890
25006
  p.sql = "UPDATE_DOCUMENTO_REV";
24891
25007
  p.values = [_this.id_applicativo, _this.id_documento];
24892
- p.types = ['string', 'string'];
25008
+ p.types = ["string", "string"];
24893
25009
  _this.m_dataService.doQuery(p).subscribe(function (data) {
24894
25010
  if (data != null)
24895
25011
  if (data.result_msg == "OK") {
24896
- _this.alert(_this.tsr.instant('Revisione generata'), 0);
25012
+ _this.alert(_this.tsr.instant("Revisione generata"), 0);
24897
25013
  window.location.reload();
24898
25014
  }
24899
25015
  });
@@ -24905,20 +25021,20 @@
24905
25021
  var _this = this;
24906
25022
  if (this.app_s.user != null)
24907
25023
  this.user_idp = this.app_s.user;
24908
- console.log('this.user_idp == null || this.m_route.params==null ', this.user_idp, this.m_route.params, new Date());
25024
+ console.log("this.user_idp == null || this.m_route.params==null ", this.user_idp, this.m_route.params, new Date());
24909
25025
  if (this.user_idp == null || this.m_route.params == null) {
24910
25026
  setTimeout(function () {
24911
25027
  _this.init_engine();
24912
25028
  }, 500);
24913
25029
  return;
24914
25030
  }
24915
- console.log('init_engine', new Date());
25031
+ console.log("init_engine", new Date());
24916
25032
  this.init_user_i();
24917
25033
  this.m_route.params.subscribe(function (params) {
24918
25034
  var id = params["op"];
24919
25035
  _this.id_applicativo = params["idapp"];
24920
25036
  _this.id_documento = params["id_doc"];
24921
- console.log('qui!');
25037
+ console.log("qui!");
24922
25038
  _this.b_edit = id != "new" ? true : false;
24923
25039
  _this.init_app_wkf();
24924
25040
  if (!_this.b_edit)
@@ -24934,7 +25050,7 @@
24934
25050
  });
24935
25051
  };
24936
25052
  dati_aggiuntivi_v2.prototype.init_app_wkf = function () {
24937
- console.log('init_app_wkf ', this.b_edit);
25053
+ console.log("init_app_wkf ", this.b_edit);
24938
25054
  if (!this.b_edit)
24939
25055
  this.insert_doc();
24940
25056
  else