custom fields have been hidden in profile panel.

This commit is contained in:
supertiger1234 2019-12-03 10:18:40 +00:00
parent d8df2d6671
commit c827a425ba

View file

@ -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;