From 1e21cc217aa122195e46b99a928143e9bddff671 Mon Sep 17 00:00:00 2001 From: narekcat <narekcat@gmail.com> Date: Mon, 27 Jul 2020 12:12:38 +0400 Subject: [PATCH] Fix issue #85, isolate standard user attributes from company attributes. --- client/src/components/ProfileCard/helper.js | 4 +++- client/src/lib/company-attributes.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/components/ProfileCard/helper.js b/client/src/components/ProfileCard/helper.js index 9bf5a08..45d1776 100644 --- a/client/src/components/ProfileCard/helper.js +++ b/client/src/components/ProfileCard/helper.js @@ -127,7 +127,9 @@ export function getUserCompanyAttributeDetails(profile) { } attributes = profile.attributes - .filter((attribute) => !primaryAttributeIds.includes(attribute.attributeId)) + .filter( + (attribute) => !primaryAttributeIds.includes(attribute.attribute.name) + ) .map((attribute) => ({ id: attribute.attributeId, name: attribute.attribute.name, diff --git a/client/src/lib/company-attributes.js b/client/src/lib/company-attributes.js index 608b6f1..7abfb00 100644 --- a/client/src/lib/company-attributes.js +++ b/client/src/lib/company-attributes.js @@ -72,7 +72,7 @@ export async function getCompanyAttributes(apiClient, cancelToken) { // Finally, we only need the company attributes attributes = attributes.filter((attribute) => { - if (primaryAttributeIds.includes(attribute.id)) { + if (primaryAttributeIds.includes(attribute.name)) { return false; }