1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Починка adm4

This commit is contained in:
MoonTestUse1
2025-01-01 21:01:05 +06:00
parent 1e459fe196
commit 49f5a3b462

View File

@@ -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();
});
</script>