From d047df42c5d93f17ae033511548be65db805037a Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 5 Oct 2021 11:55:50 +0200
Subject: [PATCH] person-profile: remove telephone and role display

This is the only place this information is used and we want to
clean up the API. Since this is more of a demo component and not
activitely used anywhere anymore just remove it.
---
 packages/person-profile/src/i18n/de/translation.json |  7 +------
 packages/person-profile/src/i18n/en/translation.json |  7 +------
 packages/person-profile/src/person-profile.js        | 11 -----------
 3 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/packages/person-profile/src/i18n/de/translation.json b/packages/person-profile/src/i18n/de/translation.json
index e468f012..71b2d6ed 100644
--- a/packages/person-profile/src/i18n/de/translation.json
+++ b/packages/person-profile/src/i18n/de/translation.json
@@ -4,11 +4,6 @@
     "given-name": "Vorname",
     "family-name": "Nachname",
     "email": "Email",
-    "telephone": "Telefon",
-    "role": "Rolle",
-    "none-selected": "Keine Person ausgewählt",
-    "staff": "Mitarbeiter/in",
-    "alumni": "Absolvent/in",
-    "unknown": "unbekannt"
+    "none-selected": "Keine Person ausgewählt"
   }
 }
diff --git a/packages/person-profile/src/i18n/en/translation.json b/packages/person-profile/src/i18n/en/translation.json
index b4cc34a2..372e344f 100644
--- a/packages/person-profile/src/i18n/en/translation.json
+++ b/packages/person-profile/src/i18n/en/translation.json
@@ -4,11 +4,6 @@
     "given-name": "Given name",
     "family-name": "Family name",
     "email": "Email",
-    "telephone": "Telephone",
-    "role": "Role",
-    "none-selected": "No person selected",
-    "staff": "staff",
-    "alumni": "alumni",
-    "unknown": "unknown"
+    "none-selected": "No person selected"
   }
 }
diff --git a/packages/person-profile/src/person-profile.js b/packages/person-profile/src/person-profile.js
index 4ac5576b..46b0455a 100644
--- a/packages/person-profile/src/person-profile.js
+++ b/packages/person-profile/src/person-profile.js
@@ -78,15 +78,6 @@ export class PersonProfile extends DBPLitElement {
 
     render() {
         const i18n = this._i18n;
-        let role = i18n.t('person-profile.unknown');
-        if (this.person !== null && this.person.roles !== undefined) {
-            // roles are only defined for self-disclosure
-            if (this.person.roles.indexOf('ROLE_STAFF') > -1) {
-                role = i18n.t('person-profile.staff');
-            } else if (this.person.roles.indexOf('ROLE_ALUMNI') > -1) {
-                role = i18n.t('person-profile.alumni');
-            }
-        }
 
         return html`
             <style>
@@ -105,8 +96,6 @@ export class PersonProfile extends DBPLitElement {
                 <tr><td class="td-profile">${i18n.t('person-profile.given-name')}</td><td>${this.person.givenName}</td></tr>
                 <tr><td class="td-profile">${i18n.t('person-profile.family-name')}</td><td>${this.person.familyName}</td></tr>
                 <tr><td class="td-profile">${i18n.t('person-profile.email')}</td><td>${this.person.email}</td></tr>
-                <tr><td class="td-profile">${i18n.t('person-profile.telephone')}</td><td>${this.person.telephone}</td></tr>
-                <tr><td class="td-profile">${i18n.t('person-profile.role')}</td><td>${role}</td></tr>
             </tbody>
             <tfoot></tfoot>
             </table>` : i18n.t('person-profile.none-selected') }
-- 
GitLab