@iapps/ng-dhis2-ui 1.2.115 → 1.2.116
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.
|
@@ -8542,8 +8542,8 @@ class ProgramEntryFormMetaData {
|
|
|
8542
8542
|
this.program = program;
|
|
8543
8543
|
if (this.config?.formFieldExtensions &&
|
|
8544
8544
|
this.config.formFieldExtensions.length > 0 &&
|
|
8545
|
-
this.config.formFieldExtensions[0]?.
|
|
8546
|
-
const orgUnitResponse = await this.d2.httpInstance.get(`organisationUnits.json?fields=id,name,code&paging=false&filter=organisationUnitGroups.code:eq:${this.config.formFieldExtensions[0].
|
|
8545
|
+
this.config.formFieldExtensions[0]?.optionsSourceCode) {
|
|
8546
|
+
const orgUnitResponse = await this.d2.httpInstance.get(`organisationUnits.json?fields=id,name,code&paging=false&filter=organisationUnitGroups.code:eq:${this.config.formFieldExtensions[0].optionsSourceCode}`);
|
|
8547
8547
|
const orgUnitsResponse = orgUnitResponse?.data?.['organisationUnits'];
|
|
8548
8548
|
const organisationUnits = Array.isArray(orgUnitsResponse) ? orgUnitsResponse : [];
|
|
8549
8549
|
this.config.formFieldExtensions[0].organisationUnits = organisationUnits;
|