mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
fix: fallback to referral role fill color when subscription_status is null
When subscription_status is not available (backend not deployed or user has no subscription), fill color now falls through to referral role (partner/topReferrer/activeReferrer) before defaulting to campaign/regular. Increases border size from 0.25 to 0.35 and merges legend sections.
This commit is contained in:
@@ -154,7 +154,12 @@ function buildFullGraph(graphData: NetworkGraphData): Graph {
|
||||
});
|
||||
|
||||
graphData.users.forEach((user) => {
|
||||
const fillColor = getNodeFillColor(user.subscription_status, user.campaign_id);
|
||||
const fillColor = getNodeFillColor(
|
||||
user.subscription_status,
|
||||
user.campaign_id,
|
||||
user.direct_referrals,
|
||||
user.is_partner,
|
||||
);
|
||||
const borderColor = getNodeBorderColor(user.direct_referrals, user.is_partner);
|
||||
const size = getUserNodeSize(user.direct_referrals);
|
||||
const pos = positions.get(`user_${user.id}`) ?? {
|
||||
@@ -176,7 +181,7 @@ function buildFullGraph(graphData: NetworkGraphData): Graph {
|
||||
campaignId: user.campaign_id,
|
||||
subscriptionStatus: user.subscription_status,
|
||||
borderColor: borderColor ?? fillColor,
|
||||
borderSize: borderColor ? 0.25 : 0,
|
||||
borderSize: borderColor ? 0.35 : 0,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user