@iapps/ng-dhis2-ui 1.1.44 → 1.1.45
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.
|
@@ -3406,11 +3406,16 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
3406
3406
|
else if ('trackedEntityInstances' in response.data) {
|
|
3407
3407
|
responsePager = response.data
|
|
3408
3408
|
.pager;
|
|
3409
|
+
console.log('tei received', response.data.trackedEntityInstances);
|
|
3409
3410
|
const { columns, data, filteredEntityColumns } = getTrackedEntityData(response, this.programId, pager, this.filters);
|
|
3410
3411
|
entityColumns = columns;
|
|
3412
|
+
console.log('columns shown', entityColumns);
|
|
3411
3413
|
entityData = data;
|
|
3412
|
-
let firstTei = response.data
|
|
3413
|
-
|
|
3414
|
+
let firstTei = response.data
|
|
3415
|
+
?.trackedEntityInstances?.[0]?.trackedEntityInstance;
|
|
3416
|
+
if (firstTei) {
|
|
3417
|
+
this.firstValue.emit(firstTei);
|
|
3418
|
+
}
|
|
3414
3419
|
// setFilteredColumns(filteredEntityColumns);
|
|
3415
3420
|
// Ensure filter inputs do not disappear when no data is returned
|
|
3416
3421
|
// If filteredEntityColumns is empty, keep the previous columns instead of clearing them
|
|
@@ -3423,7 +3428,9 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
3423
3428
|
entityColumns = columns;
|
|
3424
3429
|
entityData = data;
|
|
3425
3430
|
}
|
|
3431
|
+
console.log('before final columns');
|
|
3426
3432
|
const finalColumns = addActionsColumn([{ label: '#', key: 'index' }, ...entityColumns], this.actionOptions);
|
|
3433
|
+
console.log('the columns shown', finalColumns);
|
|
3427
3434
|
setLoading(false);
|
|
3428
3435
|
// console.log('hey');
|
|
3429
3436
|
setColumns(...[finalColumns]);
|
|
@@ -3442,6 +3449,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
3442
3449
|
pager.page,
|
|
3443
3450
|
pager.pageSize,
|
|
3444
3451
|
]);
|
|
3452
|
+
console.log('the columns shown hehe', columns);
|
|
3445
3453
|
const getDropdownOptions = (row) => {
|
|
3446
3454
|
return (this.actionOptions || []).map((option) => ({
|
|
3447
3455
|
...option,
|