@fluxhub/fluxhub-lib 11.0.14 → 11.0.16

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.
@@ -6726,15 +6726,13 @@
6726
6726
  return s;
6727
6727
  };
6728
6728
  FHGridComponent.prototype.selectAllFiltered = function () {
6729
- var _this = this;
6730
6729
  this.gridOptions.api.forEachNode(function (node) {
6731
- _this.gridOptions.api.selectNode(node, true);
6730
+ node.setSelected(true);
6732
6731
  });
6733
6732
  };
6734
6733
  FHGridComponent.prototype.deselectAllFiltered = function () {
6735
- var _this = this;
6736
6734
  this.gridOptions.api.forEachNode(function (node) {
6737
- _this.gridOptions.api.selectNode(node, false);
6735
+ node.setSelected(false);
6738
6736
  });
6739
6737
  };
6740
6738
  FHGridComponent.prototype.pulisci_filtri = function (resetr) {
@@ -7573,7 +7571,8 @@
7573
7571
  if (data != null)
7574
7572
  if (data.result_msg == "OK") {
7575
7573
  for (var i = 0; i < data.result_data.length; i++)
7576
- data.result_data[i].descrizione_valore = _this._tsr.instant(data.result_data[i].descrizione_valore);
7574
+ if (data.result_data[i].descrizione_valore != null && data.result_data[i].descrizione_valore != '')
7575
+ data.result_data[i].descrizione_valore = _this._tsr.instant(data.result_data[i].descrizione_valore);
7577
7576
  _this.resetD(data.result_data);
7578
7577
  }
7579
7578
  });
@@ -7587,7 +7586,8 @@
7587
7586
  if (data.result_data[i].DESCRIZIONE_VALORE != null)
7588
7587
  data.result_data[i].descrizione_valore =
7589
7588
  data.result_data[i].DESCRIZIONE_VALORE;
7590
- data.result_data[i].descrizione_valore = _this._tsr.instant(data.result_data[i].descrizione_valore);
7589
+ if (data.result_data[i].descrizione_valore != null && data.result_data[i].descrizione_valore != '')
7590
+ data.result_data[i].descrizione_valore = _this._tsr.instant(data.result_data[i].descrizione_valore);
7591
7591
  }
7592
7592
  _this.resetD(data.result_data);
7593
7593
  }
@@ -18771,6 +18771,274 @@
18771
18771
  up: [{ type: i0.ViewChild, args: ["up",] }]
18772
18772
  };
18773
18773
 
18774
+ var fh_win_select_by_grid = /** @class */ (function () {
18775
+ function fh_win_select_by_grid(dialogRef, _dataService, toastr, apps, data) {
18776
+ var _this = this;
18777
+ this.dialogRef = dialogRef;
18778
+ this._dataService = _dataService;
18779
+ this.toastr = toastr;
18780
+ this.apps = apps;
18781
+ this.data = data;
18782
+ this.selection_mode = 'multiple';
18783
+ this.value_sel = [];
18784
+ this.gridOptions = {
18785
+ debug: false,
18786
+ enableRangeSelection: true,
18787
+ defaultColDef: { resizable: true, sortable: true, floatingFilter: true },
18788
+ allowContextMenuWithControlKey: true,
18789
+ localeText: {
18790
+ // for filter panel
18791
+ page: "pagina",
18792
+ more: "altre",
18793
+ to: "a",
18794
+ of: "di",
18795
+ next: "prossima",
18796
+ last: "ultima",
18797
+ first: "prima",
18798
+ previous: "precedente",
18799
+ loadingOoo: "Caricamento...",
18800
+ // for set filter
18801
+ selectAll: "Seleziona Tutto",
18802
+ searchOoo: "Trova...",
18803
+ blanks: "Vuoto",
18804
+ // for number filter and text filter
18805
+ filterOoo: "Filtro...",
18806
+ applyFilter: "Applica Filtro...",
18807
+ // for number filter
18808
+ equals: "Uguale",
18809
+ notEqual: "Diverso",
18810
+ lessThan: "Minore o Uguale",
18811
+ greaterThan: "Maggiore o Uguale",
18812
+ // for text filter
18813
+ notContains: "Non Contiene",
18814
+ contains: "Contiene",
18815
+ startsWith: "Inizia Con",
18816
+ endsWith: "Finisce Con",
18817
+ // the header of the default group column
18818
+ group: "Gruppo",
18819
+ // tool panel
18820
+ columns: "Colonne",
18821
+ rowGroupColumns: "Colonne Pivot",
18822
+ rowGroupColumnsEmptyMessage: "trascina le colonne per raggrupparle",
18823
+ valueColumns: "Colonne Valore",
18824
+ pivotMode: "Modalità Pivot",
18825
+ groups: "Gruppi",
18826
+ values: "Valori",
18827
+ pivots: "Pivots",
18828
+ valueColumnsEmptyMessage: "trascina le colonne per aggreare",
18829
+ pivotColumnsEmptyMessage: "trascina le colonne per pivot",
18830
+ // other
18831
+ noRowsToShow: "nessun dato",
18832
+ // enterprise menu
18833
+ pinColumn: "Sposta Colonna",
18834
+ valueAggregation: "Aggregazione",
18835
+ autosizeThiscolumn: "Autosize colonna",
18836
+ autosizeAllColumns: "Autosize tutte le colonne",
18837
+ groupBy: "Raggruppa per",
18838
+ ungroupBy: "Spacca per",
18839
+ resetColumns: "Resetta queste colonna",
18840
+ expandAll: "Espandi",
18841
+ collapseAll: "Chiudi",
18842
+ toolPanel: "Impostazioni",
18843
+ // enterprise menu pinning
18844
+ pinLeft: "Sposta <<",
18845
+ pinRight: "Sposta >>",
18846
+ noPin: "Sposta <>",
18847
+ // enterprise menu aggregation and status panel
18848
+ sum: "Somma",
18849
+ min: "Minimo",
18850
+ max: "Massimo",
18851
+ none: "Nessuno",
18852
+ count: "Numero",
18853
+ average: "Media",
18854
+ // standard menu
18855
+ copy: "Copia",
18856
+ ctrlC: "ctrl n C",
18857
+ paste: "Incolla",
18858
+ ctrlV: "ctrl n C",
18859
+ }
18860
+ };
18861
+ this.cc_pro = [
18862
+ {
18863
+ color: 'accent',
18864
+ command: 'sel_tutto',
18865
+ icon: 'select_all',
18866
+ label: 'Seleziona Tutto'
18867
+ },
18868
+ {
18869
+ color: 'accent',
18870
+ command: 'desel_tutto',
18871
+ icon: 'all_out',
18872
+ label: 'Deseleziona tutto'
18873
+ }
18874
+ ];
18875
+ this.defaultColDef = {
18876
+ flex: 1,
18877
+ minWidth: 100,
18878
+ resizable: true,
18879
+ headerCheckboxSelection: this.isFirstColumn,
18880
+ checkboxSelection: this.isFirstColumn,
18881
+ };
18882
+ this.columnDefs = [];
18883
+ this.system_dest = 1;
18884
+ this.title = '';
18885
+ this.tbl_name = '';
18886
+ this.tbl_flt = '';
18887
+ this.option = 0;
18888
+ this.init = false;
18889
+ if (data != null) {
18890
+ if (data.title != null)
18891
+ this.title = data.title;
18892
+ if (data.column_defs != null)
18893
+ this.columnDefs = data.column_defs;
18894
+ if (data.value_sel != null)
18895
+ this.value_sel = data.value_sel;
18896
+ this._dataService.doQuery(data.p_query).subscribe(function (data) {
18897
+ if (data != null)
18898
+ if (data.result_msg == "OK") {
18899
+ _this.rowData = data.result_data;
18900
+ _this.fe();
18901
+ }
18902
+ });
18903
+ }
18904
+ }
18905
+ fh_win_select_by_grid.prototype.onReady = function (event) {
18906
+ this.gridApi = event.api;
18907
+ this.fe();
18908
+ };
18909
+ fh_win_select_by_grid.prototype.cmd_wkf_prog = function (o) {
18910
+ if (o.cmd == "sel_tutto") {
18911
+ console.log(this.rowData);
18912
+ var _loop_1 = function (index) {
18913
+ var element = this_1.rowData[index];
18914
+ var v = '';
18915
+ v = element.valore;
18916
+ this_1.getGridApi().forEachNode(function (node) {
18917
+ var sx = '';
18918
+ sx = node.data.valore;
18919
+ if (sx == v) {
18920
+ node.setSelected(true);
18921
+ }
18922
+ });
18923
+ };
18924
+ var this_1 = this;
18925
+ for (var index = 0; index < this.rowData.length; index++) {
18926
+ _loop_1(index);
18927
+ }
18928
+ }
18929
+ if (o.cmd == "desel_tutto") {
18930
+ var _loop_2 = function (index) {
18931
+ var element = this_2.rowData[index];
18932
+ var v = '';
18933
+ v = element.valore;
18934
+ this_2.getGridApi().forEachNode(function (node) {
18935
+ var sx = '';
18936
+ sx = node.data.valore;
18937
+ if (sx == v) {
18938
+ node.setSelected(false);
18939
+ }
18940
+ });
18941
+ };
18942
+ var this_2 = this;
18943
+ for (var index = 0; index < this.rowData.length; index++) {
18944
+ _loop_2(index);
18945
+ }
18946
+ }
18947
+ };
18948
+ fh_win_select_by_grid.prototype.getGridApi = function () {
18949
+ return this.gridOptions.api;
18950
+ };
18951
+ fh_win_select_by_grid.prototype.getGridOptions = function () {
18952
+ return this.gridOptions;
18953
+ };
18954
+ fh_win_select_by_grid.prototype.selc = function (o) {
18955
+ var _this = this;
18956
+ this.option = o;
18957
+ var rowsSelection = this.getGridApi().getSelectedNodes();
18958
+ this.value_sel = [];
18959
+ rowsSelection.map(function (v) {
18960
+ _this.value_sel.push({ valore: v.data });
18961
+ });
18962
+ };
18963
+ fh_win_select_by_grid.prototype.onSelectionChanged = function (event) {
18964
+ var _this = this;
18965
+ var rowCount = this.getGridApi().getSelectedNodes().length;
18966
+ this.option = rowCount;
18967
+ var rowsSelection = this.getGridApi().getSelectedNodes();
18968
+ this.value_sel = [];
18969
+ rowsSelection.map(function (v) {
18970
+ _this.value_sel.push(v.data);
18971
+ });
18972
+ console.log('selectionChanged');
18973
+ };
18974
+ fh_win_select_by_grid.prototype.isFirstColumn = function (params) {
18975
+ var displayedColumns = params.columnApi.getAllDisplayedColumns();
18976
+ var thisIsFirstColumn = displayedColumns[0] === params.column;
18977
+ return thisIsFirstColumn;
18978
+ };
18979
+ fh_win_select_by_grid.prototype.ngAfterViewInit = function () { };
18980
+ fh_win_select_by_grid.prototype.fe = function () {
18981
+ var _this = this;
18982
+ setTimeout(function () {
18983
+ console.log('this.getGridApi() ', _this.getGridApi(), _this.value_sel);
18984
+ _this.value_sel.map(function (v) {
18985
+ var i = 0;
18986
+ _this.getGridApi().forEachNode(function (node) {
18987
+ var sx = '';
18988
+ sx = node.data.valore;
18989
+ if (sx == v.valore) {
18990
+ // console.log('OK!!')
18991
+ node.setSelected(true);
18992
+ }
18993
+ });
18994
+ });
18995
+ }, 100);
18996
+ };
18997
+ fh_win_select_by_grid.prototype.getSelStr = function () {
18998
+ var sx = "";
18999
+ for (var i = 0; i < this.value_sel.length; i++) {
19000
+ if (sx != "")
19001
+ sx = sx + ",";
19002
+ sx = sx + this.value_sel[i].descrizione_valore;
19003
+ }
19004
+ return sx;
19005
+ };
19006
+ fh_win_select_by_grid.prototype.getSelVal = function () {
19007
+ var sx = "";
19008
+ for (var i = 0; i < this.value_sel.length; i++) {
19009
+ if (sx != "")
19010
+ sx = sx + ",";
19011
+ sx = sx + this.value_sel[i].valore;
19012
+ }
19013
+ return sx;
19014
+ };
19015
+ fh_win_select_by_grid.prototype.getSelArr = function () {
19016
+ return this.value_sel;
19017
+ };
19018
+ fh_win_select_by_grid.prototype.ok = function () {
19019
+ this.dialogRef.close(this.getSelArr());
19020
+ };
19021
+ return fh_win_select_by_grid;
19022
+ }());
19023
+ fh_win_select_by_grid.decorators = [
19024
+ { type: i0.Component, args: [{
19025
+ selector: "PickList",
19026
+ template: "\n <div\u00A0fxLayout=\"column\">\n<div\u00A0\u00A0fxFlex=\"100\"\u00A0fxLayout=\"row\"\u00A0\u00A0\u00A0fxLayoutAlign=\"start\u00A0center\"\u00A0\u00A0\u00A0class=\"dialog_header\">\u00A0\n<div\u00A0\u00A0\u00A0\u00A0\u00A0fxLayout=\"row\"\u00A0\u00A0fxLayoutAlign=\"start\u00A0center\"\u00A0fxFlex=\"50\"><div>{{title}}</div></div>\u00A0\n<div\u00A0\u00A0\u00A0fxFlex=\"50\"\u00A0fxLayout=\"row\"\u00A0fxLayoutAlign=\"end\u00A0center\">\n<div style=\"width: 100%;text-align:right\">\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)=\"dialogRef.close(null)\"\u00A0/>\n</div>\n</div>\n</div>\n<hr\u00A0width=\"100%\"\u00A0size=\"0.5\"\u00A0color=\"#DDDDDD\">\n\n <div [style.height]=\"'500px'\" style=\"width:100%;overflow:auto;\">\n\n <ag-grid-angular\n ref-agGrid\n style=\"width: 100%; height: 100%;\"\n id=\"myGrid\"\n class=\"ag-theme-balham\"\n [columnDefs]=\"columnDefs\"\n [rowData]=\"rowData\"\n (gridReady)=\"onReady($event)\"\n [rowSelection]=\"selection_mode\"\n [gridOptions]=\"gridOptions\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n </ag-grid-angular>\n\n </div>\n\n <br /><br />\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"5px\">\n <button mat-flat-button color=\"primary\" (click)=\"ok()\">Ok ({{value_sel.length}})</button\n >&nbsp;&nbsp;&nbsp;\n <button\n mat-flat-button\n style=\"background-color: #F5F5F5\"\n (click)=\"dialogRef.close()\"\n >\n {{'Annulla' }}\n </button>\n </div> </div>\n\n ",
19027
+ styles: ["\n .mat-dialog-content\u00A0{\u00A0\u00A0max-height:\u00A0unset\u00A0!important;\u00A0}\n .selector {\n cursor: hand;\n }\n "]
19028
+ },] }
19029
+ ];
19030
+ fh_win_select_by_grid.ctorParameters = function () { return [
19031
+ { type: dialog.MatDialogRef },
19032
+ { type: QueryService },
19033
+ { type: i3.ToastrService },
19034
+ { type: AppService },
19035
+ { type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
19036
+ ]; };
19037
+ fh_win_select_by_grid.propDecorators = {
19038
+ selection_mode: [{ type: i0.Input }],
19039
+ dtmt: [{ type: i0.ViewChild, args: ['dtmt',] }]
19040
+ };
19041
+
18774
19042
  var FluxhubLibModule = /** @class */ (function () {
18775
19043
  function FluxhubLibModule() {
18776
19044
  }
@@ -18883,6 +19151,7 @@
18883
19151
  fh_win_app_logs,
18884
19152
  FHCurrencyPipe,
18885
19153
  fh_win_mappa,
19154
+ fh_win_select_by_grid,
18886
19155
  TextAreaEditor,
18887
19156
  ComboBoxEditor,
18888
19157
  FHListComponent,
@@ -18931,6 +19200,7 @@
18931
19200
  fh_win_ask_buttons,
18932
19201
  FHGridToolBarComponent,
18933
19202
  fh_win_time_slider,
19203
+ fh_win_select_by_grid,
18934
19204
  FHTimePickerComponent,
18935
19205
  CurrencyComponent,
18936
19206
  FHUploadPanelComponent,
@@ -23582,9 +23852,9 @@
23582
23852
  " non presenta utenti partecipanti validi", 1);
23583
23853
  return;
23584
23854
  }
23855
+ console.log(' o.pre_assegna_req ', o.pre_assegna_req);
23585
23856
  if (this.transizione_info.manual_assignment == 1 || o.pre_assegna_man == 1) {
23586
23857
  var att_autor_1 = [];
23587
- //console.log('this.m_obj.creatore ',this.m_obj.creatore);
23588
23858
  if (this.m_obj.creatore != null)
23589
23859
  if (this.m_obj.creatore != "")
23590
23860
  arrAutori.map(function (v) {
@@ -23637,12 +23907,34 @@
23637
23907
  var arr_aut_1 = [];
23638
23908
  var arr_aut_all_2 = JSON.parse(JSON.stringify(arrAutori));
23639
23909
  var b_f_1 = false;
23910
+ if (o.pre_assegna_req == 1) {
23911
+ var att_autor_2 = [];
23912
+ if (this.m_obj.creatore != null)
23913
+ if (this.m_obj.creatore != "")
23914
+ arrAutori.map(function (v) {
23915
+ // console.log('v ',v);
23916
+ if (v.username == _this.m_obj.creatore) {
23917
+ att_autor_2.push(v);
23918
+ }
23919
+ });
23920
+ att_autor_2 = att_autor_2.sort(function (n1, n2) {
23921
+ if (n1.nc > n2.nc) {
23922
+ return 1;
23923
+ }
23924
+ if (n1.nc < n2.nc) {
23925
+ return -1;
23926
+ }
23927
+ return 0;
23928
+ });
23929
+ if (att_autor_2.length > 0) {
23930
+ arrAutori = JSON.parse(JSON.stringify(att_autor_2));
23931
+ }
23932
+ }
23640
23933
  arrAutori.map(function (v) {
23641
23934
  if (v.default_value != null)
23642
23935
  if (v.default_value == 1)
23643
23936
  b_f_1 = true;
23644
23937
  });
23645
- console.log("b_f ", b_f_1);
23646
23938
  if (b_f_1) {
23647
23939
  arrAutori.map(function (v) {
23648
23940
  if (v.default_value != null)
@@ -23651,7 +23943,6 @@
23651
23943
  });
23652
23944
  arrAutori = JSON.parse(JSON.stringify(arr_aut_1));
23653
23945
  }
23654
- console.log("arrAutori ", arrAutori); //qui6
23655
23946
  for (var i = 0; i < arrAutori.length; i++)
23656
23947
  if (arrAutori[i].nc != null)
23657
23948
  if (sp.indexOf(arrAutori[i].nc) == -1) {
@@ -25337,6 +25628,7 @@
25337
25628
  exports.fh_win_mappa = fh_win_mappa;
25338
25629
  exports.fh_win_output = fh_win_output;
25339
25630
  exports.fh_win_picklist = fh_win_picklist;
25631
+ exports.fh_win_select_by_grid = fh_win_select_by_grid;
25340
25632
  exports.fh_win_show_email = fh_win_show_email;
25341
25633
  exports.fh_win_show_email_s3 = fh_win_show_email_s3;
25342
25634
  exports.fh_win_show_image = fh_win_show_image;