openchs-models 1.30.46 → 1.30.47
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/dist/Individual.js +7 -10
- package/package.json +1 -1
package/dist/Individual.js
CHANGED
|
@@ -806,19 +806,16 @@ class Individual extends _BaseEntity.default {
|
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
subjectAddressText(i18n) {
|
|
809
|
-
|
|
809
|
+
if (!_lodash.default.isNil(this.lowestAddressLevel)) {
|
|
810
|
+
let addressText = i18n.t(this.lowestAddressLevel.name);
|
|
810
811
|
|
|
811
|
-
|
|
812
|
-
if (!_lodash.default.isNil(parentAddress)) addressText += ', ' + i18n.t(parentAddress);
|
|
813
|
-
return addressText;
|
|
814
|
-
}
|
|
812
|
+
const parentAddress = _lodash.default.get(this, 'lowestAddressLevel.locationMappings[0].parent.name');
|
|
815
813
|
|
|
816
|
-
|
|
817
|
-
|
|
814
|
+
if (!_lodash.default.isNil(parentAddress)) addressText += ', ' + i18n.t(parentAddress);
|
|
815
|
+
return addressText;
|
|
816
|
+
}
|
|
818
817
|
|
|
819
|
-
|
|
820
|
-
if (!_lodash.default.isNil(parentAddress)) addressText += ', ' + i18n.t(parentAddress);
|
|
821
|
-
return addressText;
|
|
818
|
+
return '';
|
|
822
819
|
} //TODO these methods are slightly differece because of differece in UI on search result and my dashboard listing. Not taking the hit right now.
|
|
823
820
|
|
|
824
821
|
|