From c827a425ba9ebacfa30e6b4e21fa3c5b9f42a021 Mon Sep 17 00:00:00 2001 From: supertiger1234 Date: Tue, 3 Dec 2019 10:18:40 +0000 Subject: [PATCH] custom fields have been hidden in profile panel. --- .../app/Popouts/Popouts/userInformationPopout.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/app/Popouts/Popouts/userInformationPopout.vue b/src/components/app/Popouts/Popouts/userInformationPopout.vue index c9e9366..7043911 100644 --- a/src/components/app/Popouts/Popouts/userInformationPopout.vue +++ b/src/components/app/Popouts/Popouts/userInformationPopout.vue @@ -190,7 +190,16 @@ export default { arr.push(item); } } - return arr; + // remove fields that have custom names ( example: country: lol) + return arr.filter(a => { + if (a.key.toLowerCase() === "constants") {return;} + const fieldName = this.surveyItems.constants[a.key.toLowerCase()]; + if (fieldName && !this.surveyItems[fieldName].find(f => f.name === a.name )) { + return false; + } else { + return true; + } + }); }, filteredBadges() { if (!this.user.badges) return;