@fluxhub/fluxhub-lib 10.0.724 → 10.0.726

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.
@@ -18564,6 +18564,7 @@
18564
18564
  this.op = "L";
18565
18565
  this.lbl = "";
18566
18566
  this.nota = "";
18567
+ this.hide_row_cmd = false;
18567
18568
  this.nota_commento = "";
18568
18569
  this.title = "";
18569
18570
  this.comm_notrequired = 0;
@@ -18578,6 +18579,12 @@
18578
18579
  this.title = data.title;
18579
18580
  if (data.lbl != null)
18580
18581
  this.lbl = data.lbl;
18582
+ if (data.only_riassegna != null) {
18583
+ if (data.only_riassegna) {
18584
+ this.op = 'A';
18585
+ this.hide_row_cmd = true;
18586
+ }
18587
+ }
18581
18588
  if (data.utenti != null) {
18582
18589
  this.arrAutori = data.utenti;
18583
18590
  this.all_users = JSON.parse(JSON.stringify(data.utenti));
@@ -18632,7 +18639,7 @@
18632
18639
  }());
18633
18640
  win_assegna_a.decorators = [
18634
18641
  { type: i0.Component, args: [{
18635
- template: "\n <div fxLayout=\"column\">\n\u00A0\u00A0\u00A0\u00A0<div\u00A0 fxFlex=\"100\"\u00A0fxLayout=\"row\"\u00A0 \u00A0class=\"dialog_header\">\n\t<div fxLayout=\"row\"\u00A0fxLayoutAlign=\"start\u00A0center\" style=\"width:50%\">{{title | translate}}</div>\n <div style=\"width:50%\" fxLayout=\"row\" fxLayoutAlign=\"end start\">\n <img\u00A0\u00A0\u00A0\u00A0src=\"assets/icons/x.png\"\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0style=\"cursor:\u00A0pointer;\"\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0(click)=\"close()\"\u00A0/>\n</div>\n</div>\n <div\n mat-dialog-content\n fxLayout=\"column\"\n style=\"font-size: 15px;min-width: 750px\"\n >\n <br><br>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFlexGap=\"5px\" fxFlex=\"100\">\n <div style=\"width:100px;font-weight:bold\">Operazione:*</div>\n <mat-radio-group [(ngModel)]=\"op\">\n <mat-radio-button value=\"L\">LIBERA</mat-radio-button>&nbsp;&nbsp;&nbsp;&nbsp;\n <mat-radio-button value=\"A\">RIASSEGNA A</mat-radio-button>&nbsp;&nbsp;&nbsp;&nbsp;\n <mat-radio-button [hidden]=\"!prendi_in_carico\" value=\"C\">PRENDI IN CARICO</mat-radio-button>\n </mat-radio-group>\n </div>\n <div style=\"width:100%;height:450px\" [hidden]=\"op!='A'\">\n <FHPickUsers\n #up\n [users_list]=\"arrAutori\"\n [vis_buttons]=\"false\"\n ></FHPickUsers>\n </div>\n\n </div>\n <br />\n <div style=\"width:100%;text-align:center;\">\n <button mat-flat-button color=\"primary\" (click)=\"ok()\"> {{'OK' | translate }}</button\n >&nbsp;&nbsp;&nbsp;\n <button\n mat-flat-button\n style=\"background-color: #F5F5F5\"\n (click)=\"close()\"\n >\n {{'ANNULLA' | translate }}\n </button>\n </div>\n </div>\n "
18642
+ template: "\n <div fxLayout=\"column\">\n\u00A0\u00A0\u00A0\u00A0<div\u00A0 fxFlex=\"100\"\u00A0fxLayout=\"row\"\u00A0 \u00A0class=\"dialog_header\">\n\t<div fxLayout=\"row\"\u00A0fxLayoutAlign=\"start\u00A0center\" style=\"width:50%\">{{title | translate}}</div>\n <div style=\"width:50%\" fxLayout=\"row\" fxLayoutAlign=\"end start\">\n <img\u00A0\u00A0\u00A0\u00A0src=\"assets/icons/x.png\"\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0style=\"cursor:\u00A0pointer;\"\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0(click)=\"close()\"\u00A0/>\n</div>\n</div>\n <div\n mat-dialog-content\n fxLayout=\"column\"\n style=\"font-size: 15px;min-width: 750px\"\n >\n <br><br>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFlexGap=\"5px\" fxFlex=\"100\" [hidden]=\"hide_row_cmd\">\n <div style=\"width:100px;font-weight:bold\">Operazione:*</div>\n <mat-radio-group [(ngModel)]=\"op\">\n <mat-radio-button value=\"L\">LIBERA</mat-radio-button>&nbsp;&nbsp;&nbsp;&nbsp;\n <mat-radio-button value=\"A\">RIASSEGNA A</mat-radio-button>&nbsp;&nbsp;&nbsp;&nbsp;\n <mat-radio-button [hidden]=\"!prendi_in_carico\" value=\"C\">PRENDI IN CARICO</mat-radio-button>\n </mat-radio-group>\n </div>\n <div style=\"width:100%;height:450px\" [hidden]=\"op!='A'\">\n <FHPickUsers\n #up\n [users_list]=\"arrAutori\"\n [vis_buttons]=\"false\"\n ></FHPickUsers>\n </div>\n\n </div>\n <br />\n <div style=\"width:100%;text-align:center;\">\n <button mat-flat-button color=\"primary\" (click)=\"ok()\"> {{'OK' | translate }}</button\n >&nbsp;&nbsp;&nbsp;\n <button\n mat-flat-button\n style=\"background-color: #F5F5F5\"\n (click)=\"close()\"\n >\n {{'ANNULLA' | translate }}\n </button>\n </div>\n </div>\n "
18636
18643
  },] }
18637
18644
  ];
18638
18645
  win_assegna_a.ctorParameters = function () { return [
@@ -21966,6 +21973,118 @@
21966
21973
  if (o.cmd == "reclama_bozza")
21967
21974
  this.reclama_bozza();
21968
21975
  };
21976
+ wkfapp_v2.prototype.riassegna_a = function (o) {
21977
+ var _this = this;
21978
+ var p = new QParam();
21979
+ p.sql = "SELECT_DOCUMENTS_BY_UIID";
21980
+ p.types = ["string", "string"];
21981
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
21982
+ this.m_dataService.doQuery(p).subscribe(function (data) {
21983
+ o = data.result_data[0];
21984
+ var arx = o.assegnati_paralleli.split(',');
21985
+ var arrAutori = [];
21986
+ for (var x = 0; x < arx.length; x++)
21987
+ for (var y = 0; y < _this.livs.length; y++) {
21988
+ if (arx[x] == _this.livs[y].username) {
21989
+ arrAutori.push({ username: arx[x], nc: _this.livs[y].nc });
21990
+ break;
21991
+ }
21992
+ }
21993
+ // console.log('arrAutori ',arrAutori);
21994
+ arrAutori = arrAutori.sort(function (n1, n2) {
21995
+ if (n1.nc > n2.nc) {
21996
+ return 1;
21997
+ }
21998
+ if (n1.nc < n2.nc) {
21999
+ return -1;
22000
+ }
22001
+ return 0;
22002
+ });
22003
+ var dialogRef = _this.dialog.open(win_assegna_a, { 'disableClose': true, width: '800px', data: {
22004
+ title: _this.tsr.instant('Conferma Assegnazione'),
22005
+ lbl: '',
22006
+ commento_default: '',
22007
+ comm_notrequired: '',
22008
+ utenti: arrAutori,
22009
+ prendi_in_carico: false
22010
+ } });
22011
+ dialogRef.afterClosed().subscribe(function (result) {
22012
+ if (result) {
22013
+ if (result.arrsel.length == 0) {
22014
+ _this._toastr.error("Impossibile riassegnare");
22015
+ return;
22016
+ }
22017
+ // console.log(' result.arrsel ', result.arrsel);
22018
+ var arr_new_arr_1 = '';
22019
+ o.autori = '';
22020
+ o.pers_int = '';
22021
+ var b_edit_1 = false;
22022
+ result.arrsel.map(function (v) {
22023
+ if (arr_new_arr_1 != '')
22024
+ arr_new_arr_1 += ',';
22025
+ arr_new_arr_1 += v.username;
22026
+ if (o.autori.indexOf(v.username) == -1) {
22027
+ console.log('VVV ', v);
22028
+ if (o.autori != '')
22029
+ o.autori = o.autori + ',';
22030
+ o.autori = o.autori + v.username;
22031
+ if (o.pers_int != '')
22032
+ o.pers_int = o.pers_int + ',';
22033
+ o.pers_int = o.pers_int + v.nc;
22034
+ }
22035
+ if (v.username == _this.app_info.user)
22036
+ b_edit_1 = true;
22037
+ });
22038
+ var in_carico = false;
22039
+ if (o.autori != null)
22040
+ if (o.autori.split(',').length != 1)
22041
+ in_carico = true;
22042
+ console.log(o.autori, in_carico);
22043
+ var b_assengna_a = false;
22044
+ if (o.assegnati_paralleli != null)
22045
+ if (o.assegnati_paralleli.split(',').length != 1)
22046
+ if (o.assegnati_paralleli.indexOf(_this.app_s.user) > -1)
22047
+ b_assengna_a = true;
22048
+ // console.log('this.m_obj.autori ',this.m_obj.autori, this.in_carico, this.b_assengna_a);
22049
+ var p_1 = new QParam();
22050
+ p_1.sql = "UPDATE_WKF_DOC_AUTHOR";
22051
+ p_1.values = [_this.id_applicativo, o.id_documento, o.autori, o.pers_int];
22052
+ p_1.types = ["string", "string", "string", "string"];
22053
+ _this.m_dataService.doQuery(p_1).subscribe(function (data) {
22054
+ if (data != null)
22055
+ if (data.result_msg == "OK") {
22056
+ _this.m_dataService.doQuery({ sql: 'INSERT_WORKFLOW_LOG',
22057
+ values: [_this.id_applicativo, _this.user_idp, 'DOCUMENTO RIASSEGNATO', 'DOCUMENTO RIASSEGNATO A: ' + arr_new_arr_1, o.uiid],
22058
+ types: ['string', 'string', 'string', 'string', 'string'], names: [] }).subscribe(function (data) {
22059
+ });
22060
+ if (result.op == 'A') {
22061
+ var body_email = '';
22062
+ var oggetto_email = _this.app_info.descrizione_breve +
22063
+ ", Ti è stato assegnato il documento numero: " +
22064
+ o.codice;
22065
+ if (_this.app_info.subject_riassegna != null)
22066
+ if (_this.app_info.subject_riassegna != "")
22067
+ oggetto_email = _this.app_info.subject_riassegna;
22068
+ if (_this.app_info.body_riassegna != null)
22069
+ if (_this.app_info.body_riassegna != "")
22070
+ body_email = _this.app_info.body_riassegna;
22071
+ oggetto_email = oggetto_email.split('{{TRANSITION_DESCRI}}').join(o.stat_stato);
22072
+ body_email = body_email.split('{{TRANSITION_DESCRI}}').join(o.stat_stato);
22073
+ _this.sendEMail_ex(_this.user_idp, arr_new_arr_1, oggetto_email, body_email, _this.id_applicativo, o.uiid, _this.app_info.COMPANY_SITE_ROOT +
22074
+ "#/" +
22075
+ _this.app_info.modulo_swf +
22076
+ "/" +
22077
+ _this.id_applicativo +
22078
+ "/" +
22079
+ o.uiid +
22080
+ "/edit", o.codice, "", true, "", false, '');
22081
+ }
22082
+ }
22083
+ });
22084
+ }
22085
+ });
22086
+ });
22087
+ };
21969
22088
  wkfapp_v2.prototype.annulla_richiesta = function () {
21970
22089
  var _this = this;
21971
22090
  if (this.get_grid().sRow == null) {
@@ -22016,17 +22135,17 @@
22016
22135
  });
22017
22136
  dialogRef.afterClosed().subscribe(function (result) {
22018
22137
  if (result) {
22019
- var p_1 = new QParam();
22020
- p_1.sql = "SELECT_DOCUMENTS_BY_UIID";
22021
- p_1.types = ["string", "string"];
22022
- p_1.values = [_this.id_applicativo, _this.get_grid().sRow.uiid];
22023
- _this.m_dataService.doQuery(p_1).subscribe(function (data) {
22138
+ var p_2 = new QParam();
22139
+ p_2.sql = "SELECT_DOCUMENTS_BY_UIID";
22140
+ p_2.types = ["string", "string"];
22141
+ p_2.values = [_this.id_applicativo, _this.get_grid().sRow.uiid];
22142
+ _this.m_dataService.doQuery(p_2).subscribe(function (data) {
22024
22143
  var stato_doc = data.result_data[0].stato;
22025
- p_1 = new QParam();
22026
- p_1.sql = "SELECT_WKF2_SELECT_USER_MIN";
22027
- p_1.types = ["string", "string"];
22028
- p_1.values = [_this.id_applicativo, _this.get_grid().sRow.uiid];
22029
- _this.m_dataService.doQuery(p_1).subscribe(function (data) {
22144
+ p_2 = new QParam();
22145
+ p_2.sql = "SELECT_WKF2_SELECT_USER_MIN";
22146
+ p_2.types = ["string", "string"];
22147
+ p_2.values = [_this.id_applicativo, _this.get_grid().sRow.uiid];
22148
+ _this.m_dataService.doQuery(p_2).subscribe(function (data) {
22030
22149
  var b_found = false;
22031
22150
  var livello = 0;
22032
22151
  var descri_livello = '';
@@ -22044,11 +22163,11 @@
22044
22163
  _this._toastr.error(_this.tsr.instant('Il documento non è in stato Bozza'));
22045
22164
  return;
22046
22165
  }
22047
- var p_2 = new QParam();
22048
- p_2.sql = "UPDATE_WKF_STATO_BOZZA";
22049
- p_2.types = ["string", "string", "int", 'string'];
22050
- p_2.values = [_this.id_applicativo, _this.get_grid().sRow.uiid, livello, descri_livello];
22051
- _this.m_dataService.doQuery(p_2).subscribe(function (data) {
22166
+ var p_3 = new QParam();
22167
+ p_3.sql = "UPDATE_WKF_STATO_BOZZA";
22168
+ p_3.types = ["string", "string", "int", 'string'];
22169
+ p_3.values = [_this.id_applicativo, _this.get_grid().sRow.uiid, livello, descri_livello];
22170
+ _this.m_dataService.doQuery(p_3).subscribe(function (data) {
22052
22171
  if (data != null)
22053
22172
  if (data.result_msg == "OK") {
22054
22173
  _this._toastr.info(_this.tsr.instant('Documento aggiornato'));
@@ -22094,16 +22213,16 @@
22094
22213
  if (result != null)
22095
22214
  if (result.result != null)
22096
22215
  if (result.result == "ok") {
22097
- var p_3 = new QParam();
22098
- p_3.sql = "UPDATE_USER_WORKFLOW";
22099
- p_3.types = ["string", "string", "string", "string"];
22100
- p_3.values = [
22216
+ var p_4 = new QParam();
22217
+ p_4.sql = "UPDATE_USER_WORKFLOW";
22218
+ p_4.types = ["string", "string", "string", "string"];
22219
+ p_4.values = [
22101
22220
  _this.id_applicativo,
22102
22221
  _this.get_grid().sRow.uiid,
22103
22222
  result.u1,
22104
22223
  result.u2,
22105
22224
  ];
22106
- _this.m_dataService.doQuery(p_3).subscribe(function (data) {
22225
+ _this.m_dataService.doQuery(p_4).subscribe(function (data) {
22107
22226
  if (data != null)
22108
22227
  if (data.result_msg == "OK") {
22109
22228
  _this._toastr.info(_this.tsr.instant("Workflow Aggiornato"));
@@ -22551,11 +22670,11 @@
22551
22670
  if (result != null)
22552
22671
  if (result.result != null)
22553
22672
  if (result.result == "ok") {
22554
- var p_4 = new QParam();
22555
- p_4.sql = "SELECT_USER_INFO_WKF";
22556
- p_4.types = ["string"];
22557
- p_4.values = [result.arrsel[0].username];
22558
- _this.m_dataService.doQuery(p_4).subscribe(function (data) {
22673
+ var p_5 = new QParam();
22674
+ p_5.sql = "SELECT_USER_INFO_WKF";
22675
+ p_5.types = ["string"];
22676
+ p_5.values = [result.arrsel[0].username];
22677
+ _this.m_dataService.doQuery(p_5).subscribe(function (data) {
22559
22678
  if (data != null)
22560
22679
  if (data.result_msg == "OK") {
22561
22680
  _this.app_s.user_name_ori = _this.app_s.user_name;
@@ -22707,11 +22826,11 @@
22707
22826
  _this.user_cognome = _this.app_s.user_surname;
22708
22827
  _this.user_email = _this.app_s.user_email;
22709
22828
  _this.m_uti.set_home_title(_this.tsr.instant(_this.att_panelcat));
22710
- var p_5 = new QParam();
22711
- p_5.sql = "SELECT_UTENTE_WKF_ADMIN";
22712
- p_5.types = ["string", "string"];
22713
- p_5.values = [_this.id_applicativo, _this.app_s.user];
22714
- _this.m_dataService.doQuery(p_5).subscribe(function (data) {
22829
+ var p_6 = new QParam();
22830
+ p_6.sql = "SELECT_UTENTE_WKF_ADMIN";
22831
+ p_6.types = ["string", "string"];
22832
+ p_6.values = [_this.id_applicativo, _this.app_s.user];
22833
+ _this.m_dataService.doQuery(p_6).subscribe(function (data) {
22715
22834
  if (data != null)
22716
22835
  if (data.result_msg == "OK") {
22717
22836
  var a = data.result_data;
@@ -22728,19 +22847,19 @@
22728
22847
  if (a[0].tipo == "2")
22729
22848
  _this.is_PowerUser = true;
22730
22849
  }
22731
- var p_6 = new QParam();
22732
- p_6.sql = "SELECT_WLIVELLIV2_2";
22733
- p_6.types = ["string"];
22734
- p_6.values = [_this.id_applicativo];
22735
- _this.m_dataService.doQuery(p_6).subscribe(function (data) {
22850
+ var p_7 = new QParam();
22851
+ p_7.sql = "SELECT_WLIVELLIV2_2";
22852
+ p_7.types = ["string"];
22853
+ p_7.values = [_this.id_applicativo];
22854
+ _this.m_dataService.doQuery(p_7).subscribe(function (data) {
22736
22855
  if (data != null)
22737
22856
  if (data.result_msg == "OK") {
22738
22857
  _this.ok_conf_s(data.result_data);
22739
- var p_7 = new QParam();
22740
- p_7.sql = "SELECT_ROLES_VISORI";
22741
- p_7.types = ["string"];
22742
- p_7.values = [_this.id_applicativo];
22743
- _this.m_dataService.doQuery(p_7).subscribe(function (data) {
22858
+ var p_8 = new QParam();
22859
+ p_8.sql = "SELECT_ROLES_VISORI";
22860
+ p_8.types = ["string"];
22861
+ p_8.values = [_this.id_applicativo];
22862
+ _this.m_dataService.doQuery(p_8).subscribe(function (data) {
22744
22863
  if (data != null)
22745
22864
  if (data.result_msg == "OK") {
22746
22865
  _this.is_Visor = false;