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
@@ -31,6 +31,9 @@ public class TimetableApiTests(AppHostFixture fixture)
Assert.Equal(7, table.LessonCount);
Assert.Contains(table.Lessons, lesson => lesson.Subject == "Mathematics" && lesson.TeacherId == teacher);
Assert.DoesNotContain(table.Uncovered, row => row.Subject == "Mathematics");
Assert.NotEmpty(table.Classes);
Assert.Contains(table.Rooms, room => room.Id == "classroom-101");
Assert.Contains(table.Lessons, lesson => lesson.RoomLabel.Length > 0);
using var unassign = await client.DeleteAsync(
$"/api/schools/{school.Id}/staff/{Uri.EscapeDataString(teacher)}/subjects/Mathematics",
@@ -184,7 +187,9 @@ public class TimetableApiTests(AppHostFixture fixture)
int WeekDays,
int LessonCount,
IReadOnlyList<LessonResponse> Lessons,
IReadOnlyList<UncoveredResponse> Uncovered);
IReadOnlyList<UncoveredResponse> Uncovered,
IReadOnlyList<ClassResponse> Classes,
IReadOnlyList<RoomResponse> Rooms);
private sealed record LessonResponse(
string ClassId,
@@ -195,10 +200,15 @@ public class TimetableApiTests(AppHostFixture fixture)
string TeacherId,
string TeacherName,
string RoomId,
string RoomLabel,
int Day,
int Period,
bool Locked);
private sealed record ClassResponse(string Id, int Year, string Letter);
private sealed record RoomResponse(string Id, string Label);
private sealed record UncoveredResponse(
string ClassId,
int ClassYear,