mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
fix: remove campaignUser fill color — campaign membership shown via edges
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.
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
||||
@@ -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' },
|
||||
];
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user