diff --git a/VERSION b/VERSION index 203e6d5..d20cc2b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.8.9 +3.8.10 diff --git a/play-life-web/src/App.jsx b/play-life-web/src/App.jsx index 171940e..f78c5af 100644 --- a/play-life-web/src/App.jsx +++ b/play-life-web/src/App.jsx @@ -99,6 +99,7 @@ function AppContent() { const [currentWeekError, setCurrentWeekError] = useState(null) const [fullStatisticsError, setFullStatisticsError] = useState(null) const [prioritiesError, setPrioritiesError] = useState(null) + const [tasksError, setTasksError] = useState(null) // Состояние для кнопки Refresh (если она есть) const [isRefreshing, setIsRefreshing] = useState(false) @@ -344,6 +345,7 @@ function AppContent() { } else { setTasksLoading(true) } + setTasksError(null) const response = await authFetch('/api/tasks') if (!response.ok) { throw new Error('Ошибка загрузки данных') @@ -352,6 +354,7 @@ function AppContent() { setTasksData(jsonData) } catch (err) { console.error('Ошибка загрузки списка задач:', err) + setTasksError(err.message || 'Ошибка загрузки данных') } finally { if (isBackground) { setTasksBackgroundLoading(false) @@ -834,6 +837,8 @@ function AppContent() { data={tasksData} loading={tasksLoading} backgroundLoading={tasksBackgroundLoading} + error={tasksError} + onRetry={() => fetchTasksData(false)} onRefresh={(isBackground = false) => fetchTasksData(isBackground)} /> diff --git a/play-life-web/src/components/CurrentWeek.jsx b/play-life-web/src/components/CurrentWeek.jsx index c1a5d89..db2411a 100644 --- a/play-life-web/src/components/CurrentWeek.jsx +++ b/play-life-web/src/components/CurrentWeek.jsx @@ -1,4 +1,5 @@ import ProjectProgressBar from './ProjectProgressBar' +import LoadingError from './LoadingError' import { getAllProjectsSorted, getProjectColor } from '../utils/projectUtils' function CurrentWeek({ onProjectClick, data, loading, error, onRetry, allProjectsData, onNavigate }) { @@ -18,20 +19,7 @@ function CurrentWeek({ onProjectClick, data, loading, error, onRetry, allProject } if (error && (!data || projectsData.length === 0)) { - return ( -