@fluxhub/fluxhub-lib 11.0.123 → 11.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/fluxhub-fluxhub-lib.umd.js +322 -342
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhgridn.js +341 -361
- package/fesm2015/fluxhub-fluxhub-lib.js +322 -342
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhgridn.d.ts +14 -14
- package/package.json +1 -1
|
@@ -27828,24 +27828,24 @@ class FHGridComponentN {
|
|
|
27828
27828
|
this.uti_s = uti_s;
|
|
27829
27829
|
this._fileService = _fileService;
|
|
27830
27830
|
this.clipboard = clipboard;
|
|
27831
|
-
this.width_max =
|
|
27832
|
-
this.browser =
|
|
27831
|
+
this.width_max = "100%";
|
|
27832
|
+
this.browser = "nd";
|
|
27833
27833
|
this.pagination = false;
|
|
27834
27834
|
this.paginationPageSize = 10;
|
|
27835
27835
|
this.paginationAutoPageSize = false;
|
|
27836
27836
|
this.tooltipShowDelay = 2000;
|
|
27837
|
-
this.elimina_label =
|
|
27838
|
-
this.export_field_aggiuntivi =
|
|
27839
|
-
this.end_point =
|
|
27840
|
-
this.tbl_name =
|
|
27837
|
+
this.elimina_label = "ELIMINA";
|
|
27838
|
+
this.export_field_aggiuntivi = "";
|
|
27839
|
+
this.end_point = "";
|
|
27840
|
+
this.tbl_name = "";
|
|
27841
27841
|
this.columnDefs = [];
|
|
27842
27842
|
this.num_per_pag = 35;
|
|
27843
|
-
this.grid_key =
|
|
27844
|
-
this.service =
|
|
27843
|
+
this.grid_key = "PRO_H";
|
|
27844
|
+
this.service = "dogridn";
|
|
27845
27845
|
this.enabled = true;
|
|
27846
27846
|
this.show_link = false;
|
|
27847
27847
|
this.show_help_bar = false;
|
|
27848
|
-
this.help_label_bar =
|
|
27848
|
+
this.help_label_bar = "HELP";
|
|
27849
27849
|
this.auto_load = true;
|
|
27850
27850
|
this.auto_height = false;
|
|
27851
27851
|
this.enable_export = true;
|
|
@@ -27855,7 +27855,7 @@ class FHGridComponentN {
|
|
|
27855
27855
|
this.private_pref = false;
|
|
27856
27856
|
this.system_dest = 1;
|
|
27857
27857
|
this.header_h = 35;
|
|
27858
|
-
this.selection_mode =
|
|
27858
|
+
this.selection_mode = "multiple";
|
|
27859
27859
|
this.init_fill = true;
|
|
27860
27860
|
this.no_pref = false;
|
|
27861
27861
|
this.pref_hidden = true;
|
|
@@ -27864,13 +27864,13 @@ class FHGridComponentN {
|
|
|
27864
27864
|
this.enable_copy = true;
|
|
27865
27865
|
this.full_text_added_columns = [];
|
|
27866
27866
|
this.autosize_at_ini = true;
|
|
27867
|
-
this.label_elementi =
|
|
27868
|
-
this.trova_label =
|
|
27869
|
-
this.mantieni_impostazioni =
|
|
27867
|
+
this.label_elementi = " Elementi";
|
|
27868
|
+
this.trova_label = "TROVA";
|
|
27869
|
+
this.mantieni_impostazioni = "Mantieni Imp.";
|
|
27870
27870
|
this.row_height = 25;
|
|
27871
27871
|
this.master_detail = false;
|
|
27872
27872
|
this.detail_cell_renderer = null;
|
|
27873
|
-
this.curr_filter =
|
|
27873
|
+
this.curr_filter = "";
|
|
27874
27874
|
this.show_buttons = true;
|
|
27875
27875
|
this.fill_end = new EventEmitter();
|
|
27876
27876
|
this.cell_edited = new EventEmitter();
|
|
@@ -27879,14 +27879,14 @@ class FHGridComponentN {
|
|
|
27879
27879
|
this.columndclicked = new EventEmitter();
|
|
27880
27880
|
this.cell_clicked = new EventEmitter();
|
|
27881
27881
|
this.custom_export = false;
|
|
27882
|
-
this.toolbar_type =
|
|
27882
|
+
this.toolbar_type = "NONE";
|
|
27883
27883
|
this.toolbar_custom_commands = [];
|
|
27884
27884
|
this.exec_params = [];
|
|
27885
27885
|
this.command = new EventEmitter();
|
|
27886
27886
|
this.b_ensure = false;
|
|
27887
27887
|
this.gf = null;
|
|
27888
27888
|
this.toggle_mantieni = null;
|
|
27889
|
-
this.curr_config =
|
|
27889
|
+
this.curr_config = "-1";
|
|
27890
27890
|
this.win_opt = null;
|
|
27891
27891
|
/* calcola_filtro(obj_filtro, filter_v, key, add_end = true) {
|
|
27892
27892
|
console.log('calcola_filtro ',key,add_end);
|
|
@@ -28140,7 +28140,7 @@ class FHGridComponentN {
|
|
|
28140
28140
|
this.off_set = 0;
|
|
28141
28141
|
this.first_ref = true;
|
|
28142
28142
|
this.b_restored = false;
|
|
28143
|
-
this.str_curr_q_p =
|
|
28143
|
+
this.str_curr_q_p = "";
|
|
28144
28144
|
this.p_fi = {};
|
|
28145
28145
|
this.dataSource = {
|
|
28146
28146
|
//rowCount: ???, - not setting the row count, infinite paging will be used
|
|
@@ -28154,38 +28154,39 @@ class FHGridComponentN {
|
|
|
28154
28154
|
this.m_appService.start();
|
|
28155
28155
|
let p = { kd: this.tbl_name };
|
|
28156
28156
|
p.num_per_pag = params.request.endRow - params.request.startRow;
|
|
28157
|
-
p.fix_flt =
|
|
28157
|
+
p.fix_flt = this.fix_flt || "";
|
|
28158
28158
|
p.curr_page = Math.round(params.request.startRow / p.num_per_pag);
|
|
28159
28159
|
if (p.curr_page == null)
|
|
28160
28160
|
p.curr_page = 0;
|
|
28161
28161
|
if (p.num_per_pag == null)
|
|
28162
28162
|
p.num_per_pag = this.num_per_pag;
|
|
28163
28163
|
p.system_dest = this.system_dest;
|
|
28164
|
-
p.exec_params =
|
|
28164
|
+
p.exec_params = this.exec_params || [];
|
|
28165
28165
|
p.p = JSON.stringify({
|
|
28166
28166
|
sort_model: params.request.sortModel,
|
|
28167
28167
|
filter_model: params.request.filterModel,
|
|
28168
28168
|
free_search: this.ric_libera,
|
|
28169
|
-
fix_flt:
|
|
28169
|
+
fix_flt: this.fix_flt || "",
|
|
28170
28170
|
});
|
|
28171
28171
|
if ((params.request.filterModel == null ||
|
|
28172
|
-
JSON.stringify(params.request.filterModel) ==
|
|
28173
|
-
(this.ric_libera == null || this.ric_libera ==
|
|
28172
|
+
JSON.stringify(params.request.filterModel) == "{}") &&
|
|
28173
|
+
(this.ric_libera == null || this.ric_libera == ""))
|
|
28174
28174
|
this.show_pulisci_filtri = false;
|
|
28175
28175
|
else
|
|
28176
28176
|
this.show_pulisci_filtri = true;
|
|
28177
28177
|
this.p_fi = {
|
|
28178
28178
|
kd: p.kd,
|
|
28179
|
-
system_dest: p.system_dest,
|
|
28179
|
+
system_dest: p.system_dest,
|
|
28180
|
+
exec_params: this.exec_params || [],
|
|
28180
28181
|
p: p.p,
|
|
28181
|
-
fix_flt:
|
|
28182
|
+
fix_flt: this.fix_flt || "",
|
|
28182
28183
|
};
|
|
28183
28184
|
this._gridservice
|
|
28184
28185
|
.doQuery(p, true, this.m_appService.API_ENDPOINT + this.service)
|
|
28185
28186
|
.subscribe((data) => {
|
|
28186
28187
|
let ok_op = false;
|
|
28187
28188
|
if (data != null)
|
|
28188
|
-
if (data.result_msg ==
|
|
28189
|
+
if (data.result_msg == "OK") {
|
|
28189
28190
|
ok_op = true;
|
|
28190
28191
|
// console.log(data.result_data, data.count);
|
|
28191
28192
|
params.successCallback(data.result_data, data.count);
|
|
@@ -28197,29 +28198,28 @@ class FHGridComponentN {
|
|
|
28197
28198
|
this.check_width();
|
|
28198
28199
|
// console.log("end");
|
|
28199
28200
|
// console.log(localStorage.getItem(this.grid_key+'_POS'));
|
|
28200
|
-
localStorage.setItem(this.grid_key +
|
|
28201
|
-
if (localStorage.getItem(this.grid_key +
|
|
28201
|
+
localStorage.setItem(this.grid_key + "_POS1", JSON.stringify(p));
|
|
28202
|
+
if (localStorage.getItem(this.grid_key + "_POS2") != null)
|
|
28202
28203
|
if (this.gridOptions != null)
|
|
28203
28204
|
if (this.gridOptions.api != null)
|
|
28204
28205
|
this.gridOptions.api.forEachNode((node) => {
|
|
28205
28206
|
// console.log(node)
|
|
28206
28207
|
if (this.getRowNodeId(node) ===
|
|
28207
|
-
localStorage.getItem(this.grid_key +
|
|
28208
|
+
localStorage.getItem(this.grid_key + "_POS2")) {
|
|
28208
28209
|
node.setSelected(true);
|
|
28209
|
-
localStorage.removeItem(this.grid_key +
|
|
28210
|
-
if (localStorage.getItem(this.grid_key +
|
|
28210
|
+
localStorage.removeItem(this.grid_key + "_POS2");
|
|
28211
|
+
if (localStorage.getItem(this.grid_key + "_LAST_ROW") !=
|
|
28211
28212
|
null)
|
|
28212
|
-
this.sRow = JSON.parse(localStorage.getItem(this.grid_key +
|
|
28213
|
+
this.sRow = JSON.parse(localStorage.getItem(this.grid_key + "_LAST_ROW") || "{}");
|
|
28213
28214
|
else
|
|
28214
28215
|
this.sRow = null;
|
|
28215
|
-
localStorage.removeItem(this.grid_key +
|
|
28216
|
+
localStorage.removeItem(this.grid_key + "_LAST_ROW");
|
|
28216
28217
|
}
|
|
28217
28218
|
});
|
|
28218
28219
|
let b_mantieni_ck = false;
|
|
28219
28220
|
if (this.toggle_mantieni != null)
|
|
28220
28221
|
b_mantieni_ck = this.toggle_mantieni.checked;
|
|
28221
|
-
if (this.no_pref && !this.b_init1 &&
|
|
28222
|
-
this.autosize_at_ini) {
|
|
28222
|
+
if (this.no_pref && !this.b_init1 && this.autosize_at_ini) {
|
|
28223
28223
|
this.autoSizeAll();
|
|
28224
28224
|
}
|
|
28225
28225
|
this.b_init1 = true;
|
|
@@ -28231,7 +28231,7 @@ class FHGridComponentN {
|
|
|
28231
28231
|
this.first_ref = false;
|
|
28232
28232
|
|
|
28233
28233
|
|
|
28234
|
-
} else*/ if (localStorage.getItem(this.grid_key +
|
|
28234
|
+
} else*/ if (localStorage.getItem(this.grid_key + "_COLS") == null &&
|
|
28235
28235
|
this.autosize_at_ini)
|
|
28236
28236
|
setTimeout(() => {
|
|
28237
28237
|
this.autoSizeAll();
|
|
@@ -28254,7 +28254,7 @@ class FHGridComponentN {
|
|
|
28254
28254
|
// console.log(this.myData);
|
|
28255
28255
|
}
|
|
28256
28256
|
if (!ok_op) {
|
|
28257
|
-
this.errorMsg = data.msg +
|
|
28257
|
+
this.errorMsg = data.msg + " [" + data.result_msg + "]";
|
|
28258
28258
|
}
|
|
28259
28259
|
}, (err) => {
|
|
28260
28260
|
this.errorMsg =
|
|
@@ -28264,23 +28264,23 @@ class FHGridComponentN {
|
|
|
28264
28264
|
},
|
|
28265
28265
|
};
|
|
28266
28266
|
this.getContextMenuItems_n_e = () => [
|
|
28267
|
-
|
|
28268
|
-
|
|
28269
|
-
|
|
28270
|
-
|
|
28271
|
-
|
|
28272
|
-
|
|
28267
|
+
"autoSizeAll",
|
|
28268
|
+
"expandAll",
|
|
28269
|
+
"contractAll",
|
|
28270
|
+
"copy",
|
|
28271
|
+
"copyWithHeaders",
|
|
28272
|
+
"paste",
|
|
28273
28273
|
];
|
|
28274
28274
|
this.getContextMenuItems_e = () => [
|
|
28275
|
-
|
|
28276
|
-
|
|
28277
|
-
|
|
28278
|
-
|
|
28279
|
-
|
|
28280
|
-
|
|
28275
|
+
"autoSizeAll",
|
|
28276
|
+
"expandAll",
|
|
28277
|
+
"contractAll",
|
|
28278
|
+
"copy",
|
|
28279
|
+
"copyWithHeaders",
|
|
28280
|
+
"paste",
|
|
28281
28281
|
// 'resetColumns',
|
|
28282
28282
|
{
|
|
28283
|
-
name:
|
|
28283
|
+
name: "Esporta",
|
|
28284
28284
|
action: () => {
|
|
28285
28285
|
this.export_excel();
|
|
28286
28286
|
},
|
|
@@ -28288,49 +28288,49 @@ class FHGridComponentN {
|
|
|
28288
28288
|
},
|
|
28289
28289
|
];
|
|
28290
28290
|
this.gridOptions = {};
|
|
28291
|
-
this.last_copy =
|
|
28291
|
+
this.last_copy = "";
|
|
28292
28292
|
this.showGrid = true;
|
|
28293
28293
|
this.rowData = [];
|
|
28294
28294
|
this.rowCount = null;
|
|
28295
28295
|
this.b_init = false;
|
|
28296
28296
|
this.b_init1 = false;
|
|
28297
|
-
this.errorMsg =
|
|
28297
|
+
this.errorMsg = "";
|
|
28298
28298
|
this.innerWidth = 750;
|
|
28299
28299
|
this.init_opt = false;
|
|
28300
28300
|
this.show_pulisci_filtri = false;
|
|
28301
|
-
this.uiid_stampa =
|
|
28301
|
+
this.uiid_stampa = "";
|
|
28302
28302
|
this.xxopx = 0;
|
|
28303
28303
|
this.num_r = 0;
|
|
28304
28304
|
this.ready = false;
|
|
28305
28305
|
this.ckk_ed = false;
|
|
28306
28306
|
this.myData = new Array();
|
|
28307
28307
|
this.b_iniended = false;
|
|
28308
|
-
this.ric_libera =
|
|
28309
|
-
this.fix_flt =
|
|
28310
|
-
this.fix_flt_temp =
|
|
28308
|
+
this.ric_libera = "";
|
|
28309
|
+
this.fix_flt = "";
|
|
28310
|
+
this.fix_flt_temp = "";
|
|
28311
28311
|
if (this.m_appService.getState().grid_obj == null)
|
|
28312
28312
|
this.m_appService.getState().grid_obj = {};
|
|
28313
28313
|
this.browser = this.getBrowserName();
|
|
28314
|
-
if (this.browser ==
|
|
28315
|
-
this.width_max =
|
|
28314
|
+
if (this.browser == "ie")
|
|
28315
|
+
this.width_max = "";
|
|
28316
28316
|
}
|
|
28317
28317
|
getBrowserName() {
|
|
28318
28318
|
const agent = window.navigator.userAgent.toLowerCase();
|
|
28319
28319
|
switch (true) {
|
|
28320
|
-
case agent.indexOf(
|
|
28321
|
-
return
|
|
28322
|
-
case agent.indexOf(
|
|
28323
|
-
return
|
|
28324
|
-
case agent.indexOf(
|
|
28325
|
-
return
|
|
28326
|
-
case agent.indexOf(
|
|
28327
|
-
return
|
|
28328
|
-
case agent.indexOf(
|
|
28329
|
-
return
|
|
28330
|
-
case agent.indexOf(
|
|
28331
|
-
return
|
|
28320
|
+
case agent.indexOf("edge") > -1:
|
|
28321
|
+
return "edge";
|
|
28322
|
+
case agent.indexOf("opr") > -1 && !!window.opr:
|
|
28323
|
+
return "opera";
|
|
28324
|
+
case agent.indexOf("chrome") > -1 && !!window.chrome:
|
|
28325
|
+
return "chrome";
|
|
28326
|
+
case agent.indexOf("trident") > -1:
|
|
28327
|
+
return "ie";
|
|
28328
|
+
case agent.indexOf("firefox") > -1:
|
|
28329
|
+
return "firefox";
|
|
28330
|
+
case agent.indexOf("safari") > -1:
|
|
28331
|
+
return "safari";
|
|
28332
28332
|
default:
|
|
28333
|
-
return
|
|
28333
|
+
return "other";
|
|
28334
28334
|
}
|
|
28335
28335
|
}
|
|
28336
28336
|
check_width() {
|
|
@@ -28354,10 +28354,10 @@ class FHGridComponentN {
|
|
|
28354
28354
|
return;
|
|
28355
28355
|
this.b_ensure = true;
|
|
28356
28356
|
try {
|
|
28357
|
-
if (localStorage.getItem(this.grid_key +
|
|
28357
|
+
if (localStorage.getItem(this.grid_key + "_POS") != null) {
|
|
28358
28358
|
if (this.gridOptions.api)
|
|
28359
|
-
this.gridOptions.api.ensureIndexVisible(parseInt(localStorage.getItem(this.grid_key +
|
|
28360
|
-
localStorage.removeItem(this.grid_key +
|
|
28359
|
+
this.gridOptions.api.ensureIndexVisible(parseInt(localStorage.getItem(this.grid_key + "_POS") || "0"));
|
|
28360
|
+
localStorage.removeItem(this.grid_key + "_POS");
|
|
28361
28361
|
}
|
|
28362
28362
|
}
|
|
28363
28363
|
catch (e) {
|
|
@@ -28367,10 +28367,10 @@ class FHGridComponentN {
|
|
|
28367
28367
|
ck_flag() {
|
|
28368
28368
|
if (this.toggle_mantieni)
|
|
28369
28369
|
if (!this.toggle_mantieni.checked) {
|
|
28370
|
-
localStorage.setItem(this.grid_key +
|
|
28370
|
+
localStorage.setItem(this.grid_key + "_MANTIENI", "SI");
|
|
28371
28371
|
}
|
|
28372
28372
|
else {
|
|
28373
|
-
localStorage.setItem(this.grid_key +
|
|
28373
|
+
localStorage.setItem(this.grid_key + "_MANTIENI", "NO");
|
|
28374
28374
|
}
|
|
28375
28375
|
}
|
|
28376
28376
|
refresh_all_rows() {
|
|
@@ -28386,27 +28386,27 @@ class FHGridComponentN {
|
|
|
28386
28386
|
return;
|
|
28387
28387
|
if (this.gf)
|
|
28388
28388
|
this.curr_config = this.gf.getValue();
|
|
28389
|
-
if (this.curr_config ==
|
|
28389
|
+
if (this.curr_config == "-1")
|
|
28390
28390
|
return;
|
|
28391
|
-
localStorage.removeItem(this.grid_key +
|
|
28392
|
-
localStorage.removeItem(this.grid_key +
|
|
28393
|
-
localStorage.removeItem(this.grid_key +
|
|
28394
|
-
localStorage.removeItem(this.grid_key +
|
|
28391
|
+
localStorage.removeItem(this.grid_key + "_COLS");
|
|
28392
|
+
localStorage.removeItem(this.grid_key + "_FILTER");
|
|
28393
|
+
localStorage.removeItem(this.grid_key + "_CFG_DEFAULT");
|
|
28394
|
+
localStorage.removeItem(this.grid_key + "_FILTER_UP");
|
|
28395
28395
|
if (this.gf)
|
|
28396
28396
|
if (this.gf.getObj().COL != null)
|
|
28397
|
-
if (this.gf.getObj().COL !=
|
|
28398
|
-
localStorage.setItem(this.grid_key +
|
|
28397
|
+
if (this.gf.getObj().COL != "")
|
|
28398
|
+
localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COL);
|
|
28399
28399
|
// if (this.gf.getObj().SORT != null)
|
|
28400
28400
|
// if (this.gf.getObj().SORT != "")
|
|
28401
28401
|
// localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
|
|
28402
28402
|
if (this.gf)
|
|
28403
28403
|
if (this.gf.getObj().FILTER != null)
|
|
28404
|
-
if (this.gf.getObj().FILTER !=
|
|
28405
|
-
localStorage.setItem(this.grid_key +
|
|
28404
|
+
if (this.gf.getObj().FILTER != "")
|
|
28405
|
+
localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
|
|
28406
28406
|
if (this.gf)
|
|
28407
28407
|
if (this.gf.getDescri() != null)
|
|
28408
|
-
if (this.gf.getDescri() !=
|
|
28409
|
-
localStorage.setItem(this.grid_key +
|
|
28408
|
+
if (this.gf.getDescri() != "-1")
|
|
28409
|
+
localStorage.setItem(this.grid_key + "_CFG_DEFAULT", this.gf.getDescri() || "");
|
|
28410
28410
|
if (this.gf)
|
|
28411
28411
|
this.curr_config = this.gf.getValue();
|
|
28412
28412
|
this.res_columns(true);
|
|
@@ -28415,14 +28415,14 @@ class FHGridComponentN {
|
|
|
28415
28415
|
if (this.gf)
|
|
28416
28416
|
if (this.gf.getObj().username != null)
|
|
28417
28417
|
if (this.m_appService.user != this.gf.getObj().username) {
|
|
28418
|
-
this._toast.error(
|
|
28418
|
+
this._toast.error("Configurazione gestibile da: " + this.gf.getObj().username);
|
|
28419
28419
|
return;
|
|
28420
28420
|
}
|
|
28421
|
-
localStorage.setItem(this.m_appService.COMPANY_KEY +
|
|
28421
|
+
localStorage.setItem(this.m_appService.COMPANY_KEY + "title_dialog", "Conferma Operazione");
|
|
28422
28422
|
if (this.gf)
|
|
28423
|
-
localStorage.setItem(this.m_appService.COMPANY_KEY +
|
|
28423
|
+
localStorage.setItem(this.m_appService.COMPANY_KEY + "msg_dialog", "Confermi di voler cancellare la configurazione " +
|
|
28424
28424
|
this.gf.getDescri() +
|
|
28425
|
-
|
|
28425
|
+
"?");
|
|
28426
28426
|
let dialogRef = this.m_dialog.open(fh_win_confirm, {
|
|
28427
28427
|
disableClose: true,
|
|
28428
28428
|
});
|
|
@@ -28430,21 +28430,21 @@ class FHGridComponentN {
|
|
|
28430
28430
|
if (result) {
|
|
28431
28431
|
if (this.gf) {
|
|
28432
28432
|
let p = new QParam();
|
|
28433
|
-
p.sql =
|
|
28434
|
-
p.types = [
|
|
28433
|
+
p.sql = "DELETE_CFG_GRID";
|
|
28434
|
+
p.types = ["string", "string"];
|
|
28435
28435
|
p.values = [this.gf.getDescri(), this.grid_key];
|
|
28436
28436
|
let ok_op = false;
|
|
28437
28437
|
this._dataService.doQuery(p).subscribe((data) => {
|
|
28438
28438
|
let ok_op = false;
|
|
28439
28439
|
if (data != null)
|
|
28440
|
-
if (data.result_msg ==
|
|
28441
|
-
this._toast.info(
|
|
28440
|
+
if (data.result_msg == "OK") {
|
|
28441
|
+
this._toast.info("Configurazione eliminata");
|
|
28442
28442
|
if (this.gf) {
|
|
28443
|
-
this.gf.types = [
|
|
28443
|
+
this.gf.types = ["string"];
|
|
28444
28444
|
this.gf.values = [this.grid_key];
|
|
28445
28445
|
this.gf.fillCombo();
|
|
28446
28446
|
}
|
|
28447
|
-
this.curr_config =
|
|
28447
|
+
this.curr_config = "-1";
|
|
28448
28448
|
}
|
|
28449
28449
|
});
|
|
28450
28450
|
}
|
|
@@ -28455,37 +28455,44 @@ class FHGridComponentN {
|
|
|
28455
28455
|
if (this.gf)
|
|
28456
28456
|
if (this.gf.getObj().username != null)
|
|
28457
28457
|
if (this.m_appService.user != this.gf.getObj().username) {
|
|
28458
|
-
this._toast.error(
|
|
28458
|
+
this._toast.error("Configurazione gestibile da: " + this.gf.getObj().username);
|
|
28459
28459
|
return;
|
|
28460
28460
|
}
|
|
28461
|
-
localStorage.setItem(this.m_appService.COMPANY_KEY +
|
|
28461
|
+
localStorage.setItem(this.m_appService.COMPANY_KEY + "title_dialog", "Conferma Operazione");
|
|
28462
28462
|
if (this.gf) {
|
|
28463
|
-
localStorage.setItem(this.m_appService.COMPANY_KEY +
|
|
28463
|
+
localStorage.setItem(this.m_appService.COMPANY_KEY + "msg_dialog", "Confermi di voler sovrascrivere la configurazione " +
|
|
28464
28464
|
this.gf.getDescri() +
|
|
28465
|
-
|
|
28465
|
+
"?");
|
|
28466
28466
|
let dialogRef = this.m_dialog.open(fh_win_confirm, {
|
|
28467
28467
|
disableClose: true,
|
|
28468
28468
|
});
|
|
28469
28469
|
dialogRef.afterClosed().subscribe((result) => {
|
|
28470
28470
|
if (result) {
|
|
28471
28471
|
let p = new QParam();
|
|
28472
|
-
p.sql =
|
|
28472
|
+
p.sql = "INSERT_UPDATE_CFG_GRID";
|
|
28473
28473
|
let p_col;
|
|
28474
28474
|
// let p_sort: string = "";
|
|
28475
28475
|
let p_filter;
|
|
28476
|
-
if (localStorage.getItem(this.grid_key +
|
|
28477
|
-
p_col = localStorage.getItem(this.grid_key +
|
|
28476
|
+
if (localStorage.getItem(this.grid_key + "_COLS") != null)
|
|
28477
|
+
p_col = localStorage.getItem(this.grid_key + "_COLS");
|
|
28478
28478
|
// if (localStorage.getItem(this.grid_key + "_SORT") != null)
|
|
28479
28479
|
// p_sort = localStorage.getItem(this.grid_key + "_SORT");
|
|
28480
|
-
if (localStorage.getItem(this.grid_key +
|
|
28481
|
-
p_filter = localStorage.getItem(this.grid_key +
|
|
28482
|
-
p.types = [
|
|
28480
|
+
if (localStorage.getItem(this.grid_key + "_FILTER") != null)
|
|
28481
|
+
p_filter = localStorage.getItem(this.grid_key + "_FILTER");
|
|
28482
|
+
p.types = [
|
|
28483
|
+
"string",
|
|
28484
|
+
"string",
|
|
28485
|
+
"string",
|
|
28486
|
+
"string",
|
|
28487
|
+
"string",
|
|
28488
|
+
"string",
|
|
28489
|
+
];
|
|
28483
28490
|
if (this.gf)
|
|
28484
28491
|
p.values = [
|
|
28485
28492
|
this.gf.getDescri(),
|
|
28486
28493
|
this.grid_key,
|
|
28487
28494
|
p_col,
|
|
28488
|
-
|
|
28495
|
+
"",
|
|
28489
28496
|
p_filter,
|
|
28490
28497
|
this.m_appService.user,
|
|
28491
28498
|
];
|
|
@@ -28493,14 +28500,14 @@ class FHGridComponentN {
|
|
|
28493
28500
|
this._dataService.doQuery(p).subscribe((data) => {
|
|
28494
28501
|
let ok_op = false;
|
|
28495
28502
|
if (data != null)
|
|
28496
|
-
if (data.result_msg ==
|
|
28497
|
-
this._toast.info(
|
|
28503
|
+
if (data.result_msg == "OK") {
|
|
28504
|
+
this._toast.info("Configurazione salvata");
|
|
28498
28505
|
if (this.gf) {
|
|
28499
|
-
this.gf.types = [
|
|
28506
|
+
this.gf.types = ["string"];
|
|
28500
28507
|
this.gf.values = [this.grid_key];
|
|
28501
28508
|
this.gf.fillCombo();
|
|
28502
28509
|
}
|
|
28503
|
-
this.curr_config =
|
|
28510
|
+
this.curr_config = "-1";
|
|
28504
28511
|
}
|
|
28505
28512
|
if (!ok_op) {
|
|
28506
28513
|
}
|
|
@@ -28524,37 +28531,37 @@ class FHGridComponentN {
|
|
|
28524
28531
|
});
|
|
28525
28532
|
setTimeout(() => {
|
|
28526
28533
|
if (this.win_opt) {
|
|
28527
|
-
this.win_opt.componentInstance.title =
|
|
28528
|
-
this.win_opt.componentInstance.label =
|
|
28534
|
+
this.win_opt.componentInstance.title = "Salva Configurazione";
|
|
28535
|
+
this.win_opt.componentInstance.label = "Nome";
|
|
28529
28536
|
}
|
|
28530
28537
|
});
|
|
28531
28538
|
this.win_opt.afterClosed().subscribe((result) => {
|
|
28532
28539
|
if (result)
|
|
28533
28540
|
if (result != null) {
|
|
28534
28541
|
let p = new QParam();
|
|
28535
|
-
p.sql =
|
|
28542
|
+
p.sql = "INSERT_UPDATE_CFG_GRID";
|
|
28536
28543
|
let p_col;
|
|
28537
28544
|
// let p_sort: string = "";
|
|
28538
28545
|
let p_filter;
|
|
28539
|
-
if (localStorage.getItem(this.grid_key +
|
|
28540
|
-
p_col = localStorage.getItem(this.grid_key +
|
|
28546
|
+
if (localStorage.getItem(this.grid_key + "_COLS") != null)
|
|
28547
|
+
p_col = localStorage.getItem(this.grid_key + "_COLS");
|
|
28541
28548
|
// if (localStorage.getItem(this.grid_key + "_SORT") != null)
|
|
28542
28549
|
// p_sort = localStorage.getItem(this.grid_key + "_SORT");
|
|
28543
|
-
if (localStorage.getItem(this.grid_key +
|
|
28544
|
-
p_filter = localStorage.getItem(this.grid_key +
|
|
28550
|
+
if (localStorage.getItem(this.grid_key + "_FILTER") != null)
|
|
28551
|
+
p_filter = localStorage.getItem(this.grid_key + "_FILTER");
|
|
28545
28552
|
p.types = [
|
|
28546
|
-
|
|
28547
|
-
|
|
28548
|
-
|
|
28549
|
-
|
|
28550
|
-
|
|
28551
|
-
|
|
28553
|
+
"string",
|
|
28554
|
+
"string",
|
|
28555
|
+
"string",
|
|
28556
|
+
"string",
|
|
28557
|
+
"string",
|
|
28558
|
+
"string",
|
|
28552
28559
|
];
|
|
28553
28560
|
p.values = [
|
|
28554
28561
|
result,
|
|
28555
28562
|
this.grid_key,
|
|
28556
28563
|
p_col,
|
|
28557
|
-
|
|
28564
|
+
"",
|
|
28558
28565
|
p_filter,
|
|
28559
28566
|
this.m_appService.user,
|
|
28560
28567
|
];
|
|
@@ -28562,11 +28569,11 @@ class FHGridComponentN {
|
|
|
28562
28569
|
this._dataService.doQuery(p).subscribe((data) => {
|
|
28563
28570
|
let ok_op = false;
|
|
28564
28571
|
if (data != null)
|
|
28565
|
-
if (data.result_msg ==
|
|
28566
|
-
this._toast.info(
|
|
28572
|
+
if (data.result_msg == "OK") {
|
|
28573
|
+
this._toast.info("Configurazione salvata");
|
|
28567
28574
|
ok_op = true;
|
|
28568
28575
|
if (this.gf) {
|
|
28569
|
-
this.gf.types = [
|
|
28576
|
+
this.gf.types = ["string"];
|
|
28570
28577
|
this.gf.values = [this.grid_key];
|
|
28571
28578
|
this.gf.fillCombo();
|
|
28572
28579
|
}
|
|
@@ -28615,36 +28622,36 @@ class FHGridComponentN {
|
|
|
28615
28622
|
|
|
28616
28623
|
this.gridOptions.api.exportDataAsExcel(params);*/
|
|
28617
28624
|
}
|
|
28618
|
-
export_excel(type =
|
|
28625
|
+
export_excel(type = "excel") {
|
|
28619
28626
|
this.dialogRef_W = this.m_dialog.open(fh_win_wait, {
|
|
28620
28627
|
disableClose: true,
|
|
28621
28628
|
});
|
|
28622
28629
|
setTimeout(() => {
|
|
28623
|
-
this.dialogRef_W.componentInstance.label =
|
|
28630
|
+
this.dialogRef_W.componentInstance.label = "EXPORT IN CORSO";
|
|
28624
28631
|
});
|
|
28625
28632
|
// this._toast.info('da implementare lato server');
|
|
28626
28633
|
this.p_fi.type = type;
|
|
28627
28634
|
this.p_fi.uiid_stampa = this.uti_s.newGuid();
|
|
28628
28635
|
this.uiid_stampa = this.p_fi.uiid_stampa;
|
|
28629
28636
|
this._gridservice
|
|
28630
|
-
.doQuery(this.p_fi, true, this.m_appService.API_ENDPOINT +
|
|
28637
|
+
.doQuery(this.p_fi, true, this.m_appService.API_ENDPOINT + "doexportn")
|
|
28631
28638
|
.subscribe((data) => {
|
|
28632
|
-
this.check_end(type ==
|
|
28639
|
+
this.check_end(type == "pdf" ? ".pdf" : ".xlsx");
|
|
28633
28640
|
});
|
|
28634
28641
|
}
|
|
28635
28642
|
check_end(format) {
|
|
28636
28643
|
let p = new FSInput();
|
|
28637
28644
|
p.p1 =
|
|
28638
28645
|
this.m_appService.LOCAL_PATH +
|
|
28639
|
-
|
|
28646
|
+
"grid_reports\\" +
|
|
28640
28647
|
this.uiid_stampa +
|
|
28641
|
-
|
|
28648
|
+
"_" +
|
|
28642
28649
|
this.m_appService.user +
|
|
28643
28650
|
format;
|
|
28644
|
-
p.command =
|
|
28651
|
+
p.command = "check_file";
|
|
28645
28652
|
this._fileService.doQuery(p).subscribe((data) => {
|
|
28646
28653
|
if (data != null)
|
|
28647
|
-
if (data.msg ==
|
|
28654
|
+
if (data.msg == "N") {
|
|
28648
28655
|
setTimeout(() => {
|
|
28649
28656
|
this.check_end(format);
|
|
28650
28657
|
}, 1000);
|
|
@@ -28655,9 +28662,9 @@ class FHGridComponentN {
|
|
|
28655
28662
|
});
|
|
28656
28663
|
setTimeout(() => {
|
|
28657
28664
|
window.open(this.m_appService.COMPANY_SITE_ROOT +
|
|
28658
|
-
|
|
28665
|
+
"/grid_reports/" +
|
|
28659
28666
|
this.uiid_stampa +
|
|
28660
|
-
|
|
28667
|
+
"_" +
|
|
28661
28668
|
this.m_appService.user +
|
|
28662
28669
|
format);
|
|
28663
28670
|
}, 2000);
|
|
@@ -28674,7 +28681,7 @@ class FHGridComponentN {
|
|
|
28674
28681
|
if (this.enable_copy)
|
|
28675
28682
|
this.gridApi.copySelectedRangeToClipboard();
|
|
28676
28683
|
{
|
|
28677
|
-
this.clipboard.copy(v.data.split(
|
|
28684
|
+
this.clipboard.copy(v.data.split("\n")[0]);
|
|
28678
28685
|
}
|
|
28679
28686
|
};
|
|
28680
28687
|
}
|
|
@@ -28690,7 +28697,7 @@ class FHGridComponentN {
|
|
|
28690
28697
|
return item.data.uiid;
|
|
28691
28698
|
if (item.data.codice != null)
|
|
28692
28699
|
return item.data.codice;
|
|
28693
|
-
return
|
|
28700
|
+
return "NA";
|
|
28694
28701
|
}
|
|
28695
28702
|
ngAfterViewInit() {
|
|
28696
28703
|
this.gridOptions = {
|
|
@@ -28704,77 +28711,77 @@ class FHGridComponentN {
|
|
|
28704
28711
|
enableRangeSelection: true,
|
|
28705
28712
|
defaultColDef: { resizable: true, sortable: true, floatingFilter: true },
|
|
28706
28713
|
allowContextMenuWithControlKey: true,
|
|
28707
|
-
rowModelType:
|
|
28714
|
+
rowModelType: "serverSide",
|
|
28708
28715
|
localeText: {
|
|
28709
28716
|
// for filter panel
|
|
28710
|
-
page:
|
|
28711
|
-
more:
|
|
28712
|
-
to:
|
|
28713
|
-
of:
|
|
28714
|
-
next:
|
|
28715
|
-
last:
|
|
28716
|
-
first:
|
|
28717
|
-
previous:
|
|
28718
|
-
loadingOoo:
|
|
28717
|
+
page: "pagina",
|
|
28718
|
+
more: "altre",
|
|
28719
|
+
to: "a",
|
|
28720
|
+
of: "di",
|
|
28721
|
+
next: "prossima",
|
|
28722
|
+
last: "ultima",
|
|
28723
|
+
first: "prima",
|
|
28724
|
+
previous: "precedente",
|
|
28725
|
+
loadingOoo: "Caricamento...",
|
|
28719
28726
|
// for set filter
|
|
28720
|
-
selectAll:
|
|
28721
|
-
searchOoo:
|
|
28722
|
-
blanks:
|
|
28727
|
+
selectAll: "Seleziona Tutto",
|
|
28728
|
+
searchOoo: "Trova...",
|
|
28729
|
+
blanks: "Vuoto",
|
|
28723
28730
|
// for number filter and text filter
|
|
28724
|
-
filterOoo:
|
|
28725
|
-
applyFilter:
|
|
28731
|
+
filterOoo: "Filtro...",
|
|
28732
|
+
applyFilter: "Applica Filtro...",
|
|
28726
28733
|
// for number filter
|
|
28727
|
-
equals:
|
|
28728
|
-
notEqual:
|
|
28729
|
-
lessThan:
|
|
28730
|
-
greaterThan:
|
|
28734
|
+
equals: "Uguale",
|
|
28735
|
+
notEqual: "Diverso",
|
|
28736
|
+
lessThan: "Minore o Uguale",
|
|
28737
|
+
greaterThan: "Maggiore o Uguale",
|
|
28731
28738
|
// for text filter
|
|
28732
|
-
notContains:
|
|
28733
|
-
contains:
|
|
28734
|
-
startsWith:
|
|
28735
|
-
endsWith:
|
|
28739
|
+
notContains: "Non Contiene",
|
|
28740
|
+
contains: "Contiene",
|
|
28741
|
+
startsWith: "Inizia Con",
|
|
28742
|
+
endsWith: "Finisce Con",
|
|
28736
28743
|
// the header of the default group column
|
|
28737
|
-
group:
|
|
28744
|
+
group: "Gruppo",
|
|
28738
28745
|
// tool panel
|
|
28739
|
-
columns:
|
|
28740
|
-
rowGroupColumns:
|
|
28741
|
-
rowGroupColumnsEmptyMessage:
|
|
28742
|
-
valueColumns:
|
|
28743
|
-
pivotMode:
|
|
28744
|
-
groups:
|
|
28745
|
-
values:
|
|
28746
|
-
pivots:
|
|
28747
|
-
valueColumnsEmptyMessage:
|
|
28748
|
-
pivotColumnsEmptyMessage:
|
|
28746
|
+
columns: "Colonne",
|
|
28747
|
+
rowGroupColumns: "Colonne Pivot",
|
|
28748
|
+
rowGroupColumnsEmptyMessage: "trascina le colonne per raggrupparle",
|
|
28749
|
+
valueColumns: "Colonne Valore",
|
|
28750
|
+
pivotMode: "Modalità Pivot",
|
|
28751
|
+
groups: "Gruppi",
|
|
28752
|
+
values: "Valori",
|
|
28753
|
+
pivots: "Pivots",
|
|
28754
|
+
valueColumnsEmptyMessage: "trascina le colonne per aggreare",
|
|
28755
|
+
pivotColumnsEmptyMessage: "trascina le colonne per pivot",
|
|
28749
28756
|
// other
|
|
28750
|
-
noRowsToShow:
|
|
28757
|
+
noRowsToShow: "nessun dato",
|
|
28751
28758
|
// enterprise menu
|
|
28752
|
-
pinColumn:
|
|
28753
|
-
valueAggregation:
|
|
28754
|
-
autosizeThiscolumn:
|
|
28755
|
-
autosizeAllColumns:
|
|
28756
|
-
groupBy:
|
|
28757
|
-
ungroupBy:
|
|
28758
|
-
resetColumns:
|
|
28759
|
-
expandAll:
|
|
28760
|
-
collapseAll:
|
|
28761
|
-
toolPanel:
|
|
28759
|
+
pinColumn: "Sposta Colonna",
|
|
28760
|
+
valueAggregation: "Aggregazione",
|
|
28761
|
+
autosizeThiscolumn: "Autosize colonna",
|
|
28762
|
+
autosizeAllColumns: "Autosize tutte le colonne",
|
|
28763
|
+
groupBy: "Raggruppa per",
|
|
28764
|
+
ungroupBy: "Spacca per",
|
|
28765
|
+
resetColumns: "Resetta queste colonna",
|
|
28766
|
+
expandAll: "Espandi",
|
|
28767
|
+
collapseAll: "Chiudi",
|
|
28768
|
+
toolPanel: "Impostazioni",
|
|
28762
28769
|
// enterprise menu pinning
|
|
28763
|
-
pinLeft:
|
|
28764
|
-
pinRight:
|
|
28765
|
-
noPin:
|
|
28770
|
+
pinLeft: "Sposta <<",
|
|
28771
|
+
pinRight: "Sposta >>",
|
|
28772
|
+
noPin: "Sposta <>",
|
|
28766
28773
|
// enterprise menu aggregation and status panel
|
|
28767
|
-
sum:
|
|
28768
|
-
min:
|
|
28769
|
-
max:
|
|
28770
|
-
none:
|
|
28771
|
-
count:
|
|
28772
|
-
average:
|
|
28774
|
+
sum: "Somma",
|
|
28775
|
+
min: "Minimo",
|
|
28776
|
+
max: "Massimo",
|
|
28777
|
+
none: "Nessuno",
|
|
28778
|
+
count: "Numero",
|
|
28779
|
+
average: "Media",
|
|
28773
28780
|
// standard menu
|
|
28774
|
-
copy:
|
|
28775
|
-
ctrlC:
|
|
28776
|
-
paste:
|
|
28777
|
-
ctrlV:
|
|
28781
|
+
copy: "Copia",
|
|
28782
|
+
ctrlC: "ctrl n C",
|
|
28783
|
+
paste: "Incolla",
|
|
28784
|
+
ctrlV: "ctrl n C",
|
|
28778
28785
|
},
|
|
28779
28786
|
getRowNodeId: function (item) {
|
|
28780
28787
|
// console.log(item);
|
|
@@ -28794,16 +28801,17 @@ class FHGridComponentN {
|
|
|
28794
28801
|
return item.ord;
|
|
28795
28802
|
},
|
|
28796
28803
|
};
|
|
28804
|
+
console.log('gridOptions ', this.gridOptions);
|
|
28797
28805
|
this.init_opt = true;
|
|
28798
|
-
if (this.grid_key ==
|
|
28806
|
+
if (this.grid_key == "PRO_H")
|
|
28799
28807
|
this.no_pref = true;
|
|
28800
28808
|
setTimeout(() => {
|
|
28801
28809
|
if (this.end_point == null)
|
|
28802
28810
|
this.end_point =
|
|
28803
28811
|
this.m_appService.API_ENDPOINT + this.m_appService.GRID_ENDPOINT;
|
|
28804
|
-
if (localStorage.getItem(this.grid_key +
|
|
28812
|
+
if (localStorage.getItem(this.grid_key + "_FILTER_UP") != null)
|
|
28805
28813
|
this.ric_libera =
|
|
28806
|
-
localStorage.getItem(this.grid_key +
|
|
28814
|
+
localStorage.getItem(this.grid_key + "_FILTER_UP") || "";
|
|
28807
28815
|
this.onResize();
|
|
28808
28816
|
});
|
|
28809
28817
|
}
|
|
@@ -28875,27 +28883,27 @@ class FHGridComponentN {
|
|
|
28875
28883
|
return i;
|
|
28876
28884
|
}
|
|
28877
28885
|
getquerySelected(f, t) {
|
|
28878
|
-
let s =
|
|
28879
|
-
if (t ==
|
|
28886
|
+
let s = "";
|
|
28887
|
+
if (t == "String") {
|
|
28880
28888
|
if (this.gridOptions.api)
|
|
28881
28889
|
this.gridOptions.api.forEachNode((node) => {
|
|
28882
28890
|
if (node.isSelected())
|
|
28883
28891
|
if (node.data[f] != null) {
|
|
28884
|
-
if (s !=
|
|
28885
|
-
s = s +
|
|
28892
|
+
if (s != "")
|
|
28893
|
+
s = s + ",";
|
|
28886
28894
|
s = s + "'" + node.data[f] + "'";
|
|
28887
28895
|
}
|
|
28888
28896
|
});
|
|
28889
28897
|
}
|
|
28890
28898
|
// console.log('ENTRO '+f+" "+t);
|
|
28891
|
-
if (t ==
|
|
28899
|
+
if (t == "Number") {
|
|
28892
28900
|
if (this.gridOptions.api)
|
|
28893
28901
|
this.gridOptions.api.forEachNode((node) => {
|
|
28894
28902
|
if (node.isSelected())
|
|
28895
28903
|
if (node.data[f] != null) {
|
|
28896
28904
|
// console.log('selected');
|
|
28897
|
-
if (s !=
|
|
28898
|
-
s = s +
|
|
28905
|
+
if (s != "")
|
|
28906
|
+
s = s + ",";
|
|
28899
28907
|
s = s + node.data[f];
|
|
28900
28908
|
}
|
|
28901
28909
|
});
|
|
@@ -28917,14 +28925,14 @@ class FHGridComponentN {
|
|
|
28917
28925
|
});
|
|
28918
28926
|
}
|
|
28919
28927
|
pulisci_filtri(resetr = true) {
|
|
28920
|
-
localStorage.removeItem(this.grid_key +
|
|
28928
|
+
localStorage.removeItem(this.grid_key + "_FILTER");
|
|
28921
28929
|
if (resetr) {
|
|
28922
|
-
if (this.ric_libera !=
|
|
28923
|
-
this.doFill(
|
|
28924
|
-
this.ric_libera =
|
|
28925
|
-
localStorage.removeItem(this.grid_key +
|
|
28930
|
+
if (this.ric_libera != "")
|
|
28931
|
+
this.doFill("", true, false);
|
|
28932
|
+
this.ric_libera = "";
|
|
28933
|
+
localStorage.removeItem(this.grid_key + "_FILTER_UP");
|
|
28926
28934
|
}
|
|
28927
|
-
this.fix_flt_temp =
|
|
28935
|
+
this.fix_flt_temp = "";
|
|
28928
28936
|
if (this.gridOptions.api)
|
|
28929
28937
|
this.gridOptions.api.setFilterModel(null);
|
|
28930
28938
|
let filtrtm = {}; /*
|
|
@@ -28938,9 +28946,9 @@ class FHGridComponentN {
|
|
|
28938
28946
|
}
|
|
28939
28947
|
print() {
|
|
28940
28948
|
if (this.custom_export)
|
|
28941
|
-
this.command.emit({ cmd:
|
|
28949
|
+
this.command.emit({ cmd: "print_pdf" });
|
|
28942
28950
|
else
|
|
28943
|
-
this.export_excel(
|
|
28951
|
+
this.export_excel("pdf");
|
|
28944
28952
|
}
|
|
28945
28953
|
init_conf() {
|
|
28946
28954
|
// console.log(" init_conf()");
|
|
@@ -28967,18 +28975,19 @@ class FHGridComponentN {
|
|
|
28967
28975
|
this.ckk_ed = true;
|
|
28968
28976
|
if (this.toggle_mantieni != null) {
|
|
28969
28977
|
this.toggle_mantieni.checked = true;
|
|
28970
|
-
if (localStorage.getItem(this.grid_key +
|
|
28971
|
-
if (localStorage.getItem(this.grid_key +
|
|
28978
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") != null)
|
|
28979
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") == "NO") {
|
|
28972
28980
|
this.toggle_mantieni.checked = false;
|
|
28973
28981
|
}
|
|
28974
28982
|
}
|
|
28975
28983
|
this.res_columns();
|
|
28976
|
-
if (localStorage.getItem(this.grid_key +
|
|
28984
|
+
if (localStorage.getItem(this.grid_key + "_POS") != null)
|
|
28977
28985
|
this.b_restored = true;
|
|
28978
|
-
if (localStorage.getItem(this.grid_key +
|
|
28979
|
-
if (localStorage.getItem(this.grid_key +
|
|
28980
|
-
this.ric_libera =
|
|
28981
|
-
|
|
28986
|
+
if (localStorage.getItem(this.grid_key + "_FILTER_UP") != null)
|
|
28987
|
+
if (localStorage.getItem(this.grid_key + "_FILTER_UP") != "") {
|
|
28988
|
+
this.ric_libera =
|
|
28989
|
+
localStorage.getItem(this.grid_key + "_FILTER_UP") || "";
|
|
28990
|
+
let arr = this.ric_libera.split(" ");
|
|
28982
28991
|
let arr_F = new Array();
|
|
28983
28992
|
for (let i = 0; i < arr.length; i++)
|
|
28984
28993
|
arr_F.push(arr[i]);
|
|
@@ -28987,27 +28996,27 @@ class FHGridComponentN {
|
|
|
28987
28996
|
// this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
|
|
28988
28997
|
if (arr_F.length == 0)
|
|
28989
28998
|
return;
|
|
28990
|
-
let ss =
|
|
28999
|
+
let ss = "";
|
|
28991
29000
|
for (let i = 0; i < arr_F.length; i++) {
|
|
28992
|
-
let ss_r =
|
|
29001
|
+
let ss_r = "";
|
|
28993
29002
|
for (let y = 0; y < this.columnDefs.length; y++) {
|
|
28994
29003
|
if (this.columnDefs[y] != null)
|
|
28995
29004
|
if (this.columnDefs[y].no_filter == null)
|
|
28996
29005
|
if (this.columnDefs[y].field != null)
|
|
28997
|
-
if (this.columnDefs[y].field !=
|
|
28998
|
-
if (this.columnDefs[y].filter !=
|
|
28999
|
-
if (ss_r !=
|
|
29000
|
-
ss_r +=
|
|
29006
|
+
if (this.columnDefs[y].field != "")
|
|
29007
|
+
if (this.columnDefs[y].filter != "agDateColumnFilter") {
|
|
29008
|
+
if (ss_r != "")
|
|
29009
|
+
ss_r += " or ";
|
|
29001
29010
|
ss_r +=
|
|
29002
29011
|
this.columnDefs[y].field +
|
|
29003
29012
|
" LIKE '%" +
|
|
29004
29013
|
arr_F[i]
|
|
29005
29014
|
.replace("'", "$'")
|
|
29006
|
-
.replace(
|
|
29007
|
-
.replace(
|
|
29008
|
-
.replace(
|
|
29009
|
-
.replace(
|
|
29010
|
-
.replace(
|
|
29015
|
+
.replace("*", "$*")
|
|
29016
|
+
.replace("?", "$?")
|
|
29017
|
+
.replace("[", "$[")
|
|
29018
|
+
.replace("]", "$]")
|
|
29019
|
+
.replace("!", "'$")
|
|
29011
29020
|
.toUpperCase() +
|
|
29012
29021
|
"%' ESCAPE '$'";
|
|
29013
29022
|
}
|
|
@@ -29015,27 +29024,27 @@ class FHGridComponentN {
|
|
|
29015
29024
|
if (this.full_text_added_columns != null)
|
|
29016
29025
|
this.full_text_added_columns.map((v) => {
|
|
29017
29026
|
if (v != null)
|
|
29018
|
-
if (v !=
|
|
29019
|
-
if (ss_r !=
|
|
29020
|
-
ss_r +=
|
|
29027
|
+
if (v != "") {
|
|
29028
|
+
if (ss_r != "")
|
|
29029
|
+
ss_r += " or ";
|
|
29021
29030
|
ss_r +=
|
|
29022
29031
|
v +
|
|
29023
29032
|
" LIKE '%" +
|
|
29024
29033
|
arr_F[i]
|
|
29025
29034
|
.replace("'", "$'")
|
|
29026
|
-
.replace(
|
|
29027
|
-
.replace(
|
|
29028
|
-
.replace(
|
|
29029
|
-
.replace(
|
|
29030
|
-
.replace(
|
|
29035
|
+
.replace("*", "$*")
|
|
29036
|
+
.replace("?", "$?")
|
|
29037
|
+
.replace("[", "$[")
|
|
29038
|
+
.replace("]", "$]")
|
|
29039
|
+
.replace("!", "'$")
|
|
29031
29040
|
.toUpperCase() +
|
|
29032
29041
|
"%' ESCAPE '$'";
|
|
29033
29042
|
}
|
|
29034
29043
|
});
|
|
29035
|
-
if (ss_r !=
|
|
29036
|
-
if (ss !=
|
|
29037
|
-
ss +=
|
|
29038
|
-
ss +=
|
|
29044
|
+
if (ss_r != "") {
|
|
29045
|
+
if (ss != "")
|
|
29046
|
+
ss += " and ";
|
|
29047
|
+
ss += "(" + ss_r + ")";
|
|
29039
29048
|
}
|
|
29040
29049
|
}
|
|
29041
29050
|
this.fix_flt_temp = ss;
|
|
@@ -29045,13 +29054,6 @@ class FHGridComponentN {
|
|
|
29045
29054
|
this.ref_dt();
|
|
29046
29055
|
}, 100);
|
|
29047
29056
|
}
|
|
29048
|
-
// this.createNewDatasource();
|
|
29049
|
-
/*
|
|
29050
|
-
if(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']!=null)
|
|
29051
|
-
{
|
|
29052
|
-
//console.log('setto pag: '+this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
|
|
29053
|
-
this.gridOptions.api.paginationGoToPage(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
|
|
29054
|
-
} */
|
|
29055
29057
|
}
|
|
29056
29058
|
set_init_size() {
|
|
29057
29059
|
if (this.myData.length == 0) {
|
|
@@ -29066,7 +29068,6 @@ class FHGridComponentN {
|
|
|
29066
29068
|
this.autoSizeAll();
|
|
29067
29069
|
}
|
|
29068
29070
|
res_columns(forza = false) {
|
|
29069
|
-
console.log("🚀 ~ file: fhgridn.ts:1370 ~ FHGridComponentN ~ res_columns ~ res_columns:", forza);
|
|
29070
29071
|
if (this.columnDefs == null) {
|
|
29071
29072
|
setTimeout(() => {
|
|
29072
29073
|
this.res_columns(forza);
|
|
@@ -29083,19 +29084,19 @@ class FHGridComponentN {
|
|
|
29083
29084
|
let b_rip = false;
|
|
29084
29085
|
if (this.toggle_mantieni != null)
|
|
29085
29086
|
b_mantieni_ck = this.toggle_mantieni.checked;
|
|
29086
|
-
if (localStorage.getItem(this.grid_key +
|
|
29087
|
-
localStorage.getItem(this.grid_key +
|
|
29087
|
+
if (localStorage.getItem(this.grid_key + "_COLS") == null ||
|
|
29088
|
+
localStorage.getItem(this.grid_key + "_COLS") == "") {
|
|
29088
29089
|
this.set_init_size();
|
|
29089
29090
|
return;
|
|
29090
29091
|
}
|
|
29091
|
-
if (localStorage.getItem(this.grid_key +
|
|
29092
|
+
if (localStorage.getItem(this.grid_key + "_COLS") != null &&
|
|
29092
29093
|
(b_mantieni_ck || forza)) {
|
|
29093
29094
|
// console.log('qqqqq1111');
|
|
29094
|
-
if (localStorage.getItem(this.grid_key +
|
|
29095
|
+
if (localStorage.getItem(this.grid_key + "_COLS") != "") {
|
|
29095
29096
|
b_rip = true;
|
|
29096
29097
|
// console.log('qqqqq2222');
|
|
29097
29098
|
try {
|
|
29098
|
-
let a = JSON.parse(
|
|
29099
|
+
let a = JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "[]");
|
|
29099
29100
|
let annulla = true;
|
|
29100
29101
|
for (let i = 0; i < a.length; i++) {
|
|
29101
29102
|
if (!a[i].hide)
|
|
@@ -29103,13 +29104,15 @@ class FHGridComponentN {
|
|
|
29103
29104
|
}
|
|
29104
29105
|
// console.log('qqqqq3333 ',annulla);
|
|
29105
29106
|
if (annulla)
|
|
29106
|
-
localStorage.getItem(this.grid_key +
|
|
29107
|
+
localStorage.getItem(this.grid_key + "_COLS");
|
|
29107
29108
|
else {
|
|
29108
29109
|
// console.log('qqqqq4444');
|
|
29109
|
-
if (localStorage.getItem(this.grid_key +
|
|
29110
|
+
if (localStorage.getItem(this.grid_key + "_COLS"))
|
|
29110
29111
|
if (this.gridOptions.columnApi) {
|
|
29111
29112
|
// console.log('qqqqq5555',JSON.parse(localStorage.getItem(this.grid_key + '_COLS')||'{}'));
|
|
29112
|
-
let colState = {
|
|
29113
|
+
let colState = {
|
|
29114
|
+
state: JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "{}"),
|
|
29115
|
+
};
|
|
29113
29116
|
this.gridOptions.columnApi.applyColumnState(colState);
|
|
29114
29117
|
}
|
|
29115
29118
|
}
|
|
@@ -29119,37 +29122,12 @@ class FHGridComponentN {
|
|
|
29119
29122
|
}
|
|
29120
29123
|
}
|
|
29121
29124
|
}
|
|
29122
|
-
|
|
29123
|
-
this.gridOptions.api.setSortModel(null);
|
|
29124
|
-
} catch (eer) {
|
|
29125
|
-
console.log(eer);
|
|
29126
|
-
}
|
|
29127
|
-
if (
|
|
29128
|
-
localStorage.getItem(this.grid_key + "_SORT") != null &&
|
|
29129
|
-
(b_mantieni_ck || forza)
|
|
29130
|
-
)
|
|
29131
|
-
if (localStorage.getItem(this.grid_key + "_SORT") != "") {
|
|
29132
|
-
// console.log('setto sort: '+localStorage.getItem(this.grid_key+'_SORT'));
|
|
29133
|
-
// console.log(localStorage.getItem(this.grid_key+'_SORT'));
|
|
29134
|
-
try {
|
|
29135
|
-
this.gridOptions.api.setSortModel(
|
|
29136
|
-
JSON.parse(localStorage.getItem(this.grid_key + "_SORT"))
|
|
29137
|
-
);
|
|
29138
|
-
} catch (eer) {
|
|
29139
|
-
console.log(eer);
|
|
29140
|
-
}
|
|
29141
|
-
}
|
|
29142
|
-
try {
|
|
29143
|
-
this.gridOptions.api.setFilterModel(null);
|
|
29144
|
-
} catch (eer) {
|
|
29145
|
-
console.log(eer);
|
|
29146
|
-
}*/
|
|
29147
|
-
if (localStorage.getItem(this.grid_key + '_FILTER') != null &&
|
|
29125
|
+
if (localStorage.getItem(this.grid_key + "_FILTER") != null &&
|
|
29148
29126
|
(b_mantieni_ck || forza))
|
|
29149
|
-
if (localStorage.getItem(this.grid_key +
|
|
29127
|
+
if (localStorage.getItem(this.grid_key + "_FILTER") != "") {
|
|
29150
29128
|
try {
|
|
29151
29129
|
if (this.gridOptions.api)
|
|
29152
|
-
this.gridOptions.api.setFilterModel(JSON.parse(
|
|
29130
|
+
this.gridOptions.api.setFilterModel(JSON.parse(localStorage.getItem(this.grid_key + "_FILTER") || ""));
|
|
29153
29131
|
}
|
|
29154
29132
|
catch (eer) {
|
|
29155
29133
|
console.log(eer);
|
|
@@ -29157,12 +29135,13 @@ class FHGridComponentN {
|
|
|
29157
29135
|
}
|
|
29158
29136
|
}
|
|
29159
29137
|
getRows() {
|
|
29160
|
-
return
|
|
29138
|
+
return this.gridOptions.rowData || [];
|
|
29161
29139
|
}
|
|
29162
29140
|
sortAndFilter(sortModel, filterModel) {
|
|
29163
29141
|
// return sortData(sortModel, filterData(filterModel, allOfTheData))
|
|
29164
29142
|
}
|
|
29165
29143
|
ref_dt() {
|
|
29144
|
+
console.log("🚀 ~ file: fhgridn.ts:1460 ~ FHGridComponentN ~ ref_dt ~ ref_dt: try init!!!!", this.gridOptions, this.gridOptions.api);
|
|
29166
29145
|
if (this.gridOptions == null)
|
|
29167
29146
|
setTimeout(() => {
|
|
29168
29147
|
this.ref_dt();
|
|
@@ -29173,7 +29152,7 @@ class FHGridComponentN {
|
|
|
29173
29152
|
this.ref_dt();
|
|
29174
29153
|
}, 500);
|
|
29175
29154
|
else {
|
|
29176
|
-
console.log(
|
|
29155
|
+
console.log("ref_dt!!!!");
|
|
29177
29156
|
this.gridOptions.api.setServerSideDatasource(this.dataSource);
|
|
29178
29157
|
}
|
|
29179
29158
|
}
|
|
@@ -29195,14 +29174,14 @@ class FHGridComponentN {
|
|
|
29195
29174
|
this.setHeaderHeight(this.header_h);
|
|
29196
29175
|
if (this.gf != null && this.show_buttons && !this.pref_hidden) {
|
|
29197
29176
|
if (!this.private_pref)
|
|
29198
|
-
this.gf.sql =
|
|
29177
|
+
this.gf.sql = "SELECT_CFG_GRID";
|
|
29199
29178
|
else
|
|
29200
|
-
this.gf.sql =
|
|
29201
|
-
this.gf.types = [
|
|
29179
|
+
this.gf.sql = "SELECT_CFG_GRID_BY_USER";
|
|
29180
|
+
this.gf.types = ["string"];
|
|
29202
29181
|
this.gf.values = [this.grid_key];
|
|
29203
29182
|
this.gf.fillCombo();
|
|
29204
|
-
if (localStorage.getItem(this.grid_key +
|
|
29205
|
-
if (localStorage.getItem(this.grid_key +
|
|
29183
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO")
|
|
29184
|
+
if (localStorage.getItem(this.grid_key + "_CFG_DEFAULT") != null) {
|
|
29206
29185
|
return;
|
|
29207
29186
|
}
|
|
29208
29187
|
}
|
|
@@ -29217,16 +29196,16 @@ class FHGridComponentN {
|
|
|
29217
29196
|
}
|
|
29218
29197
|
save_cfg() {
|
|
29219
29198
|
if (this.gridOptions.columnApi)
|
|
29220
|
-
localStorage.setItem(this.grid_key +
|
|
29199
|
+
localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29221
29200
|
}
|
|
29222
29201
|
fe_cfg() {
|
|
29223
29202
|
if (this.gf != null)
|
|
29224
29203
|
if (this.gf.getObj() != null)
|
|
29225
|
-
if (localStorage.getItem(this.grid_key +
|
|
29226
|
-
this.gf.setByDescri(
|
|
29227
|
-
localStorage.setItem(this.grid_key +
|
|
29204
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO") {
|
|
29205
|
+
this.gf.setByDescri(localStorage.getItem(this.grid_key + "_CFG_DEFAULT") || "");
|
|
29206
|
+
localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COLS);
|
|
29228
29207
|
// localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
|
|
29229
|
-
localStorage.setItem(this.grid_key +
|
|
29208
|
+
localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
|
|
29230
29209
|
this.curr_config = this.gf.getValue();
|
|
29231
29210
|
}
|
|
29232
29211
|
this.onready_go();
|
|
@@ -29251,15 +29230,15 @@ class FHGridComponentN {
|
|
|
29251
29230
|
}
|
|
29252
29231
|
}
|
|
29253
29232
|
free_search() {
|
|
29254
|
-
if (this.ric_libera ==
|
|
29233
|
+
if (this.ric_libera == "") {
|
|
29255
29234
|
this.pulisci_filtri();
|
|
29256
|
-
this.fix_flt_temp =
|
|
29257
|
-
this.doFill(
|
|
29258
|
-
localStorage.removeItem(this.grid_key +
|
|
29235
|
+
this.fix_flt_temp = "";
|
|
29236
|
+
this.doFill("", true, false);
|
|
29237
|
+
localStorage.removeItem(this.grid_key + "_FILTER_UP");
|
|
29259
29238
|
return;
|
|
29260
29239
|
}
|
|
29261
|
-
localStorage.setItem(this.grid_key +
|
|
29262
|
-
let arr = this.ric_libera.split(
|
|
29240
|
+
localStorage.setItem(this.grid_key + "_FILTER_UP", this.ric_libera);
|
|
29241
|
+
let arr = this.ric_libera.split(" ");
|
|
29263
29242
|
let arr_F = new Array();
|
|
29264
29243
|
for (let i = 0; i < arr.length; i++)
|
|
29265
29244
|
arr_F.push(arr[i]);
|
|
@@ -29267,27 +29246,27 @@ class FHGridComponentN {
|
|
|
29267
29246
|
// else this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
|
|
29268
29247
|
if (arr_F.length == 0)
|
|
29269
29248
|
return;
|
|
29270
|
-
let ss =
|
|
29249
|
+
let ss = "";
|
|
29271
29250
|
for (let i = 0; i < arr_F.length; i++) {
|
|
29272
|
-
let ss_r =
|
|
29251
|
+
let ss_r = "";
|
|
29273
29252
|
for (let y = 0; y < this.columnDefs.length; y++) {
|
|
29274
29253
|
if (this.columnDefs[y] != null)
|
|
29275
29254
|
if (this.columnDefs[y].no_filter == null)
|
|
29276
29255
|
if (this.columnDefs[y].field != null)
|
|
29277
|
-
if (this.columnDefs[y].field !=
|
|
29278
|
-
if (this.columnDefs[y].filter !=
|
|
29279
|
-
if (ss_r !=
|
|
29280
|
-
ss_r +=
|
|
29256
|
+
if (this.columnDefs[y].field != "")
|
|
29257
|
+
if (this.columnDefs[y].filter != "agDateColumnFilter") {
|
|
29258
|
+
if (ss_r != "")
|
|
29259
|
+
ss_r += " or ";
|
|
29281
29260
|
ss_r +=
|
|
29282
29261
|
this.columnDefs[y].field +
|
|
29283
29262
|
" LIKE '%" +
|
|
29284
29263
|
arr_F[i]
|
|
29285
29264
|
.replace("'", "$'")
|
|
29286
|
-
.replace(
|
|
29287
|
-
.replace(
|
|
29288
|
-
.replace(
|
|
29289
|
-
.replace(
|
|
29290
|
-
.replace(
|
|
29265
|
+
.replace("*", "$*")
|
|
29266
|
+
.replace("?", "$?")
|
|
29267
|
+
.replace("[", "$[")
|
|
29268
|
+
.replace("]", "$]")
|
|
29269
|
+
.replace("!", "'$")
|
|
29291
29270
|
.toUpperCase() +
|
|
29292
29271
|
"%' ESCAPE '$'";
|
|
29293
29272
|
}
|
|
@@ -29295,28 +29274,28 @@ class FHGridComponentN {
|
|
|
29295
29274
|
if (this.full_text_added_columns != null)
|
|
29296
29275
|
this.full_text_added_columns.map((v) => {
|
|
29297
29276
|
if (v != null)
|
|
29298
|
-
if (v !=
|
|
29299
|
-
if (ss_r !=
|
|
29300
|
-
ss_r +=
|
|
29277
|
+
if (v != "") {
|
|
29278
|
+
if (ss_r != "")
|
|
29279
|
+
ss_r += " or ";
|
|
29301
29280
|
ss_r +=
|
|
29302
29281
|
v +
|
|
29303
29282
|
" LIKE '%" +
|
|
29304
29283
|
arr_F[i]
|
|
29305
29284
|
.replace("'", "$'")
|
|
29306
|
-
.replace(
|
|
29307
|
-
.replace(
|
|
29308
|
-
.replace(
|
|
29309
|
-
.replace(
|
|
29310
|
-
.replace(
|
|
29285
|
+
.replace("*", "$*")
|
|
29286
|
+
.replace("?", "$?")
|
|
29287
|
+
.replace("[", "$[")
|
|
29288
|
+
.replace("]", "$]")
|
|
29289
|
+
.replace("!", "'$")
|
|
29311
29290
|
.toUpperCase() +
|
|
29312
29291
|
"%' ESCAPE '$'";
|
|
29313
29292
|
}
|
|
29314
29293
|
});
|
|
29315
|
-
if (ss_r !=
|
|
29294
|
+
if (ss_r != "") {
|
|
29316
29295
|
// console.log('ADDO '), ss_r;
|
|
29317
|
-
if (ss !=
|
|
29318
|
-
ss +=
|
|
29319
|
-
ss +=
|
|
29296
|
+
if (ss != "")
|
|
29297
|
+
ss += " and ";
|
|
29298
|
+
ss += "(" + ss_r + ")";
|
|
29320
29299
|
}
|
|
29321
29300
|
}
|
|
29322
29301
|
this.pulisci_filtri(false);
|
|
@@ -29356,7 +29335,7 @@ class FHGridComponentN {
|
|
|
29356
29335
|
if (this.b_init) {
|
|
29357
29336
|
// console.log('salvo f: '+JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29358
29337
|
if (this.gridOptions.columnApi)
|
|
29359
|
-
localStorage.setItem(this.grid_key +
|
|
29338
|
+
localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29360
29339
|
}
|
|
29361
29340
|
}
|
|
29362
29341
|
onFilterModified() {
|
|
@@ -29367,7 +29346,7 @@ class FHGridComponentN {
|
|
|
29367
29346
|
setTimeout(() => {
|
|
29368
29347
|
if (this.b_init) {
|
|
29369
29348
|
if (this.gridOptions.api)
|
|
29370
|
-
localStorage.setItem(this.grid_key +
|
|
29349
|
+
localStorage.setItem(this.grid_key + "_FILTER", JSON.stringify(this.gridOptions.api.getFilterModel()));
|
|
29371
29350
|
}
|
|
29372
29351
|
}, 200);
|
|
29373
29352
|
}
|
|
@@ -29380,7 +29359,7 @@ class FHGridComponentN {
|
|
|
29380
29359
|
return;
|
|
29381
29360
|
if (this.b_init) {
|
|
29382
29361
|
if (this.gridOptions.columnApi)
|
|
29383
|
-
localStorage.setItem(this.grid_key +
|
|
29362
|
+
localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29384
29363
|
// console.log('salvo s: '+this.gridOptions.api.getSortModel());
|
|
29385
29364
|
/*
|
|
29386
29365
|
|
|
@@ -29405,15 +29384,15 @@ class FHGridComponentN {
|
|
|
29405
29384
|
if (selectedInGrid != null)
|
|
29406
29385
|
if (selectedInGrid[0] != null) {
|
|
29407
29386
|
// console.log((this.gridOptions.api.getVerticalPixelRange()));
|
|
29408
|
-
localStorage.setItem(this.grid_key +
|
|
29387
|
+
localStorage.setItem(this.grid_key + "_POS", String(selectedInGrid[0].rowIndex));
|
|
29409
29388
|
if (this.gridOptions.api)
|
|
29410
|
-
localStorage.setItem(this.grid_key +
|
|
29411
|
-
localStorage.setItem(this.grid_key +
|
|
29389
|
+
localStorage.setItem(this.grid_key + "_POS_BAR", JSON.stringify(this.gridOptions.api.getVerticalPixelRange()));
|
|
29390
|
+
localStorage.setItem(this.grid_key + "_POS2", this.getRowNodeId(selectedInGrid[0]));
|
|
29412
29391
|
// this.m_appService.getState().grid_obj=new Object();
|
|
29413
29392
|
// this.m_appService.getState().grid_obj[this.grid_key+'_NODE']=this.gridOptions.api.getSelectedRows[0];
|
|
29414
29393
|
}
|
|
29415
29394
|
this.sRow = $event.data;
|
|
29416
|
-
localStorage.setItem(this.grid_key +
|
|
29395
|
+
localStorage.setItem(this.grid_key + "_LAST_ROW", JSON.stringify(this.sRow));
|
|
29417
29396
|
this.clicked.emit($event.data);
|
|
29418
29397
|
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
29419
29398
|
if (iOS) {
|
|
@@ -29472,6 +29451,7 @@ class FHGridComponentN {
|
|
|
29472
29451
|
}, 10);
|
|
29473
29452
|
}
|
|
29474
29453
|
Refresh() {
|
|
29454
|
+
console.log("🚀 ~ file: fhgridn.ts:1831 ~ FHGridComponentN ~ Refresh ~ Refresh:");
|
|
29475
29455
|
this.ref_dt();
|
|
29476
29456
|
}
|
|
29477
29457
|
RefreshOnlyMemory() {
|
|
@@ -29480,7 +29460,7 @@ class FHGridComponentN {
|
|
|
29480
29460
|
}
|
|
29481
29461
|
FHGridComponentN.decorators = [
|
|
29482
29462
|
{ type: Component, args: [{
|
|
29483
|
-
selector:
|
|
29463
|
+
selector: "FHGridN",
|
|
29484
29464
|
template: "<div fxLayout=\"column\" fxFlexFill>\n <div\n fxLayout=\"row\"\n fxLayout.xs=\"column\"\n fxLayoutAlign=\"center start\"\n fxLayoutGap=\"3px\"\n style=\"min-height: 55px;\"\n [hidden]=\"!show_buttons\"\n >\n \n <div fxLayout=\"row\" fxLayoutGap=\"3px\" fxLayoutAlign=\"start center\">\n <div>\n <h5>{{num_r}} {{label_elementi | translate}}</h5>\n </div>\n \n\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <input\n matInput\n [placeholder]=\"trova_label | translate\"\n (keydown)=\"keyDownFunctioncl($event)\"\n [(ngModel)]=\"ric_libera\"\n style=\"\n width: 200px;\n border: 1px solid;\n min-height: 30px;\n \"\n />\n </div>\n\n <div\n matTooltip=\"REMOVE FILTER\"\n matTooltipPosition=\"above\"\n *ngIf=\"show_pulisci_filtri\"\n >\n <button mat-flat-button (click)=\"pulisci_filtri()\" color=\"warn\">\n <mat-icon>filter_none</mat-icon> \n </button>\n </div>\n <div matTooltip=\"AUTO SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"autoSizeAll()\"\n color=\"accent\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>swap_horiz</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"FIT SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"fitSizeAll()\"\n color=\"accent\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>keyboard_tab</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"Refresh\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"Refresh()\"\n color=\"accent\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>autorenew</mat-icon>\n </button>\n </div>\n <FHFilterComboBox\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (selchange)=\"ch_config()\"\n (fillend)=\"fe_cfg()\"\n #gf\n [init_fill]=\"false\"\n ></FHFilterComboBox>\n <div\n matTooltip=\"Modifica Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"edit_config()\">save</mat-icon>\n </button>\n </div>\n <div\n matTooltip=\"Elimina Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"elimina_config()\">delete</mat-icon>\n </button>\n </div>\n <div\n fxHide\n fxShow.gt-sm\n matTooltip=\"Crea Nuova Preferenza\"\n matTooltipPosition=\"above\"\n >\n <button\n mat-icon-button\n style=\"color: rgb(16, 98, 16);\"\n *ngIf=\"show_buttons && !pref_hidden\"\n >\n <mat-icon (click)=\"insert_config()\">library_add</mat-icon>\n </button>\n </div>\n\n <mat-slide-toggle\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (click)=\"ck_flag()\"\n #toggle_mantieni\n >\n {{mantieni_impostazioni}}\n </mat-slide-toggle>\n\n \n <div fxHide fxShow.gt-sm matTooltip=\"HELP\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"help_window()\"\n color=\"primary\"\n *ngIf=\"show_buttons && show_help\"\n >\n <mat-icon>help</mat-icon>\n </button>\n </div>\n \n\n <img\n *ngIf=\"enable_export && enable_export_pdf\"\n matTooltip=\"EXPORT PDF\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/pdf.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"print()\"\n alt=\"Export PDF\"\n width=\"24\" height=\"24\"\n />\n\n\n <img *ngIf=\"enable_export && enable_export_xls\"\n matTooltip=\"EXPORT EXCEL\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/xlsx.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"export_excel()\"\n alt=\"Export Excel\"\n width=\"24\" height=\"24\"\n />\n\n </div>\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"end center\"\n\n [style.width]=\"width_max\"\n *ngIf=\"enabled\"\n >\n\n <FHGridToolBar\n (command)=\"docmd($event)\"\n [type]=\"toolbar_type\"\n [show_link]=\"show_link\"\n [show_help]=\"show_help_bar\"\n [help_label]=\"help_label_bar\"\n [custom_commands]=\"toolbar_custom_commands\"\n [toolbar_wkfapp]=\"toolbar_wkfapp\"\n [elimina_label]=\"elimina_label\"\n [sRow]=\"sRow\"\n ></FHGridToolBar>\n </div>\n </div>\n\n\n <div fxLayout=\"row\" style=\"width: 100%;\" [fxFlex]=\"show_buttons ? 100:95\">\n <ag-grid-angular\n ref-agGrid\n style=\"width: 100%; height: 100%;\"\n id=\"myGrid\"\n (cellDoubleClicked)=\"onColumnEvent($event)\"\n (cellClicked)=\"onCellClicked($event)\"\n [headerHeight]=\"header_h\"\n [groupHeaderHeight]=\"header_h\"\n class=\"ag-theme-balham\"\n [singleClickEdit]=\"true\"\n [gridOptions]=\"gridOptions\"\n [columnDefs]=\"columnDefs\"\n [rowData]=\"rowData\"\n [rowSelection]=\"selection_mode\"\n [tooltipShowDelay]=\"tooltipShowDelay\"\n [getContextMenuItems]=\"enable_export ? getContextMenuItems_e:getContextMenuItems_n_e\"\n (filterModified)=\"onFilterModified()\"\n (rowDoubleClicked)=\"onRowDClicked($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n (columnVisible)=\"oncolumnEverythingChanged($event)\"\n (columnResized)=\"oncolumnEverythingChanged($event)\"\n (columnMoved)=\"oncolumnEverythingChanged($event)\"\n (cellValueChanged)=\"okr($event)\"\n (sortChanged)=\"onAfterSortChanged()\"\n [paginationPageSize]=\"num_per_pag\"\n (gridReady)=\"onReady($event)\"\n >\n </ag-grid-angular>\n </div>\n</div>\n",
|
|
29485
29465
|
styles: [``]
|
|
29486
29466
|
},] }
|
|
@@ -29550,11 +29530,11 @@ FHGridComponentN.propDecorators = {
|
|
|
29550
29530
|
toolbar_custom_commands: [{ type: Input }],
|
|
29551
29531
|
exec_params: [{ type: Input }],
|
|
29552
29532
|
command: [{ type: Output }],
|
|
29553
|
-
gf: [{ type: ViewChild, args: [
|
|
29554
|
-
toggle_mantieni: [{ type: ViewChild, args: [
|
|
29533
|
+
gf: [{ type: ViewChild, args: ["gf",] }],
|
|
29534
|
+
toggle_mantieni: [{ type: ViewChild, args: ["toggle_mantieni",] }],
|
|
29555
29535
|
init_end: [{ type: Output }],
|
|
29556
29536
|
off_set: [{ type: Input }],
|
|
29557
|
-
onResize: [{ type: HostListener, args: [
|
|
29537
|
+
onResize: [{ type: HostListener, args: ["window:resize", ["event"],] }]
|
|
29558
29538
|
};
|
|
29559
29539
|
|
|
29560
29540
|
class fh_win_select_by_grid {
|