Enhance school simulation management by introducing a new SchoolWeekDays option, allowing configuration of the number of working days in a week. Update the API to include school week days in responses and enhance documentation to reflect these changes. Revise UI components to support the new management features, ensuring a seamless user experience when hiring and assigning staff. Update localization strings for improved clarity and consistency across the application.
This commit is contained in:
@@ -26,6 +26,7 @@ public class SchoolApiTests(AppHostFixture fixture)
|
||||
// creation form would offer the wrong hour.
|
||||
Assert.Equal(DateTimeKind.Utc, state.DefaultStartDate.Kind);
|
||||
Assert.Equal(5d, state.GameMinutesPerRealSecond);
|
||||
Assert.Equal(5, state.SchoolWeekDays);
|
||||
Assert.Empty(state.Schools);
|
||||
}
|
||||
|
||||
@@ -167,6 +168,16 @@ public class SchoolApiTests(AppHostFixture fixture)
|
||||
Assert.Equal(16, classroom.DefaultSeats);
|
||||
Assert.Empty(classroom.Slots);
|
||||
Assert.Empty(classroom.Positions);
|
||||
Assert.NotNull(ru.DayFrame);
|
||||
Assert.Equal("08:30", ru.DayFrame.FirstLesson);
|
||||
Assert.Equal(7, ru.DayFrame.LessonCount);
|
||||
Assert.Equal(3, ru.DayFrame.LongBreakAfter);
|
||||
Assert.Equal("Учебный день", ru.DayFrame.Label);
|
||||
Assert.NotNull(en.DayFrame);
|
||||
Assert.Equal("School day", en.DayFrame.Label);
|
||||
Assert.Equal("GymHall", Assert.Single(ru.Subjects, subject => subject.DefName == "PhysicalEducation").Room);
|
||||
Assert.Null(Assert.Single(ru.Subjects, subject => subject.DefName == "Mathematics").Room);
|
||||
Assert.Contains(ru.Holidays, holiday => holiday.DefName == "SpringBreak");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -347,6 +358,7 @@ public class SchoolApiTests(AppHostFixture fixture)
|
||||
int MaxSchools,
|
||||
DateTime DefaultStartDate,
|
||||
double GameMinutesPerRealSecond,
|
||||
int SchoolWeekDays,
|
||||
IReadOnlyList<SchoolResponse> Schools);
|
||||
|
||||
private sealed record RandomNameResponse(string Name);
|
||||
@@ -367,6 +379,8 @@ public class SchoolApiTests(AppHostFixture fixture)
|
||||
IReadOnlyList<DefInfoResponse> Things,
|
||||
IReadOnlyList<DefInfoResponse> NameSets,
|
||||
IReadOnlyList<SubjectInfoResponse> Subjects,
|
||||
DayFrameResponse? DayFrame,
|
||||
IReadOnlyList<HolidayInfoResponse> Holidays,
|
||||
MapLayoutResponse DefaultMap);
|
||||
|
||||
private sealed record DefInfoResponse(string DefName, string Label);
|
||||
@@ -382,7 +396,19 @@ public class SchoolApiTests(AppHostFixture fixture)
|
||||
|
||||
private sealed record RoomSlotResponse(string Key, string Thing);
|
||||
|
||||
private sealed record SubjectInfoResponse(string DefName, string Label);
|
||||
private sealed record SubjectInfoResponse(string DefName, string Label, string? Room);
|
||||
|
||||
private sealed record DayFrameResponse(
|
||||
string DefName,
|
||||
string Label,
|
||||
string FirstLesson,
|
||||
int LessonCount,
|
||||
int LessonMinutes,
|
||||
int BreakMinutes,
|
||||
int LongBreakAfter,
|
||||
int LongBreakMinutes);
|
||||
|
||||
private sealed record HolidayInfoResponse(string DefName, string Label);
|
||||
|
||||
private sealed record MapLayoutResponse(TerritoryResponse? Territory);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user