Enhance staffing management with uncovered teacher tracking
- Updated `protocol.md` to clarify the concept of uncovered subjects and the number of additional teachers required. - Introduced `teachersShort` property in the `StaffingSubject` interface to indicate how many more teachers are needed for a subject. - Enhanced localization strings to reflect the new uncovered teacher information in both English and Russian. - Updated the management panel UI to display the number of teachers short for each uncovered subject. - Revised the `Uncovered` method in the staffing logic to return detailed information about uncovered subjects, including the shortfall of teachers. - Added tests to validate the new uncovered teacher tracking functionality and ensure accurate reporting in the staffing API. - Marked related tasks as complete in the documentation for the golden fixtures phase.
This commit is contained in:
@@ -32,7 +32,8 @@ public class StaffingApiTests(AppHostFixture fixture)
|
||||
Assert.Equal(32, staffing.Applicants.Count);
|
||||
Assert.Empty(staffing.Staff);
|
||||
Assert.Contains(staffing.Uncovered, subject => subject.DefName == "Mathematics");
|
||||
Assert.Contains(staffing.Uncovered, subject => subject.DefName == "PrimarySchool");
|
||||
var primary = Assert.Single(staffing.Uncovered, subject => subject.DefName == "PrimarySchool");
|
||||
Assert.Equal(3, primary.TeachersShort);
|
||||
Assert.NotEmpty(staffing.Positions);
|
||||
Assert.Contains(staffing.Positions, position => position.DefName == "Teacher");
|
||||
Assert.Contains(staffing.Subjects, subject => subject.DefName == "Mathematics");
|
||||
@@ -331,7 +332,7 @@ public class StaffingApiTests(AppHostFixture fixture)
|
||||
IReadOnlyList<DefLabelResponse> Positions,
|
||||
IReadOnlyList<UncoveredSubjectResponse> Subjects);
|
||||
|
||||
private sealed record UncoveredSubjectResponse(string DefName, string Label, int GradeMin, int GradeMax, int HoursPerWeek);
|
||||
private sealed record UncoveredSubjectResponse(string DefName, string Label, int GradeMin, int GradeMax, int HoursPerWeek, int TeachersShort);
|
||||
|
||||
private sealed record ApplicantResponse(
|
||||
string Id,
|
||||
|
||||
Reference in New Issue
Block a user