From 2229eeecb089a869483f2dbeb30f8817f434930d Mon Sep 17 00:00:00 2001 From: Fringg Date: Sun, 22 Mar 2026 10:13:56 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20campaignUser=20fill=20color=20?= =?UTF-8?q?=E2=80=94=20campaign=20membership=20shown=20via=20edges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Campaign users no longer get a separate amber fill color. Their campaign association is already visible through the edge connecting them to the campaign node. Users from campaigns now show their subscription status color (or regular gray if no subscription), reducing visual noise. --- src/pages/ReferralNetwork/components/NetworkGraph.tsx | 1 - src/pages/ReferralNetwork/components/NetworkLegend.tsx | 1 - src/pages/ReferralNetwork/utils.ts | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/ReferralNetwork/components/NetworkGraph.tsx b/src/pages/ReferralNetwork/components/NetworkGraph.tsx index 7a5034b..1648d67 100644 --- a/src/pages/ReferralNetwork/components/NetworkGraph.tsx +++ b/src/pages/ReferralNetwork/components/NetworkGraph.tsx @@ -166,7 +166,6 @@ function buildFullGraph(graphData: NetworkGraphData): Graph { graphData.users.forEach((user) => { const fillColor = getNodeFillColor( user.subscription_status, - user.campaign_id, user.direct_referrals, user.is_partner, ); diff --git a/src/pages/ReferralNetwork/components/NetworkLegend.tsx b/src/pages/ReferralNetwork/components/NetworkLegend.tsx index 11ed00c..b6f837d 100644 --- a/src/pages/ReferralNetwork/components/NetworkLegend.tsx +++ b/src/pages/ReferralNetwork/components/NetworkLegend.tsx @@ -15,7 +15,6 @@ const FILL_ITEMS = [ { color: NODE_COLORS.partner, labelKey: 'admin.referralNetwork.legend.partner' }, { color: NODE_COLORS.topReferrer, labelKey: 'admin.referralNetwork.legend.topReferrer' }, { color: NODE_COLORS.activeReferrer, labelKey: 'admin.referralNetwork.legend.activeReferrer' }, - { color: NODE_COLORS.campaignUser, labelKey: 'admin.referralNetwork.legend.campaignUser' }, { color: NODE_COLORS.regular, labelKey: 'admin.referralNetwork.legend.regularUser' }, ]; diff --git a/src/pages/ReferralNetwork/utils.ts b/src/pages/ReferralNetwork/utils.ts index 3d4b9d2..c7b5e1d 100644 --- a/src/pages/ReferralNetwork/utils.ts +++ b/src/pages/ReferralNetwork/utils.ts @@ -40,11 +40,10 @@ export function getSubscriptionStatusColor(status: SubscriptionStatus): string { * Fill color priority: * 1. Subscription status (when available) * 2. Referral role (when no subscription data — keeps visual differentiation) - * 3. Campaign user / regular fallback + * 3. Regular fallback (campaign membership visible via edges, not fill) */ export function getNodeFillColor( subscriptionStatus: SubscriptionStatus | null, - campaignId: number | null, directReferrals: number = 0, isPartner: boolean = false, ): string { @@ -52,7 +51,6 @@ export function getNodeFillColor( if (isPartner) return NODE_COLORS.partner; if (directReferrals >= 10) return NODE_COLORS.topReferrer; if (directReferrals >= 1) return NODE_COLORS.activeReferrer; - if (campaignId !== null) return NODE_COLORS.campaignUser; return NODE_COLORS.regular; }