From 49f5a3b462dbc72b06ebcdc95b8272d93a92c4e1 Mon Sep 17 00:00:00 2001 From: MoonTestUse1 Date: Wed, 1 Jan 2025 21:01:05 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=87=D0=B8=D0=BD=D0=BA=D0=B0=20ad?= =?UTF-8?q?m4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/admin/DashboardView.vue | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/frontend/src/views/admin/DashboardView.vue b/frontend/src/views/admin/DashboardView.vue index 7d140c9..8f8765d 100644 --- a/frontend/src/views/admin/DashboardView.vue +++ b/frontend/src/views/admin/DashboardView.vue @@ -63,21 +63,6 @@ const formatDate = (date: string) => { return new Date(date).toLocaleString('ru-RU'); }; -const fetchStatistics = async () => { - try { - const response = await fetch('/api/admin/statistics?period=week'); - if (!response.ok) throw new Error('Failed to fetch statistics'); - const data = await response.json(); - statistics.value = [ - { period: 'total', label: 'Всего заявок', value: data.totalRequests }, - { period: 'resolved', label: 'Решено', value: data.resolvedRequests }, - { period: 'avgTime', label: 'Среднее время', value: data.averageResolutionTime } - ]; - } catch (error) { - console.error('Error fetching statistics:', error); - } -}; - const fetchRequests = async () => { try { const response = await fetch('/api/admin/requests'); @@ -89,7 +74,6 @@ const fetchRequests = async () => { }; onMounted(() => { - fetchStatistics(); fetchRequests(); }); \ No newline at end of file