diff --git a/src/components/cards/StatCardHome.tsx b/src/components/cards/StatCardHome.tsx index fcb45fe..39dd073 100644 --- a/src/components/cards/StatCardHome.tsx +++ b/src/components/cards/StatCardHome.tsx @@ -56,8 +56,8 @@ export const StatCardHome: React.FC = ({ {/* Текст */} -
{title}
-
{subtitle}
+
{title}
+
{subtitle}
) } \ No newline at end of file diff --git a/src/pages/CourseExercises.tsx b/src/pages/CourseExercises.tsx index dc60cf6..00cd46f 100644 --- a/src/pages/CourseExercises.tsx +++ b/src/pages/CourseExercises.tsx @@ -114,7 +114,7 @@ export const CourseExercises = () => { const dayMap: { [key: number]: number } = {}; uniqueDays.forEach((day, index) => { - dayMap[day] = index + 1; // номера начинаются с 1 + dayMap[day] = index + 1; }); const daysNav = uniqueDays.map(day => dayMap[day]); @@ -152,7 +152,7 @@ export const CourseExercises = () => { onClick={() => { setSelectedDay(day); }} - className={`flex-shrink-0 p-4 py-2 rounded-full text-sm font-semibold transition-all duration-300 inline-block ${selectedDay === day + className={`flex-shrink-0 px-4 py-2 rounded-full text-xs sm:text-sm font-semibold transition-all duration-300 inline-block ${selectedDay === day ? "bg-[#2BACBE] text-white shadow-lg" : "bg-white text-gray-600 hover:bg-gray-100" }`} @@ -175,8 +175,8 @@ export const CourseExercises = () => { className="p-4 mb-4 cursor-pointer hover:scale-105 transition duration-300 glass-morphism rounded-3xl border border-white/50 shadow-2xl overflow-hidden backdrop-blur-2xl relative">
-

Упражнение {++index}

-

{item.exercise.title}

+

Упражнение {++index}

+

{item.exercise.title}

diff --git a/src/pages/Courses.tsx b/src/pages/Courses.tsx index 60ba15b..89f5d2b 100644 --- a/src/pages/Courses.tsx +++ b/src/pages/Courses.tsx @@ -34,7 +34,7 @@ interface User { const ProgressLine = () => { return (
); @@ -44,7 +44,7 @@ const AnalitcsCards = () => { return (
-
+
{/* Прогрессная часть */} @@ -169,10 +169,10 @@ export const Courses = () => { onClick={() => history.push(getRouteCourseExercises(course.ID.toString()), { course })} className="bg-white/30 backdrop-blur-2xl rounded-3xl p-6 border border-white/20 shadow-xl cursor-pointer hover:shadow-2xl transition-all duration-300 transform hover:scale-[1.02]" > -
+
{/* Изображение курса */} {course.url_file_img && ( -
+
{course.title} { }; localStorage.setItem('exerciseProgress', JSON.stringify(currentProgress)); console.log('прогресс:', currentProgress) - // или отправить на сервер + // Отправляем на сервер + connect.post(`pacient/${courseId}/${exerciseId}`, currentProgress) + console.log('Отправляемые данные:', currentProgress); + connect.post('http://localhost:8093/pacient/1/2', currentProgress) + .then((response) => { + console.log('Ответ сервера при отправке прогресса:', response.status); + // Можно добавить обработку успешного ответа + }) + .catch((error) => { + console.error('Ошибка при отправке прогресса:', error); + // Обработка ошибок + }); }; // В начале упражнения @@ -171,22 +182,6 @@ export const Exercise = () => { }; - // Функция для отправки прогресса на сервер - // const submitProgress = async () => { - // if (!courseId || !exerciseId) return - - // try { - // const timeUsers = formatTime(currentTime) // Отправляем время в формате MM:SS - - // await connect.post(`pacient/${courseId}/${exerciseId}`, { - // time_users: timeUsers, - // }) - - // console.log("Прогресс отправлен на сервер:", timeUsers) - // } catch (error) { - // console.error("Ошибка при отправке прогресса:", error) - // } - // } const formatTime = (seconds: number) => { const mins = Math.floor(seconds / 60) @@ -376,7 +371,7 @@ export const Exercise = () => { className={`flex-1 font-bold py-3 px-4 rounded-xl transition-all duration-300 transform hover:scale-105 flex items-center justify-center space-x-2 cursor-pointer ${isPlaying ? "bg-gray-400 text-white shadow-lg" - : "bg-[#2BACBE] hover:bg-[#2099A8] text-white shadow-lg" + : "bg-orange-400 hover:bg-orange-500 text-white shadow-lg" }`} > {isPlaying ? ( diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 735ef91..818986d 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -5,35 +5,35 @@ import { useHistory } from "react-router-dom"; import BottomNavigation from "../components/BottomNavigation"; import { getRouteLogin } from "../shared/consts/router"; -import manImage from "../assets/img/man.svg"; +import manImage from "../assets/img/man.svg"; const Settings: React.FC = () => { const history = useHistory() const handleLogout = () => { - localStorage.removeItem('token') - history.push(getRouteLogin()) + localStorage.removeItem('token'); + history.push(getRouteLogin()); } -const userEmail = localStorage.getItem('userEmail'); + const userEmail = localStorage.getItem('userEmail'); return (
{/* Header */} -
+
-

Настройки

-

Профиль пациента

+

профиль пациента

+

Настройки

- man - + man +
- {/* Profile Information */} +

Личная информация

@@ -53,42 +53,7 @@ const userEmail = localStorage.getItem('userEmail');
- {/* Medical Information */} - {/*
-
-

Медицинская информация

-
-
- -
-

- Повреждение передней крестообразной связки левого колена. Получена во время игры в футбол 12 февраля - 2024 года. Проведена артроскопическая операция 20 февраля 2024 года. -

-
-
-
- -
- Доктор Иванов И.И. -
-
-
- -
-
- Активная реабилитация - 75% завершено -
-
-
-
-
-
-
-
-
*/} - {/* Logout Button */} +