feat: redesign referral network with scope selector

- Replace full graph with scoped view (campaign/partner/user)
- ScopeSelector component with tabs and searchable dropdown
- Store resets all state on scope change (selection, hover, filters)
- Remove dead NetworkSearch component and graphInstance globals
- i18n keys for scope selector in all 4 locales
This commit is contained in:
Fringg
2026-03-20 01:50:09 +03:00
parent 2adb0047dd
commit a6faf702ec
13 changed files with 549 additions and 288 deletions

View File

@@ -100,3 +100,31 @@ export interface NetworkFilters {
partnersOnly: boolean;
minReferrals: number;
}
export interface CampaignOption {
id: number;
name: string;
start_parameter: string;
is_active: boolean;
direct_users: number;
}
export interface PartnerOption {
id: number;
display_name: string;
username: string | null;
campaign_count: number;
}
export interface ScopeOptionsData {
campaigns: CampaignOption[];
partners: PartnerOption[];
}
export type ScopeType = 'campaign' | 'partner' | 'user';
export interface ScopeSelection {
type: ScopeType;
id: number;
label: string;
}