-
-
Мои курсы
- {/* */}
-
-
- {courses.map((course) => (
-
history.push(getRouteCourseExercises(':id'))}
- 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.name}
-
-
{course.progress}% завершено
-
-
-
+ {/* Выводим список курсов */}
+
+ {courses.length > 0 ? (
+ courses.map(course => (
+
+
{course.title}
+
{course.desc}
+ {course.url_file_img && (
+

+ )}
- ))}
-
+ ))
+ ) : (
+ !error &&
Нет назначенных курсов
+ )}
- )
-}
-
-export default Home
+ );
+};
\ No newline at end of file
diff --git a/src/pages/Exercise.tsx b/src/pages/Exercise.tsx
index 12c44b0..b43f781 100644
--- a/src/pages/Exercise.tsx
+++ b/src/pages/Exercise.tsx
@@ -1,5 +1,5 @@
"use client"
-import type React from "react"
+
import { useState, useEffect } from "react"
import { useHistory } from "react-router-dom"
@@ -9,7 +9,19 @@ import HeaderNav from "../components/HeaderNav"
import video from "../assets/img/video.mov"
-const Exercise: React.FC = () => {
+export interface Exercise {
+ id: number;
+ title: string;
+ desc: string;
+ url_file: string;
+ url_file_img: string;
+}
+
+
+
+
+
+export const Exercise = () => {
const history = useHistory()
// const { id } = useParams<{ id: string }>()
const [isPlaying, setIsPlaying] = useState(false)
@@ -104,7 +116,7 @@ const Exercise: React.FC = () => {
- {/* Video/Image Section */}
+
@@ -129,7 +141,7 @@ const Exercise: React.FC = () => {
{isPlaying ?
:
}
- {/* Live indicators */}
+
{isPlaying && (
@@ -138,14 +150,14 @@ const Exercise: React.FC = () => {
)}
- {/* Timer Display */}
+
{formatTime(currentTime)}
{exerciseSteps.map((step, index) => (
{
)
}
-export default Exercise
+
diff --git a/ответы сервера b/ответы сервера
new file mode 100644
index 0000000..5d92415
--- /dev/null
+++ b/ответы сервера
@@ -0,0 +1,70 @@
+curl -i -X OPTIONS http://localhost:8093/auth/api/login -H "Origin: http://localhost" -H "Access-Control-Request-Method: POST"
+
+
+
+tatyana@fedora:~/Рабочий стол/RehabMobileApp/RehabMobileApp/android$ curl -i -X OPTIONS http://localhost:8093/auth/api/login -H "Origin: http://localhost" -H "Access-Control-Request-Method: POST"
+HTTP/1.1 204 No Content
+Access-Control-Allow-Credentials: true
+Access-Control-Allow-Headers: Accept-Language,Access-Control-Allow-Origin,Authorization,Content-Language,X-Csrf-Token,X-Xsrf-Token,Origin,X-Requested-With,Content-Type,Accept
+Access-Control-Allow-Methods: PUT,GET,POST,PATCH,OPTIONS,DELETE
+Access-Control-Allow-Origin: http://localhost
+Vary: Origin
+Vary: Access-Control-Request-Method
+Vary: Access-Control-Request-Headers
+Date: Fri, 22 Aug 2025 08:09:40 GMT
+
+
+tatyana@fedora:~/Рабочий стол/RehabMobileApp/RehabMobileApp/android$ curl -i -X POST http://localhost:8093/auth/api/login \
+-H "Origin: http://localhost" \
+-H "Content-Type: application/json" \
+-d '{"Email": "krasnova@mail.ru", "Password": "Tatyana1"}'
+
+
+curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8093/pacient/courses
+
+
+
+ "courses": [
+ {
+ "CreatedAt": "2025-08-19T10:50:04.454157+03:00",
+ "UpdatedAt": "2025-08-19T10:50:04.454157+03:00",
+ "DeletedAt": null,
+ "ID": 25,
+ "Name": "krasnova@mail.ru",
+ "Email": "krasnova@mail.ru",
+ "Password": "$2a$10$ryI/OSON56IlmDL0sAHhmOk9vhFkuTRieFlj32p/cKYCrPWGOJZKC",
+ "Role": "",
+ "UserDoctorID": 0,
+ "ExerciseCourses": null,
+ "Courses": [
+ {
+ "ID": 0,
+ "CreatedAt": "2025-08-15T11:46:58.879953+03:00",
+ "UpdatedAt": "2025-08-15T11:46:58.879953+03:00",
+ "DeletedAt": null,
+ "id": 1,
+ "title": "Восстановление",
+ "desc": "Восстановиться",
+ "time_course": "",
+ "day_course": 0,
+ "url_file_img": "https://vivasport.ru/assets/images/news/12555/spine-training-1.webp",
+ "users": null,
+ "exercises": null
+ }
+ ]
+ },
+ {
+ "CreatedAt": "2025-08-20T14:19:19.754239+03:00",
+ "UpdatedAt": "2025-08-20T14:19:19.754239+03:00",
+ "DeletedAt": null,
+ "ID": 26,
+ "Name": "krasnova5@mail.ru",
+ "Email": "krasnova5@mail.ru",
+ "Password": "$2a$10$sdcCn51708LV5y6wsmOho.dLtpDGf43muXobIcvGYQ1.TtB1WxFju",
+ "Role": "",
+ "UserDoctorID": 0,
+ "ExerciseCourses": null,
+ "Courses": []
+ }
+ ],
+ "sessionname": "krasnova@mail.ru"
\ No newline at end of file