@fluxhub/fluxhub-lib 11.0.122 → 11.0.124
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 +323 -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 +342 -361
- package/fesm2015/fluxhub-fluxhub-lib.js +323 -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);
|
|
@@ -28795,15 +28802,15 @@ class FHGridComponentN {
|
|
|
28795
28802
|
},
|
|
28796
28803
|
};
|
|
28797
28804
|
this.init_opt = true;
|
|
28798
|
-
if (this.grid_key ==
|
|
28805
|
+
if (this.grid_key == "PRO_H")
|
|
28799
28806
|
this.no_pref = true;
|
|
28800
28807
|
setTimeout(() => {
|
|
28801
28808
|
if (this.end_point == null)
|
|
28802
28809
|
this.end_point =
|
|
28803
28810
|
this.m_appService.API_ENDPOINT + this.m_appService.GRID_ENDPOINT;
|
|
28804
|
-
if (localStorage.getItem(this.grid_key +
|
|
28811
|
+
if (localStorage.getItem(this.grid_key + "_FILTER_UP") != null)
|
|
28805
28812
|
this.ric_libera =
|
|
28806
|
-
localStorage.getItem(this.grid_key +
|
|
28813
|
+
localStorage.getItem(this.grid_key + "_FILTER_UP") || "";
|
|
28807
28814
|
this.onResize();
|
|
28808
28815
|
});
|
|
28809
28816
|
}
|
|
@@ -28875,27 +28882,27 @@ class FHGridComponentN {
|
|
|
28875
28882
|
return i;
|
|
28876
28883
|
}
|
|
28877
28884
|
getquerySelected(f, t) {
|
|
28878
|
-
let s =
|
|
28879
|
-
if (t ==
|
|
28885
|
+
let s = "";
|
|
28886
|
+
if (t == "String") {
|
|
28880
28887
|
if (this.gridOptions.api)
|
|
28881
28888
|
this.gridOptions.api.forEachNode((node) => {
|
|
28882
28889
|
if (node.isSelected())
|
|
28883
28890
|
if (node.data[f] != null) {
|
|
28884
|
-
if (s !=
|
|
28885
|
-
s = s +
|
|
28891
|
+
if (s != "")
|
|
28892
|
+
s = s + ",";
|
|
28886
28893
|
s = s + "'" + node.data[f] + "'";
|
|
28887
28894
|
}
|
|
28888
28895
|
});
|
|
28889
28896
|
}
|
|
28890
28897
|
// console.log('ENTRO '+f+" "+t);
|
|
28891
|
-
if (t ==
|
|
28898
|
+
if (t == "Number") {
|
|
28892
28899
|
if (this.gridOptions.api)
|
|
28893
28900
|
this.gridOptions.api.forEachNode((node) => {
|
|
28894
28901
|
if (node.isSelected())
|
|
28895
28902
|
if (node.data[f] != null) {
|
|
28896
28903
|
// console.log('selected');
|
|
28897
|
-
if (s !=
|
|
28898
|
-
s = s +
|
|
28904
|
+
if (s != "")
|
|
28905
|
+
s = s + ",";
|
|
28899
28906
|
s = s + node.data[f];
|
|
28900
28907
|
}
|
|
28901
28908
|
});
|
|
@@ -28917,14 +28924,14 @@ class FHGridComponentN {
|
|
|
28917
28924
|
});
|
|
28918
28925
|
}
|
|
28919
28926
|
pulisci_filtri(resetr = true) {
|
|
28920
|
-
localStorage.removeItem(this.grid_key +
|
|
28927
|
+
localStorage.removeItem(this.grid_key + "_FILTER");
|
|
28921
28928
|
if (resetr) {
|
|
28922
|
-
if (this.ric_libera !=
|
|
28923
|
-
this.doFill(
|
|
28924
|
-
this.ric_libera =
|
|
28925
|
-
localStorage.removeItem(this.grid_key +
|
|
28929
|
+
if (this.ric_libera != "")
|
|
28930
|
+
this.doFill("", true, false);
|
|
28931
|
+
this.ric_libera = "";
|
|
28932
|
+
localStorage.removeItem(this.grid_key + "_FILTER_UP");
|
|
28926
28933
|
}
|
|
28927
|
-
this.fix_flt_temp =
|
|
28934
|
+
this.fix_flt_temp = "";
|
|
28928
28935
|
if (this.gridOptions.api)
|
|
28929
28936
|
this.gridOptions.api.setFilterModel(null);
|
|
28930
28937
|
let filtrtm = {}; /*
|
|
@@ -28938,9 +28945,9 @@ class FHGridComponentN {
|
|
|
28938
28945
|
}
|
|
28939
28946
|
print() {
|
|
28940
28947
|
if (this.custom_export)
|
|
28941
|
-
this.command.emit({ cmd:
|
|
28948
|
+
this.command.emit({ cmd: "print_pdf" });
|
|
28942
28949
|
else
|
|
28943
|
-
this.export_excel(
|
|
28950
|
+
this.export_excel("pdf");
|
|
28944
28951
|
}
|
|
28945
28952
|
init_conf() {
|
|
28946
28953
|
// console.log(" init_conf()");
|
|
@@ -28967,18 +28974,19 @@ class FHGridComponentN {
|
|
|
28967
28974
|
this.ckk_ed = true;
|
|
28968
28975
|
if (this.toggle_mantieni != null) {
|
|
28969
28976
|
this.toggle_mantieni.checked = true;
|
|
28970
|
-
if (localStorage.getItem(this.grid_key +
|
|
28971
|
-
if (localStorage.getItem(this.grid_key +
|
|
28977
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") != null)
|
|
28978
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") == "NO") {
|
|
28972
28979
|
this.toggle_mantieni.checked = false;
|
|
28973
28980
|
}
|
|
28974
28981
|
}
|
|
28975
28982
|
this.res_columns();
|
|
28976
|
-
if (localStorage.getItem(this.grid_key +
|
|
28983
|
+
if (localStorage.getItem(this.grid_key + "_POS") != null)
|
|
28977
28984
|
this.b_restored = true;
|
|
28978
|
-
if (localStorage.getItem(this.grid_key +
|
|
28979
|
-
if (localStorage.getItem(this.grid_key +
|
|
28980
|
-
this.ric_libera =
|
|
28981
|
-
|
|
28985
|
+
if (localStorage.getItem(this.grid_key + "_FILTER_UP") != null)
|
|
28986
|
+
if (localStorage.getItem(this.grid_key + "_FILTER_UP") != "") {
|
|
28987
|
+
this.ric_libera =
|
|
28988
|
+
localStorage.getItem(this.grid_key + "_FILTER_UP") || "";
|
|
28989
|
+
let arr = this.ric_libera.split(" ");
|
|
28982
28990
|
let arr_F = new Array();
|
|
28983
28991
|
for (let i = 0; i < arr.length; i++)
|
|
28984
28992
|
arr_F.push(arr[i]);
|
|
@@ -28987,27 +28995,27 @@ class FHGridComponentN {
|
|
|
28987
28995
|
// this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
|
|
28988
28996
|
if (arr_F.length == 0)
|
|
28989
28997
|
return;
|
|
28990
|
-
let ss =
|
|
28998
|
+
let ss = "";
|
|
28991
28999
|
for (let i = 0; i < arr_F.length; i++) {
|
|
28992
|
-
let ss_r =
|
|
29000
|
+
let ss_r = "";
|
|
28993
29001
|
for (let y = 0; y < this.columnDefs.length; y++) {
|
|
28994
29002
|
if (this.columnDefs[y] != null)
|
|
28995
29003
|
if (this.columnDefs[y].no_filter == null)
|
|
28996
29004
|
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 +=
|
|
29005
|
+
if (this.columnDefs[y].field != "")
|
|
29006
|
+
if (this.columnDefs[y].filter != "agDateColumnFilter") {
|
|
29007
|
+
if (ss_r != "")
|
|
29008
|
+
ss_r += " or ";
|
|
29001
29009
|
ss_r +=
|
|
29002
29010
|
this.columnDefs[y].field +
|
|
29003
29011
|
" LIKE '%" +
|
|
29004
29012
|
arr_F[i]
|
|
29005
29013
|
.replace("'", "$'")
|
|
29006
|
-
.replace(
|
|
29007
|
-
.replace(
|
|
29008
|
-
.replace(
|
|
29009
|
-
.replace(
|
|
29010
|
-
.replace(
|
|
29014
|
+
.replace("*", "$*")
|
|
29015
|
+
.replace("?", "$?")
|
|
29016
|
+
.replace("[", "$[")
|
|
29017
|
+
.replace("]", "$]")
|
|
29018
|
+
.replace("!", "'$")
|
|
29011
29019
|
.toUpperCase() +
|
|
29012
29020
|
"%' ESCAPE '$'";
|
|
29013
29021
|
}
|
|
@@ -29015,27 +29023,27 @@ class FHGridComponentN {
|
|
|
29015
29023
|
if (this.full_text_added_columns != null)
|
|
29016
29024
|
this.full_text_added_columns.map((v) => {
|
|
29017
29025
|
if (v != null)
|
|
29018
|
-
if (v !=
|
|
29019
|
-
if (ss_r !=
|
|
29020
|
-
ss_r +=
|
|
29026
|
+
if (v != "") {
|
|
29027
|
+
if (ss_r != "")
|
|
29028
|
+
ss_r += " or ";
|
|
29021
29029
|
ss_r +=
|
|
29022
29030
|
v +
|
|
29023
29031
|
" LIKE '%" +
|
|
29024
29032
|
arr_F[i]
|
|
29025
29033
|
.replace("'", "$'")
|
|
29026
|
-
.replace(
|
|
29027
|
-
.replace(
|
|
29028
|
-
.replace(
|
|
29029
|
-
.replace(
|
|
29030
|
-
.replace(
|
|
29034
|
+
.replace("*", "$*")
|
|
29035
|
+
.replace("?", "$?")
|
|
29036
|
+
.replace("[", "$[")
|
|
29037
|
+
.replace("]", "$]")
|
|
29038
|
+
.replace("!", "'$")
|
|
29031
29039
|
.toUpperCase() +
|
|
29032
29040
|
"%' ESCAPE '$'";
|
|
29033
29041
|
}
|
|
29034
29042
|
});
|
|
29035
|
-
if (ss_r !=
|
|
29036
|
-
if (ss !=
|
|
29037
|
-
ss +=
|
|
29038
|
-
ss +=
|
|
29043
|
+
if (ss_r != "") {
|
|
29044
|
+
if (ss != "")
|
|
29045
|
+
ss += " and ";
|
|
29046
|
+
ss += "(" + ss_r + ")";
|
|
29039
29047
|
}
|
|
29040
29048
|
}
|
|
29041
29049
|
this.fix_flt_temp = ss;
|
|
@@ -29045,13 +29053,6 @@ class FHGridComponentN {
|
|
|
29045
29053
|
this.ref_dt();
|
|
29046
29054
|
}, 100);
|
|
29047
29055
|
}
|
|
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
29056
|
}
|
|
29056
29057
|
set_init_size() {
|
|
29057
29058
|
if (this.myData.length == 0) {
|
|
@@ -29066,7 +29067,6 @@ class FHGridComponentN {
|
|
|
29066
29067
|
this.autoSizeAll();
|
|
29067
29068
|
}
|
|
29068
29069
|
res_columns(forza = false) {
|
|
29069
|
-
console.log("🚀 ~ file: fhgridn.ts:1370 ~ FHGridComponentN ~ res_columns ~ res_columns:", forza);
|
|
29070
29070
|
if (this.columnDefs == null) {
|
|
29071
29071
|
setTimeout(() => {
|
|
29072
29072
|
this.res_columns(forza);
|
|
@@ -29083,19 +29083,19 @@ class FHGridComponentN {
|
|
|
29083
29083
|
let b_rip = false;
|
|
29084
29084
|
if (this.toggle_mantieni != null)
|
|
29085
29085
|
b_mantieni_ck = this.toggle_mantieni.checked;
|
|
29086
|
-
if (localStorage.getItem(this.grid_key +
|
|
29087
|
-
localStorage.getItem(this.grid_key +
|
|
29086
|
+
if (localStorage.getItem(this.grid_key + "_COLS") == null ||
|
|
29087
|
+
localStorage.getItem(this.grid_key + "_COLS") == "") {
|
|
29088
29088
|
this.set_init_size();
|
|
29089
29089
|
return;
|
|
29090
29090
|
}
|
|
29091
|
-
if (localStorage.getItem(this.grid_key +
|
|
29091
|
+
if (localStorage.getItem(this.grid_key + "_COLS") != null &&
|
|
29092
29092
|
(b_mantieni_ck || forza)) {
|
|
29093
29093
|
// console.log('qqqqq1111');
|
|
29094
|
-
if (localStorage.getItem(this.grid_key +
|
|
29094
|
+
if (localStorage.getItem(this.grid_key + "_COLS") != "") {
|
|
29095
29095
|
b_rip = true;
|
|
29096
29096
|
// console.log('qqqqq2222');
|
|
29097
29097
|
try {
|
|
29098
|
-
let a = JSON.parse(
|
|
29098
|
+
let a = JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "[]");
|
|
29099
29099
|
let annulla = true;
|
|
29100
29100
|
for (let i = 0; i < a.length; i++) {
|
|
29101
29101
|
if (!a[i].hide)
|
|
@@ -29103,13 +29103,15 @@ class FHGridComponentN {
|
|
|
29103
29103
|
}
|
|
29104
29104
|
// console.log('qqqqq3333 ',annulla);
|
|
29105
29105
|
if (annulla)
|
|
29106
|
-
localStorage.getItem(this.grid_key +
|
|
29106
|
+
localStorage.getItem(this.grid_key + "_COLS");
|
|
29107
29107
|
else {
|
|
29108
29108
|
// console.log('qqqqq4444');
|
|
29109
|
-
if (localStorage.getItem(this.grid_key +
|
|
29109
|
+
if (localStorage.getItem(this.grid_key + "_COLS"))
|
|
29110
29110
|
if (this.gridOptions.columnApi) {
|
|
29111
29111
|
// console.log('qqqqq5555',JSON.parse(localStorage.getItem(this.grid_key + '_COLS')||'{}'));
|
|
29112
|
-
let colState = {
|
|
29112
|
+
let colState = {
|
|
29113
|
+
state: JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "{}"),
|
|
29114
|
+
};
|
|
29113
29115
|
this.gridOptions.columnApi.applyColumnState(colState);
|
|
29114
29116
|
}
|
|
29115
29117
|
}
|
|
@@ -29119,37 +29121,12 @@ class FHGridComponentN {
|
|
|
29119
29121
|
}
|
|
29120
29122
|
}
|
|
29121
29123
|
}
|
|
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 &&
|
|
29124
|
+
if (localStorage.getItem(this.grid_key + "_FILTER") != null &&
|
|
29148
29125
|
(b_mantieni_ck || forza))
|
|
29149
|
-
if (localStorage.getItem(this.grid_key +
|
|
29126
|
+
if (localStorage.getItem(this.grid_key + "_FILTER") != "") {
|
|
29150
29127
|
try {
|
|
29151
29128
|
if (this.gridOptions.api)
|
|
29152
|
-
this.gridOptions.api.setFilterModel(JSON.parse(
|
|
29129
|
+
this.gridOptions.api.setFilterModel(JSON.parse(localStorage.getItem(this.grid_key + "_FILTER") || ""));
|
|
29153
29130
|
}
|
|
29154
29131
|
catch (eer) {
|
|
29155
29132
|
console.log(eer);
|
|
@@ -29157,12 +29134,13 @@ class FHGridComponentN {
|
|
|
29157
29134
|
}
|
|
29158
29135
|
}
|
|
29159
29136
|
getRows() {
|
|
29160
|
-
return
|
|
29137
|
+
return this.gridOptions.rowData || [];
|
|
29161
29138
|
}
|
|
29162
29139
|
sortAndFilter(sortModel, filterModel) {
|
|
29163
29140
|
// return sortData(sortModel, filterData(filterModel, allOfTheData))
|
|
29164
29141
|
}
|
|
29165
29142
|
ref_dt() {
|
|
29143
|
+
console.log("🚀 ~ file: fhgridn.ts:1460 ~ FHGridComponentN ~ ref_dt ~ ref_dt: try init!!!!");
|
|
29166
29144
|
if (this.gridOptions == null)
|
|
29167
29145
|
setTimeout(() => {
|
|
29168
29146
|
this.ref_dt();
|
|
@@ -29172,8 +29150,10 @@ class FHGridComponentN {
|
|
|
29172
29150
|
setTimeout(() => {
|
|
29173
29151
|
this.ref_dt();
|
|
29174
29152
|
}, 500);
|
|
29175
|
-
else
|
|
29153
|
+
else {
|
|
29154
|
+
console.log("ref_dt!!!!");
|
|
29176
29155
|
this.gridOptions.api.setServerSideDatasource(this.dataSource);
|
|
29156
|
+
}
|
|
29177
29157
|
}
|
|
29178
29158
|
}
|
|
29179
29159
|
updateRow() {
|
|
@@ -29193,14 +29173,14 @@ class FHGridComponentN {
|
|
|
29193
29173
|
this.setHeaderHeight(this.header_h);
|
|
29194
29174
|
if (this.gf != null && this.show_buttons && !this.pref_hidden) {
|
|
29195
29175
|
if (!this.private_pref)
|
|
29196
|
-
this.gf.sql =
|
|
29176
|
+
this.gf.sql = "SELECT_CFG_GRID";
|
|
29197
29177
|
else
|
|
29198
|
-
this.gf.sql =
|
|
29199
|
-
this.gf.types = [
|
|
29178
|
+
this.gf.sql = "SELECT_CFG_GRID_BY_USER";
|
|
29179
|
+
this.gf.types = ["string"];
|
|
29200
29180
|
this.gf.values = [this.grid_key];
|
|
29201
29181
|
this.gf.fillCombo();
|
|
29202
|
-
if (localStorage.getItem(this.grid_key +
|
|
29203
|
-
if (localStorage.getItem(this.grid_key +
|
|
29182
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO")
|
|
29183
|
+
if (localStorage.getItem(this.grid_key + "_CFG_DEFAULT") != null) {
|
|
29204
29184
|
return;
|
|
29205
29185
|
}
|
|
29206
29186
|
}
|
|
@@ -29215,16 +29195,16 @@ class FHGridComponentN {
|
|
|
29215
29195
|
}
|
|
29216
29196
|
save_cfg() {
|
|
29217
29197
|
if (this.gridOptions.columnApi)
|
|
29218
|
-
localStorage.setItem(this.grid_key +
|
|
29198
|
+
localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29219
29199
|
}
|
|
29220
29200
|
fe_cfg() {
|
|
29221
29201
|
if (this.gf != null)
|
|
29222
29202
|
if (this.gf.getObj() != null)
|
|
29223
|
-
if (localStorage.getItem(this.grid_key +
|
|
29224
|
-
this.gf.setByDescri(
|
|
29225
|
-
localStorage.setItem(this.grid_key +
|
|
29203
|
+
if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO") {
|
|
29204
|
+
this.gf.setByDescri(localStorage.getItem(this.grid_key + "_CFG_DEFAULT") || "");
|
|
29205
|
+
localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COLS);
|
|
29226
29206
|
// localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
|
|
29227
|
-
localStorage.setItem(this.grid_key +
|
|
29207
|
+
localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
|
|
29228
29208
|
this.curr_config = this.gf.getValue();
|
|
29229
29209
|
}
|
|
29230
29210
|
this.onready_go();
|
|
@@ -29249,15 +29229,15 @@ class FHGridComponentN {
|
|
|
29249
29229
|
}
|
|
29250
29230
|
}
|
|
29251
29231
|
free_search() {
|
|
29252
|
-
if (this.ric_libera ==
|
|
29232
|
+
if (this.ric_libera == "") {
|
|
29253
29233
|
this.pulisci_filtri();
|
|
29254
|
-
this.fix_flt_temp =
|
|
29255
|
-
this.doFill(
|
|
29256
|
-
localStorage.removeItem(this.grid_key +
|
|
29234
|
+
this.fix_flt_temp = "";
|
|
29235
|
+
this.doFill("", true, false);
|
|
29236
|
+
localStorage.removeItem(this.grid_key + "_FILTER_UP");
|
|
29257
29237
|
return;
|
|
29258
29238
|
}
|
|
29259
|
-
localStorage.setItem(this.grid_key +
|
|
29260
|
-
let arr = this.ric_libera.split(
|
|
29239
|
+
localStorage.setItem(this.grid_key + "_FILTER_UP", this.ric_libera);
|
|
29240
|
+
let arr = this.ric_libera.split(" ");
|
|
29261
29241
|
let arr_F = new Array();
|
|
29262
29242
|
for (let i = 0; i < arr.length; i++)
|
|
29263
29243
|
arr_F.push(arr[i]);
|
|
@@ -29265,27 +29245,27 @@ class FHGridComponentN {
|
|
|
29265
29245
|
// else this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
|
|
29266
29246
|
if (arr_F.length == 0)
|
|
29267
29247
|
return;
|
|
29268
|
-
let ss =
|
|
29248
|
+
let ss = "";
|
|
29269
29249
|
for (let i = 0; i < arr_F.length; i++) {
|
|
29270
|
-
let ss_r =
|
|
29250
|
+
let ss_r = "";
|
|
29271
29251
|
for (let y = 0; y < this.columnDefs.length; y++) {
|
|
29272
29252
|
if (this.columnDefs[y] != null)
|
|
29273
29253
|
if (this.columnDefs[y].no_filter == null)
|
|
29274
29254
|
if (this.columnDefs[y].field != null)
|
|
29275
|
-
if (this.columnDefs[y].field !=
|
|
29276
|
-
if (this.columnDefs[y].filter !=
|
|
29277
|
-
if (ss_r !=
|
|
29278
|
-
ss_r +=
|
|
29255
|
+
if (this.columnDefs[y].field != "")
|
|
29256
|
+
if (this.columnDefs[y].filter != "agDateColumnFilter") {
|
|
29257
|
+
if (ss_r != "")
|
|
29258
|
+
ss_r += " or ";
|
|
29279
29259
|
ss_r +=
|
|
29280
29260
|
this.columnDefs[y].field +
|
|
29281
29261
|
" LIKE '%" +
|
|
29282
29262
|
arr_F[i]
|
|
29283
29263
|
.replace("'", "$'")
|
|
29284
|
-
.replace(
|
|
29285
|
-
.replace(
|
|
29286
|
-
.replace(
|
|
29287
|
-
.replace(
|
|
29288
|
-
.replace(
|
|
29264
|
+
.replace("*", "$*")
|
|
29265
|
+
.replace("?", "$?")
|
|
29266
|
+
.replace("[", "$[")
|
|
29267
|
+
.replace("]", "$]")
|
|
29268
|
+
.replace("!", "'$")
|
|
29289
29269
|
.toUpperCase() +
|
|
29290
29270
|
"%' ESCAPE '$'";
|
|
29291
29271
|
}
|
|
@@ -29293,28 +29273,28 @@ class FHGridComponentN {
|
|
|
29293
29273
|
if (this.full_text_added_columns != null)
|
|
29294
29274
|
this.full_text_added_columns.map((v) => {
|
|
29295
29275
|
if (v != null)
|
|
29296
|
-
if (v !=
|
|
29297
|
-
if (ss_r !=
|
|
29298
|
-
ss_r +=
|
|
29276
|
+
if (v != "") {
|
|
29277
|
+
if (ss_r != "")
|
|
29278
|
+
ss_r += " or ";
|
|
29299
29279
|
ss_r +=
|
|
29300
29280
|
v +
|
|
29301
29281
|
" LIKE '%" +
|
|
29302
29282
|
arr_F[i]
|
|
29303
29283
|
.replace("'", "$'")
|
|
29304
|
-
.replace(
|
|
29305
|
-
.replace(
|
|
29306
|
-
.replace(
|
|
29307
|
-
.replace(
|
|
29308
|
-
.replace(
|
|
29284
|
+
.replace("*", "$*")
|
|
29285
|
+
.replace("?", "$?")
|
|
29286
|
+
.replace("[", "$[")
|
|
29287
|
+
.replace("]", "$]")
|
|
29288
|
+
.replace("!", "'$")
|
|
29309
29289
|
.toUpperCase() +
|
|
29310
29290
|
"%' ESCAPE '$'";
|
|
29311
29291
|
}
|
|
29312
29292
|
});
|
|
29313
|
-
if (ss_r !=
|
|
29293
|
+
if (ss_r != "") {
|
|
29314
29294
|
// console.log('ADDO '), ss_r;
|
|
29315
|
-
if (ss !=
|
|
29316
|
-
ss +=
|
|
29317
|
-
ss +=
|
|
29295
|
+
if (ss != "")
|
|
29296
|
+
ss += " and ";
|
|
29297
|
+
ss += "(" + ss_r + ")";
|
|
29318
29298
|
}
|
|
29319
29299
|
}
|
|
29320
29300
|
this.pulisci_filtri(false);
|
|
@@ -29354,7 +29334,7 @@ class FHGridComponentN {
|
|
|
29354
29334
|
if (this.b_init) {
|
|
29355
29335
|
// console.log('salvo f: '+JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29356
29336
|
if (this.gridOptions.columnApi)
|
|
29357
|
-
localStorage.setItem(this.grid_key +
|
|
29337
|
+
localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29358
29338
|
}
|
|
29359
29339
|
}
|
|
29360
29340
|
onFilterModified() {
|
|
@@ -29365,7 +29345,7 @@ class FHGridComponentN {
|
|
|
29365
29345
|
setTimeout(() => {
|
|
29366
29346
|
if (this.b_init) {
|
|
29367
29347
|
if (this.gridOptions.api)
|
|
29368
|
-
localStorage.setItem(this.grid_key +
|
|
29348
|
+
localStorage.setItem(this.grid_key + "_FILTER", JSON.stringify(this.gridOptions.api.getFilterModel()));
|
|
29369
29349
|
}
|
|
29370
29350
|
}, 200);
|
|
29371
29351
|
}
|
|
@@ -29378,7 +29358,7 @@ class FHGridComponentN {
|
|
|
29378
29358
|
return;
|
|
29379
29359
|
if (this.b_init) {
|
|
29380
29360
|
if (this.gridOptions.columnApi)
|
|
29381
|
-
localStorage.setItem(this.grid_key +
|
|
29361
|
+
localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
29382
29362
|
// console.log('salvo s: '+this.gridOptions.api.getSortModel());
|
|
29383
29363
|
/*
|
|
29384
29364
|
|
|
@@ -29403,15 +29383,15 @@ class FHGridComponentN {
|
|
|
29403
29383
|
if (selectedInGrid != null)
|
|
29404
29384
|
if (selectedInGrid[0] != null) {
|
|
29405
29385
|
// console.log((this.gridOptions.api.getVerticalPixelRange()));
|
|
29406
|
-
localStorage.setItem(this.grid_key +
|
|
29386
|
+
localStorage.setItem(this.grid_key + "_POS", String(selectedInGrid[0].rowIndex));
|
|
29407
29387
|
if (this.gridOptions.api)
|
|
29408
|
-
localStorage.setItem(this.grid_key +
|
|
29409
|
-
localStorage.setItem(this.grid_key +
|
|
29388
|
+
localStorage.setItem(this.grid_key + "_POS_BAR", JSON.stringify(this.gridOptions.api.getVerticalPixelRange()));
|
|
29389
|
+
localStorage.setItem(this.grid_key + "_POS2", this.getRowNodeId(selectedInGrid[0]));
|
|
29410
29390
|
// this.m_appService.getState().grid_obj=new Object();
|
|
29411
29391
|
// this.m_appService.getState().grid_obj[this.grid_key+'_NODE']=this.gridOptions.api.getSelectedRows[0];
|
|
29412
29392
|
}
|
|
29413
29393
|
this.sRow = $event.data;
|
|
29414
|
-
localStorage.setItem(this.grid_key +
|
|
29394
|
+
localStorage.setItem(this.grid_key + "_LAST_ROW", JSON.stringify(this.sRow));
|
|
29415
29395
|
this.clicked.emit($event.data);
|
|
29416
29396
|
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
29417
29397
|
if (iOS) {
|
|
@@ -29470,6 +29450,7 @@ class FHGridComponentN {
|
|
|
29470
29450
|
}, 10);
|
|
29471
29451
|
}
|
|
29472
29452
|
Refresh() {
|
|
29453
|
+
console.log("🚀 ~ file: fhgridn.ts:1831 ~ FHGridComponentN ~ Refresh ~ Refresh:");
|
|
29473
29454
|
this.ref_dt();
|
|
29474
29455
|
}
|
|
29475
29456
|
RefreshOnlyMemory() {
|
|
@@ -29478,7 +29459,7 @@ class FHGridComponentN {
|
|
|
29478
29459
|
}
|
|
29479
29460
|
FHGridComponentN.decorators = [
|
|
29480
29461
|
{ type: Component, args: [{
|
|
29481
|
-
selector:
|
|
29462
|
+
selector: "FHGridN",
|
|
29482
29463
|
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",
|
|
29483
29464
|
styles: [``]
|
|
29484
29465
|
},] }
|
|
@@ -29548,11 +29529,11 @@ FHGridComponentN.propDecorators = {
|
|
|
29548
29529
|
toolbar_custom_commands: [{ type: Input }],
|
|
29549
29530
|
exec_params: [{ type: Input }],
|
|
29550
29531
|
command: [{ type: Output }],
|
|
29551
|
-
gf: [{ type: ViewChild, args: [
|
|
29552
|
-
toggle_mantieni: [{ type: ViewChild, args: [
|
|
29532
|
+
gf: [{ type: ViewChild, args: ["gf",] }],
|
|
29533
|
+
toggle_mantieni: [{ type: ViewChild, args: ["toggle_mantieni",] }],
|
|
29553
29534
|
init_end: [{ type: Output }],
|
|
29554
29535
|
off_set: [{ type: Input }],
|
|
29555
|
-
onResize: [{ type: HostListener, args: [
|
|
29536
|
+
onResize: [{ type: HostListener, args: ["window:resize", ["event"],] }]
|
|
29556
29537
|
};
|
|
29557
29538
|
|
|
29558
29539
|
class fh_win_select_by_grid {
|