@esfaenza/es-table 11.2.59 → 11.2.60
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/esfaenza-es-table.umd.js +35 -10
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +35 -12
- package/fesm2015/esfaenza-es-table.js +34 -11
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/package.json +1 -1
|
@@ -3356,11 +3356,21 @@ class EsTableComponent {
|
|
|
3356
3356
|
if (this.View) {
|
|
3357
3357
|
let cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3358
3358
|
let updatedPrefs = true;
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3359
|
+
let repository;
|
|
3360
|
+
let source;
|
|
3361
|
+
if (this.View.report_columns) {
|
|
3362
|
+
repository = this.View.report_columns.map(t => t.id);
|
|
3363
|
+
source = cols;
|
|
3364
|
+
}
|
|
3365
|
+
else {
|
|
3366
|
+
repository = cols;
|
|
3367
|
+
source = this.View.columns;
|
|
3368
|
+
}
|
|
3369
|
+
// In modalità report devo controllare che tutte le colonne salvate facciano parte della vista
|
|
3370
|
+
// In modalità normale invece se le preferenze fanno riferimento a delle colonne che io non ho nella View attuale significa che
|
|
3371
|
+
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non foccio operazioni
|
|
3372
|
+
for (let i = 0; i < source.length; i++) {
|
|
3373
|
+
if (!repository.indexOf(source[i])) {
|
|
3364
3374
|
updatedPrefs = false;
|
|
3365
3375
|
break;
|
|
3366
3376
|
}
|
|
@@ -3393,16 +3403,29 @@ class EsTableComponent {
|
|
|
3393
3403
|
var prefs = yield this.prefService.getItem(this.ngControl.name).toPromise();
|
|
3394
3404
|
let cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3395
3405
|
let updatedPrefs = true;
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3406
|
+
let repository;
|
|
3407
|
+
let source;
|
|
3408
|
+
if (this.View.report_columns) {
|
|
3409
|
+
repository = this.View.report_columns.map(t => t.id);
|
|
3410
|
+
source = cols;
|
|
3411
|
+
}
|
|
3412
|
+
else {
|
|
3413
|
+
repository = cols;
|
|
3414
|
+
source = this.View.columns;
|
|
3415
|
+
}
|
|
3416
|
+
// In modalità report devo controllare che tutte le colonne salvate facciano parte della vista
|
|
3417
|
+
// In modalità normale invece se le preferenze fanno riferimento a delle colonne che io non ho nella View attuale significa che
|
|
3418
|
+
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non foccio operazioni
|
|
3419
|
+
for (let i = 0; i < source.length; i++) {
|
|
3420
|
+
if (!repository.indexOf(source[i])) {
|
|
3400
3421
|
updatedPrefs = false;
|
|
3401
3422
|
break;
|
|
3402
3423
|
}
|
|
3403
3424
|
}
|
|
3404
|
-
|
|
3405
|
-
|
|
3425
|
+
if (updatedPrefs) {
|
|
3426
|
+
this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3427
|
+
this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
|
|
3428
|
+
}
|
|
3406
3429
|
}
|
|
3407
3430
|
}
|
|
3408
3431
|
if (this.SearchView)
|