fix: #536 My Performance passes agentId to performance endpoint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 19:34:00 +05:30
parent c4b6f9a438
commit a1598716ee

View File

@@ -83,7 +83,9 @@ export const MyPerformancePage = () => {
useEffect(() => {
setLoading(true);
apiClient.get<PerformanceData>(`/api/ozonetel/performance?date=${selectedDate}`, { silent: true })
const agentCfg = JSON.parse(localStorage.getItem('helix_agent_config') ?? '{}');
const agentId = agentCfg.ozonetelAgentId ?? '';
apiClient.get<PerformanceData>(`/api/ozonetel/performance?date=${selectedDate}&agentId=${agentId}`, { silent: true })
.then(setData)
.catch(() => setData(null))
.finally(() => setLoading(false));