openchs-models 1.22.3 → 1.22.4
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 +6 -1
- package/package.json +1 -1
package/dist/Individual.js
CHANGED
|
@@ -292,7 +292,12 @@ class Individual extends _BaseEntity.default {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
get nameString() {
|
|
295
|
-
return this.isPerson() ?
|
|
295
|
+
return this.isPerson() ? Individual.getFullName(this) : this.firstName;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
static getFullName(obj) {
|
|
299
|
+
let name = `${obj.firstName} ${obj.middleName ? obj.middleName : ''}`.trim();
|
|
300
|
+
return `${name} ${obj.lastName ? obj.lastName : ''}`.trim();
|
|
296
301
|
} //TODO: this will be fixed later where we specify the option to create a template to display another unique field along with the name
|
|
297
302
|
|
|
298
303
|
|