@fluxhub/fluxhub-lib 19.0.162 โ 19.0.163
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.
|
@@ -9471,15 +9471,12 @@ class FHGridComponent {
|
|
|
9471
9471
|
}
|
|
9472
9472
|
dataSource = {
|
|
9473
9473
|
getRows: (params) => {
|
|
9474
|
-
console.log('๐ต getRows chiamato - startRow:', params.request.startRow, 'endRow:', params.request.endRow);
|
|
9475
9474
|
this.num_r = -1;
|
|
9476
9475
|
this.m_appService.start();
|
|
9477
9476
|
let p = { kd: this.grid_config_key };
|
|
9478
9477
|
p.num_per_pag = params.request.endRow - params.request.startRow;
|
|
9479
9478
|
p.fix_flt = this.fix_flt || '';
|
|
9480
|
-
|
|
9481
|
-
p.curr_page = Math.round(rawPage);
|
|
9482
|
-
console.log('๐ต Calcolato curr_page:', p.curr_page, '(raw:', rawPage, ') - num_per_pag:', p.num_per_pag, '- startRow:', params.request.startRow);
|
|
9479
|
+
p.curr_page = Math.round(params.request.startRow / p.num_per_pag);
|
|
9483
9480
|
if (p.curr_page == null)
|
|
9484
9481
|
p.curr_page = 0;
|
|
9485
9482
|
if (p.num_per_pag == null)
|
|
@@ -9516,27 +9513,15 @@ class FHGridComponent {
|
|
|
9516
9513
|
if (data != null)
|
|
9517
9514
|
if (data.result_msg == 'OK') {
|
|
9518
9515
|
ok_op = true;
|
|
9519
|
-
|
|
9520
|
-
// this.rowData = data.result_data;
|
|
9521
|
-
console.log('โ
params.success chiamato - rowCount:', data.count, 'rowData.length:', data.result_data.length);
|
|
9516
|
+
this.rowData = data.result_data;
|
|
9522
9517
|
params.success({ rowData: data.result_data, rowCount: data.count });
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
// this.num_r = data.count;
|
|
9528
|
-
console.log('๐ SKIPPO cdr.detectChanges() per test');
|
|
9529
|
-
// this.cdr.detectChanges();
|
|
9530
|
-
console.log('๐ cdr.detectChanges() skippato');
|
|
9518
|
+
this.b_init = true;
|
|
9519
|
+
this.myData = data.result_data.slice();
|
|
9520
|
+
this.num_r = data.count;
|
|
9521
|
+
this.cdr.detectChanges();
|
|
9531
9522
|
this.m_appService.complete();
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
console.log('๐ข fill_end.emit() skippato');
|
|
9535
|
-
// check_width() puรฒ causare resize che triggera nuovi caricamenti - chiamalo solo al primo caricamento
|
|
9536
|
-
// if (isFirstDataLoad) {
|
|
9537
|
-
// console.log('๐ Chiamando check_width() (SOLO PRIMA VOLTA)');
|
|
9538
|
-
// this.check_width();
|
|
9539
|
-
// }
|
|
9523
|
+
this.fill_end.emit();
|
|
9524
|
+
this.check_width();
|
|
9540
9525
|
localStorage.setItem(this.grid_customer_preference_key + '_POS1', JSON.stringify(p));
|
|
9541
9526
|
if (localStorage.getItem(this.grid_customer_preference_key + '_POS2') != null)
|
|
9542
9527
|
if (this.gridOptions != null)
|
|
@@ -9558,17 +9543,10 @@ class FHGridComponent {
|
|
|
9558
9543
|
if (this.toggle_mantieni != null)
|
|
9559
9544
|
b_mantieni_ck = this.toggle_mantieni.checked;
|
|
9560
9545
|
if (this.no_pref && !this.b_init1 && this.autosize_at_ini) {
|
|
9561
|
-
console.log('๐ Chiamando set_init_size()');
|
|
9562
9546
|
this.set_init_size();
|
|
9563
9547
|
}
|
|
9564
|
-
// Salva lo stato PRIMA di modificarlo per evitare ExpressionChangedAfterItHasBeenCheckedError
|
|
9565
|
-
const isFirstLoad = !this.b_init1;
|
|
9566
9548
|
this.b_init1 = true;
|
|
9567
|
-
|
|
9568
|
-
if (isFirstLoad) {
|
|
9569
|
-
console.log('๐๏ธ Chiamando ensure_visible() (SOLO PRIMA VOLTA)');
|
|
9570
|
-
this.ensure_visible();
|
|
9571
|
-
}
|
|
9549
|
+
this.ensure_visible();
|
|
9572
9550
|
if (localStorage.getItem(this.grid_customer_preference_key + '_COLS') == null &&
|
|
9573
9551
|
this.autosize_at_ini)
|
|
9574
9552
|
setTimeout(() => {
|
|
@@ -9803,32 +9781,59 @@ class FHGridComponent {
|
|
|
9803
9781
|
ctrlV: this._trs.instant('ctrl & V'),
|
|
9804
9782
|
},
|
|
9805
9783
|
getRowId: (itemg) => {
|
|
9806
|
-
if (itemg == null)
|
|
9784
|
+
if (itemg == null) {
|
|
9785
|
+
console.warn('๐ getRowId: itemg NULL - generando GUID!');
|
|
9807
9786
|
return this.uti_s.newGuid();
|
|
9808
|
-
|
|
9787
|
+
}
|
|
9788
|
+
if (itemg.data == null) {
|
|
9789
|
+
console.warn('๐ getRowId: data NULL - generando GUID!');
|
|
9809
9790
|
return this.uti_s.newGuid();
|
|
9791
|
+
}
|
|
9810
9792
|
let item = itemg.data;
|
|
9811
9793
|
let rowId;
|
|
9812
|
-
|
|
9794
|
+
let source;
|
|
9795
|
+
if (item.customKeyField != null) {
|
|
9813
9796
|
rowId = [item.customKeyField];
|
|
9814
|
-
|
|
9797
|
+
source = 'customKeyField';
|
|
9798
|
+
}
|
|
9799
|
+
else if (item.ID != null) {
|
|
9815
9800
|
rowId = String(item.ID);
|
|
9816
|
-
|
|
9801
|
+
source = 'ID';
|
|
9802
|
+
}
|
|
9803
|
+
else if (item.id != null) {
|
|
9817
9804
|
rowId = String(item.id);
|
|
9818
|
-
|
|
9805
|
+
source = 'id';
|
|
9806
|
+
}
|
|
9807
|
+
else if (item.uiid != null) {
|
|
9819
9808
|
rowId = item.uiid;
|
|
9820
|
-
|
|
9809
|
+
source = 'uiid';
|
|
9810
|
+
}
|
|
9811
|
+
else if (item.codice != null) {
|
|
9821
9812
|
rowId = item.codice;
|
|
9822
|
-
|
|
9813
|
+
source = 'codice';
|
|
9814
|
+
}
|
|
9815
|
+
else if (item.id_gruppo != null) {
|
|
9823
9816
|
rowId = item.id_gruppo;
|
|
9824
|
-
|
|
9817
|
+
source = 'id_gruppo';
|
|
9818
|
+
}
|
|
9819
|
+
else if (item.id_doc != null) {
|
|
9825
9820
|
rowId = item.id_doc;
|
|
9826
|
-
|
|
9821
|
+
source = 'id_doc';
|
|
9822
|
+
}
|
|
9823
|
+
else if (item.notesid != null) {
|
|
9827
9824
|
rowId = item.notesid;
|
|
9828
|
-
|
|
9825
|
+
source = 'notesid';
|
|
9826
|
+
}
|
|
9827
|
+
else if (item.ord != null) {
|
|
9829
9828
|
rowId = item.ord;
|
|
9830
|
-
|
|
9829
|
+
source = 'ord';
|
|
9830
|
+
}
|
|
9831
|
+
else {
|
|
9832
|
+
console.warn('๐ getRowId: NESSUN CAMPO ID TROVATO - generando GUID! Campi disponibili:', Object.keys(item));
|
|
9831
9833
|
rowId = this.uti_s.newGuid();
|
|
9834
|
+
source = 'GUID_GENERATO';
|
|
9835
|
+
}
|
|
9836
|
+
console.log('๐ getRowId:', rowId, '(source:', source + ')');
|
|
9832
9837
|
return rowId;
|
|
9833
9838
|
}
|
|
9834
9839
|
};
|
|
@@ -10153,7 +10158,6 @@ class FHGridComponent {
|
|
|
10153
10158
|
// return sortData(sortModel, filterData(filterModel, allOfTheData))
|
|
10154
10159
|
}
|
|
10155
10160
|
ref_dt() {
|
|
10156
|
-
console.log('๐ด ref_dt() chiamato - Stack trace:', new Error().stack?.split('\n').slice(1, 4).join('\n'));
|
|
10157
10161
|
if (this.gridOptions == null)
|
|
10158
10162
|
setTimeout(() => {
|
|
10159
10163
|
this.ref_dt();
|
|
@@ -10163,10 +10167,8 @@ class FHGridComponent {
|
|
|
10163
10167
|
setTimeout(() => {
|
|
10164
10168
|
this.ref_dt();
|
|
10165
10169
|
}, 500);
|
|
10166
|
-
else
|
|
10167
|
-
console.log('๐ด ref_dt() - setGridOption(serverSideDatasource) - RESETTA TUTTO');
|
|
10170
|
+
else
|
|
10168
10171
|
this.gridApi.setGridOption('serverSideDatasource', this.dataSource);
|
|
10169
|
-
}
|
|
10170
10172
|
}
|
|
10171
10173
|
}
|
|
10172
10174
|
updateRow() {
|
|
@@ -10438,7 +10440,6 @@ class FHGridComponent {
|
|
|
10438
10440
|
}, 10);
|
|
10439
10441
|
}
|
|
10440
10442
|
Refresh() {
|
|
10441
|
-
console.log('๐ Refresh() chiamato');
|
|
10442
10443
|
this.ref_dt();
|
|
10443
10444
|
}
|
|
10444
10445
|
RefreshOnlyMemory() {
|