mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
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:
@@ -4,11 +4,19 @@ import type {
|
||||
NetworkUserDetail,
|
||||
NetworkCampaignDetail,
|
||||
NetworkSearchResult,
|
||||
ScopeOptionsData,
|
||||
} from '@/types/referralNetwork';
|
||||
|
||||
export const referralNetworkApi = {
|
||||
getNetworkGraph: async (): Promise<NetworkGraphData> => {
|
||||
const response = await apiClient.get('/cabinet/admin/referral-network/');
|
||||
getScopeOptions: async (): Promise<ScopeOptionsData> => {
|
||||
const response = await apiClient.get('/cabinet/admin/referral-network/scope-options');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
getScopedGraph: async (scope: string, id: number): Promise<NetworkGraphData> => {
|
||||
const response = await apiClient.get('/cabinet/admin/referral-network/scoped', {
|
||||
params: { scope, id },
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user