@iapps/ng-dhis2-ui 1.2.104 → 1.2.105
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.
|
@@ -7,7 +7,7 @@ import * as i1 from '@iapps/ngx-dhis2-http-client';
|
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import React__default, { useState, useCallback, useRef, useEffect, createContext, useContext, useMemo } from 'react';
|
|
9
9
|
import * as ReactDOM from 'react-dom/client';
|
|
10
|
-
import { catchError, of, map, zip, firstValueFrom, filter, take, Subject, takeUntil } from 'rxjs';
|
|
10
|
+
import { catchError, of, map, zip, firstValueFrom, from, filter, take, Subject, takeUntil } from 'rxjs';
|
|
11
11
|
import i18n from '@dhis2/d2-i18n';
|
|
12
12
|
import { colors, theme, spacers } from '@dhis2/ui-constants';
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
@@ -4041,30 +4041,23 @@ const LineListTable = ({ columns, data, pager, setPager, getTextColorFromBackGro
|
|
|
4041
4041
|
};
|
|
4042
4042
|
|
|
4043
4043
|
class LineListService {
|
|
4044
|
-
constructor(httpClient) {
|
|
4045
|
-
this.httpClient = httpClient;
|
|
4046
|
-
}
|
|
4047
|
-
/**
|
|
4048
|
-
* Fetch orgUnit names for given orgUnit IDs
|
|
4049
|
-
*/
|
|
4050
4044
|
fetchOrgUnits(orgUnitIds) {
|
|
4045
|
+
const d2 = window.d2Web;
|
|
4051
4046
|
const idsQuery = `filter=id:in:[${orgUnitIds}]`;
|
|
4052
|
-
return
|
|
4053
|
-
.get(`organisationUnits.json?fields=id,name&paging=false&${idsQuery}`)
|
|
4054
|
-
.pipe(map$1((response) => {
|
|
4047
|
+
return from(d2.httpInstance.get(`organisationUnits.json?fields=id,name&paging=false&${idsQuery}`)).pipe(map$1((response) => {
|
|
4055
4048
|
const orgUnitsMap = new Map();
|
|
4056
|
-
response
|
|
4049
|
+
(response?.data?.['organisationUnits'] || []).forEach((orgUnit) => {
|
|
4057
4050
|
orgUnitsMap.set(orgUnit.id, orgUnit.name);
|
|
4058
4051
|
});
|
|
4059
4052
|
return orgUnitsMap;
|
|
4060
4053
|
}));
|
|
4061
4054
|
}
|
|
4062
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService, deps: [
|
|
4055
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4063
4056
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService }); }
|
|
4064
4057
|
}
|
|
4065
4058
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService, decorators: [{
|
|
4066
4059
|
type: Injectable
|
|
4067
|
-
}]
|
|
4060
|
+
}] });
|
|
4068
4061
|
|
|
4069
4062
|
const getTrackedEntityTableData = (response, programId, pager, metaData, searcheableDataElements) => {
|
|
4070
4063
|
const teisRaw = response.data
|