diff --git a/dashboard/src/components/dashboard/GorgiasOverview.jsx b/dashboard/src/components/dashboard/GorgiasOverview.jsx index 99c2ade..482b193 100644 --- a/dashboard/src/components/dashboard/GorgiasOverview.jsx +++ b/dashboard/src/components/dashboard/GorgiasOverview.jsx @@ -28,7 +28,6 @@ import { Zap, Timer, BarChart3, - Bot, ClipboardCheck, } from "lucide-react"; import axios from "axios"; @@ -214,7 +213,7 @@ const GorgiasOverview = () => { const filters = getDateRange(timeRange); try { - const [overview, channelStats, agentStats, satisfaction, selfService] = + const [overview, channelStats, agentStats, satisfaction] = await Promise.all([ axios.post('/api/gorgias/stats/overview', filters) .then(res => res.data?.data?.data?.data || []), @@ -224,8 +223,6 @@ const GorgiasOverview = () => { .then(res => res.data?.data?.data?.data?.lines || []), axios.post('/api/gorgias/stats/satisfaction-surveys', filters) .then(res => res.data?.data?.data?.data || []), - axios.post('/api/gorgias/stats/self-service-overview', filters) - .then(res => res.data?.data?.data?.data || []), ]); console.log('Raw API responses:', { @@ -233,7 +230,6 @@ const GorgiasOverview = () => { channelStats, agentStats, satisfaction, - selfService }); setData({ @@ -241,7 +237,6 @@ const GorgiasOverview = () => { channels: channelStats, agents: agentStats, satisfaction, - selfService, }); setError(null); @@ -292,19 +287,6 @@ const GorgiasOverview = () => { console.log('Processed satisfaction stats:', satisfactionStats); - // Process self-service data - const selfServiceStats = (data.selfService || []).reduce((acc, item) => { - acc[item.name] = { - value: item.value || 0, - delta: item.delta || 0, - type: item.type, - more_is_better: item.more_is_better - }; - return acc; - }, {}); - - console.log('Processed self-service stats:', selfServiceStats); - // Process channel data const channels = data.channels?.map(line => ({ name: line[0]?.value || '', @@ -377,7 +359,7 @@ const GorgiasOverview = () => {
{/* Message & Response Metrics */} {loading ? ( - [...Array(8)].map((_, i) => ( + [...Array(7)].map((_, i) => ( )) ) : ( @@ -457,17 +439,6 @@ const GorgiasOverview = () => { loading={loading} />
-
- -
)}