Enhance timetable functionality and UI integration
ci / server (push) Failing after 3m31s
ci / client (push) Successful in 13s

- Updated protocol documentation to include new `classId` and `roomLabel` fields in the timetable API responses.
- Added classes and rooms to the timetable response structure, improving data accessibility for client applications.
- Enhanced the UI components to display timetable information, including class and room details, in the management and people panels.
- Implemented functionality to fetch and display personal timetables for individuals, ensuring a comprehensive view of schedules.
- Revised localization strings to support new timetable features and improve user experience.
- Added tests to validate the new timetable functionalities and ensure robustness in handling timetable data.
This commit is contained in:
Leonid Pershin
2026-08-19 10:45:09 +03:00
parent cad3068bac
commit d61240d5c1
20 changed files with 813 additions and 35 deletions
+7 -7
View File
@@ -12,14 +12,14 @@
## Задачи
- [ ] В дереве карты рядом с комнатой — что и у кого там сейчас: `Кабинет 204 (Математика · 5Б)`.
- [x] В дереве карты рядом с комнатой — что и у кого там сейчас: `Кабинет 204 (Математика · 5Б)`.
Свободная комната остаётся без скобок
- [ ] Панель локации: «Сейчас» — урок и класс, «Персонажи» — учитель и ученики этого класса
- [ ] В «Управлении» — расписание класса: сетка «день × урок», выбор параллели
- [ ] В карточке человека — его личное расписание, рядом с навыками и семьёй
- [ ] Правка урока из сетки: перенос и смена кабинета, видимая отметка «закреплено» и снятие
- [ ] Отказ планировщика (некуда поставить, кабинет занят) объясняется текстом, а не молчанием
- [ ] Строки через `t(...)`, обе локали
- [x] Панель локации: «Сейчас» — урок и класс, «Персонажи» — учитель и ученики этого класса
- [x] В «Управлении» — расписание класса: сетка «день × урок», выбор параллели
- [x] В карточке человека — его личное расписание, рядом с навыками и семьёй
- [x] Правка урока из сетки: перенос и смена кабинета, видимая отметка «закреплено» и снятие
- [x] Отказ планировщика (некуда поставить, кабинет занят) объясняется текстом, а не молчанием
- [x] Строки через `t(...)`, обе локали
## Критерий готовности
+1 -1
View File
@@ -67,4 +67,4 @@
| [14. Каркас дня и каникулы](14-school-calendar.md) | ✅ | Звонки, длина недели, каникулы |
| [15. Планировщик](15-timetable-planner.md) | ✅ | Раскладка часов по слотам, четыре запрета |
| [16. Расписание в школе](16-timetable-in-school.md) | ✅ | Сейв, снимок, «кто где сейчас» |
| [17. Расписание на экране](17-timetable-screen.md) | | Скобки в дереве, сетка класса, расписание учителя |
| [17. Расписание на экране](17-timetable-screen.md) | | Скобки в дереве, сетка класса, расписание учителя |
+10 -4
View File
@@ -196,7 +196,8 @@ tick with the clock. Unknown school is `404` `unknown-school`; unknown person is
Family links are other members of the same family: parents and siblings for a child, children
and partners for a parent. The client opens another card by id; this response does not nest
cards.
cards. `classId` is the homeroom class for a pupil and `null` otherwise — the personal timetable
grid fetches `GET .../timetable?classId=` with it.
```json
{
@@ -208,6 +209,7 @@ cards.
"roles": ["student"],
"classYear": 5,
"classLetter": "А",
"classId": "class-classroom-105",
"body": [{ "id": "Height", "label": "Рост", "value": "164" }],
"skills": [{ "id": "Math", "label": "Математика", "value": "62" }],
"traits": [{ "defName": "Diligent", "label": "Усидчивый" }],
@@ -334,8 +336,9 @@ assignment is `404` `unknown-assignment`.
### `GET /api/schools/{id}/timetable`
The published lesson table and uncovered hours. Optional `?classId=` or `?personId=` filter
the lessons. `?lang=ru|en` labels subjects. Reads the snapshot — it does not post to the
worker. Unknown `{id}` is `404` `unknown-school`.
the lessons. `?lang=ru|en` labels subjects and rooms. Reads the snapshot — it does not post to the
worker. Unknown `{id}` is `404` `unknown-school`. `classes` and `rooms` are the full school lists
so a picker does not need a second request.
`day` is 0 = Monday. `period` is the 1-based lesson number from the day frame.
@@ -353,6 +356,7 @@ worker. Unknown `{id}` is `404` `unknown-school`.
"teacherId": "f3.p1",
"teacherName": "Иванова Ольга Михайловна",
"roomId": "classroom-204",
"roomLabel": "Класс 204",
"day": 1,
"period": 3,
"locked": false
@@ -367,7 +371,9 @@ worker. Unknown `{id}` is `404` `unknown-school`.
"subjectLabel": "Информатика",
"hours": 1
}
]
],
"classes": [{ "id": "c5A", "year": 5, "letter": "A" }],
"rooms": [{ "id": "classroom-204", "label": "Класс 204" }]
}
```