Skip to content
Snippets Groups Projects
Commit eec9dcf6 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

person-select: remove one more usage of the Person:name attribute

port to firstName/familyName
parent bbc376d5
No related branches found
No related tags found
No related merge requests found
Pipeline #58231 passed
...@@ -17,7 +17,8 @@ import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element"; ...@@ -17,7 +17,8 @@ import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element";
const personContext = { const personContext = {
"@id": "@id", "@id": "@id",
"name": "http://schema.org/name", "givenName": "http://schema.org/givenName",
"familyName": "http://schema.org/familyName",
"email": "http://schema.org/email" "email": "http://schema.org/email"
}; };
...@@ -265,7 +266,10 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) { ...@@ -265,7 +266,10 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) {
} }
generateOptionText(person) { generateOptionText(person) {
let text = person["name"]; let text = person["givenName"] ?? '';
if (person["familyName"]) {
text += ` ${person["familyName"]}`;
}
// add birth date to name if present // add birth date to name if present
if (this.showDetails && (person["email"] !== undefined) && (person["email"] !== null)) { if (this.showDetails && (person["email"] !== undefined) && (person["email"] !== null)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment