@fluxhub/fluxhub-lib 9.0.113 → 9.0.115

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.
@@ -5246,6 +5246,7 @@ var FHGridComponent = /** @class */ (function () {
5246
5246
  else {
5247
5247
  // if(obj_filtro.length>0)filter_v= filter_v+' and ';
5248
5248
  var sq = '';
5249
+ var include_null_value = false;
5249
5250
  if (obj_filtro.values != null)
5250
5251
  for (var i = 0; i < obj_filtro.values.length; i++)
5251
5252
  if (obj_filtro.values[i] != null) {
@@ -5253,17 +5254,26 @@ var FHGridComponent = /** @class */ (function () {
5253
5254
  sq = sq + ',';
5254
5255
  sq = sq + '\'' + obj_filtro.values[i].replace('\'', '\'\'') + '\'';
5255
5256
  }
5257
+ else {
5258
+ include_null_value = true;
5259
+ }
5256
5260
  if (sq != '') {
5257
5261
  b_filter = true;
5258
5262
  if (add_end)
5259
5263
  filter_v = filter_v + ' and ';
5260
- filter_v = filter_v + key + ' in (' + sq + ')';
5264
+ if (!include_null_value)
5265
+ filter_v = filter_v + key + ' in (' + sq + ')';
5266
+ else
5267
+ filter_v = filter_v + '(' + key + ' in (' + sq + ') or ' + key + ' is null)';
5261
5268
  }
5262
5269
  else {
5263
5270
  b_filter = true;
5264
5271
  if (add_end)
5265
5272
  filter_v = filter_v + ' and ';
5266
- filter_v = filter_v + ' (1=0)';
5273
+ if (!include_null_value)
5274
+ filter_v = filter_v + ' (1=0)';
5275
+ else
5276
+ filter_v = filter_v + ' ' + key + ' is null';
5267
5277
  }
5268
5278
  }
5269
5279
  this.show_pulisci_filtri = b_filter;
@@ -9306,18 +9316,18 @@ var win_salva_annulla = /** @class */ (function () {
9306
9316
  }());
9307
9317
 
9308
9318
  var win_assegna = /** @class */ (function () {
9309
- function win_assegna(dialogRef, m_appService, toastr, _dataService) {
9319
+ function win_assegna(dialogRef, m_appService, toastr, _dataService, data) {
9310
9320
  this.dialogRef = dialogRef;
9311
9321
  this.m_appService = m_appService;
9312
9322
  this.toastr = toastr;
9313
9323
  this._dataService = _dataService;
9324
+ this.data = data;
9314
9325
  this.lbl = "";
9315
9326
  this.nota = "";
9316
9327
  this.nota_commento = "";
9317
9328
  this.title = "ASSEGNA DOCUMENTO";
9318
9329
  this.comm_notrequired = 0;
9319
9330
  this.comm_notrequired = this.m_appService.getState().wkf_doc_info.comm_notrequired;
9320
- console.log(' this.comm_notrequired ', this.comm_notrequired);
9321
9331
  this.title = this.m_appService.getState().wkf_doc_info.title;
9322
9332
  this.lbl = this.m_appService.getState().wkf_doc_info.lbl;
9323
9333
  this.arrAutori = this.m_appService.getState().wkf_doc_info.arrAutori;
@@ -9327,6 +9337,12 @@ var win_assegna = /** @class */ (function () {
9327
9337
  }
9328
9338
  if (this.comm_notrequired == 2)
9329
9339
  this.nota_commento = " (COMMENTO NON OBBLIGATORIO)";
9340
+ if (data != null) {
9341
+ if (data.commento_default != null)
9342
+ this.nota = data.commento_default;
9343
+ if (data.comm_notrequired != null)
9344
+ this.comm_notrequired = data.comm_notrequired;
9345
+ }
9330
9346
  }
9331
9347
  win_assegna.prototype.close = function () { this.dialogRef.close(null); };
9332
9348
  win_assegna.prototype.ok = function () {
@@ -9356,7 +9372,8 @@ var win_assegna = /** @class */ (function () {
9356
9372
  { type: MatDialogRef },
9357
9373
  { type: AppService },
9358
9374
  { type: ToastrService },
9359
- { type: QueryService }
9375
+ { type: QueryService },
9376
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
9360
9377
  ]; };
9361
9378
  __decorate([
9362
9379
  ViewChild('up'),
@@ -9366,7 +9383,8 @@ var win_assegna = /** @class */ (function () {
9366
9383
  Component({
9367
9384
  template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <h4 mat-dialog-title>{{title}}\n </h4>\n <div mat-dialog-content fxLayout=\"column\" style=\"font-size: 15px;min-width: 750px\">\n <div style=\"width:100%;height:450px\">\n <FHPickUsers #up [users_list]=\"arrAutori\" [vis_buttons]=\"false\"></FHPickUsers>\n </div>\n <div *ngIf=\"comm_notrequired!=1\">\n <br>\n <mat-form-field appearance=\"outline\" floatLabel=\"always\"><mat-label>Commento {{nota_commento}}</mat-label>\n <textarea matInput [(ngModel)]=\"nota\" rows=\"6\"></textarea>\n </mat-form-field>\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</button>&nbsp;&nbsp;&nbsp;\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"close()\">ANNULLA</button>\n </div>\n\n "
9368
9385
  }),
9369
- __metadata("design:paramtypes", [MatDialogRef, AppService, ToastrService, QueryService])
9386
+ __param(4, Inject(MAT_DIALOG_DATA)),
9387
+ __metadata("design:paramtypes", [MatDialogRef, AppService, ToastrService, QueryService, Object])
9370
9388
  ], win_assegna);
9371
9389
  return win_assegna;
9372
9390
  }());
@@ -11447,6 +11465,7 @@ var dati_aggiuntivi = /** @class */ (function () {
11447
11465
  this.limite_salto_after = -1;
11448
11466
  this.respingi_enabled = false;
11449
11467
  this.oper = '';
11468
+ this.commento_default = '';
11450
11469
  this.b_edit_before = false;
11451
11470
  this.all_c = 0;
11452
11471
  this.comm_c = 0;
@@ -11811,13 +11830,10 @@ var dati_aggiuntivi = /** @class */ (function () {
11811
11830
  return 0;
11812
11831
  });
11813
11832
  ;
11814
- var dialogRef_1 = this.m_dialog.open(win_assegna, {
11815
- disableClose: true
11816
- });
11817
- setTimeout(function () {
11818
- dialogRef_1.componentInstance.comm_notrequired = _this.nlevel.commenti_opzionali;
11833
+ var dialogRef = this.m_dialog.open(win_assegna, {
11834
+ disableClose: true, data: { commento_default: this.commento_default, comm_notrequired: this.nlevel.commenti_opzionali }
11819
11835
  });
11820
- dialogRef_1.afterClosed().subscribe(function (result) {
11836
+ dialogRef.afterClosed().subscribe(function (result) {
11821
11837
  if (result == "" || result == null) {
11822
11838
  _this.edit_b(true);
11823
11839
  if (_this.respingi_enabled)
@@ -12170,9 +12186,11 @@ var dati_aggiuntivi = /** @class */ (function () {
12170
12186
  this.resp_b(false);
12171
12187
  this.salva();
12172
12188
  };
12173
- dati_aggiuntivi.prototype.procedi = function () {
12189
+ dati_aggiuntivi.prototype.procedi = function (commento_default) {
12190
+ if (commento_default === void 0) { commento_default = ''; }
12174
12191
  this.oper = 'procedi';
12175
12192
  this.btnprocedi = true;
12193
+ this.commento_default = commento_default;
12176
12194
  this.edit_b(false);
12177
12195
  this.resp_b(false);
12178
12196
  if (!this.ck_field()) {
@@ -12845,6 +12863,7 @@ var wkf_header_bar = /** @class */ (function () {
12845
12863
  this.edit_button = false;
12846
12864
  this.respingi_button = false;
12847
12865
  this.procedi_button = true;
12866
+ this.commento_default = '';
12848
12867
  }
12849
12868
  wkf_header_bar.prototype.back = function () { if (this.dt_agg != null)
12850
12869
  this.dt_agg.back(this.edit_button); };
@@ -12853,7 +12872,7 @@ var wkf_header_bar = /** @class */ (function () {
12853
12872
  wkf_header_bar.prototype.respingi = function () { if (this.dt_agg != null)
12854
12873
  this.dt_agg.respingi(); };
12855
12874
  wkf_header_bar.prototype.procedi = function () { if (this.dt_agg != null)
12856
- this.dt_agg.procedi(); };
12875
+ this.dt_agg.procedi(this.commento_default); };
12857
12876
  wkf_header_bar.prototype.open_info = function () { if (this.dt_agg != null)
12858
12877
  this.dt_agg.open_info(); };
12859
12878
  wkf_header_bar.prototype.open_commenti = function () { if (this.dt_agg != null)
@@ -12883,10 +12902,14 @@ var wkf_header_bar = /** @class */ (function () {
12883
12902
  Input(),
12884
12903
  __metadata("design:type", Boolean)
12885
12904
  ], wkf_header_bar.prototype, "procedi_button", void 0);
12905
+ __decorate([
12906
+ Input(),
12907
+ __metadata("design:type", String)
12908
+ ], wkf_header_bar.prototype, "commento_default", void 0);
12886
12909
  wkf_header_bar = __decorate([
12887
12910
  Component({
12888
12911
  selector: 'wkf_header_bar',
12889
- template: "\n\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\">\n<div fxLayout=\"row\" fxLayoutGap=\"3px\" *ngIf=\"!m_appService.getState().pageFullscreen || edit_button || respingi_button\">\n<button mat-flat-button (click)=\"back()\" *ngIf=\"!m_appService.getState().pageFullscreen\">Indietro</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"evt_salv()\" *ngIf=\"edit_button && !m_appService.getState().pageFullscreen\" color=\"primary\" >Salva</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"procedi()\" *ngIf=\"edit_button && procedi_button\" color=\"accent\" >Procedi</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"respingi()\" *ngIf=\"respingi_button\" color=\"warn\" >Respingi</button>\n<!-- <button mat-flat-button (click)=\"doEnd(900)\" color=\"warn\" >test</button>&nbsp;&nbsp;\n-->\n</div>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<div fxLayout=\"row\" fxLayout.xs=\"column\" fxLayoutGap=\"16px\" fxLayoutGap.xs=\"3px\">\n <div fxLayout=\"row\" >\n<button mat-flat-button (click)=\"open_info()\" *ngIf=\"!m_appService.getState().pageFullscreen\"> <mat-icon>info_outline</mat-icon>&nbsp;&nbsp;Info Doc</button>&nbsp;&nbsp;\n<button mat-flat-button [color]=\"(dt_agg?.comm_c?dt_agg?.comm_c:0>0)?'accent':''\" [matBadge]=\"dt_agg?.comm_c?dt_agg?.comm_c:0\" matBadgePosition=\"before\" matBadgeColor=\"primary\" (click)=\"open_commenti()\"> <mat-icon>insert_comment</mat-icon>Commenti</button>&nbsp;&nbsp;</div> <div fxLayout=\"row\">\n<button mat-flat-button [color]=\"(dt_agg?.all_c?dt_agg?.all_c:0>0)?'accent':''\" [matBadge]=\"dt_agg?.all_c?dt_agg?.all_c:0\" matBadgePosition=\"before\" matBadgeColor=\"primary\" (click)=\"open_upload()\"> <mat-icon>attach_file</mat-icon>Allegati</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"open_wkf()\" *ngIf=\"!m_appService.getState().pageFullscreen\"> <mat-icon>transfer_within_a_station</mat-icon>Workflow</button></div>\n</div>\n </div>\n "
12912
+ template: "\n\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\">\n<div fxLayout=\"row\" fxLayoutGap=\"3px\" *ngIf=\"!m_appService.getState().pageFullscreen || edit_button || respingi_button\">\n<button mat-flat-button (click)=\"back()\" *ngIf=\"!m_appService.getState().pageFullscreen\">Indietro</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"evt_salv()\" *ngIf=\"edit_button && !m_appService.getState().pageFullscreen\" color=\"primary\" >Salva</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"procedi()\" *ngIf=\"edit_button && procedi_button\" color=\"accent\" >Procedi</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"respingi()\" *ngIf=\"respingi_button\" color=\"warn\" >Respingi</button>\n<!-- <button mat-flat-button (click)=\"doEnd(900)\" color=\"warn\" >test</button>&nbsp;&nbsp;\n-->\n</div>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<div fxLayout=\"row\" fxLayout.xs=\"column\" fxLayoutGap=\"16px\" fxLayoutGap.xs=\"3px\">\n <div fxLayout=\"row\" >\n <button mat-flat-button (click)=\"open_info()\" *ngIf=\"!m_appService.getState().pageFullscreen\"> <mat-icon>info_outline</mat-icon>&nbsp;&nbsp;Info Doc</button>&nbsp;&nbsp;\n <button mat-flat-button [color]=\"(dt_agg?.comm_c?dt_agg?.comm_c:0>0)?'accent':''\" [matBadge]=\"dt_agg?.comm_c?dt_agg?.comm_c:0\" matBadgePosition=\"before\" matBadgeColor=\"primary\" (click)=\"open_commenti()\"> <mat-icon>insert_comment</mat-icon>Commenti</button>&nbsp;&nbsp;</div> <div fxLayout=\"row\">\n <button mat-flat-button [color]=\"(dt_agg?.all_c?dt_agg?.all_c:0>0)?'accent':''\" [matBadge]=\"dt_agg?.all_c?dt_agg?.all_c:0\" matBadgePosition=\"before\" matBadgeColor=\"primary\" (click)=\"open_upload()\"> <mat-icon>attach_file</mat-icon>Allegati</button>&nbsp;&nbsp;\n <button mat-flat-button (click)=\"open_wkf()\" *ngIf=\"!m_appService.getState().pageFullscreen\"> <mat-icon>transfer_within_a_station</mat-icon>Workflow</button></div>\n </div>\n</div>\n "
12890
12913
  }),
12891
12914
  __metadata("design:paramtypes", [AppService])
12892
12915
  ], wkf_header_bar);