feat: add locked new-year rollover wizard for season transitions
Promote returning students, assign officers, and clear last season's data after an automatic SQLite backup, with Docker volume path docs fixed for /app/Data. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Core.Models;
|
||||
|
||||
namespace Core.YearTransition;
|
||||
|
||||
/// <summary>
|
||||
/// Resolves the graduating grade from chapter school level configuration.
|
||||
/// </summary>
|
||||
public static class GraduatingGradeResolver
|
||||
{
|
||||
/// <summary>
|
||||
/// Middle school students graduate after grade 8; high school after grade 12.
|
||||
/// Returns null when school level is unset (both / unspecified).
|
||||
/// </summary>
|
||||
public static int? FromSchoolLevel(SchoolLevel? schoolLevel) => schoolLevel switch
|
||||
{
|
||||
SchoolLevel.MiddleSchool => 8,
|
||||
SchoolLevel.HighSchool => 12,
|
||||
_ => null
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable label for wizard display.
|
||||
/// </summary>
|
||||
public static string Describe(SchoolLevel schoolLevel, int graduatingGrade) => schoolLevel switch
|
||||
{
|
||||
SchoolLevel.MiddleSchool =>
|
||||
$"Middle school chapter — students graduate after grade {graduatingGrade}",
|
||||
SchoolLevel.HighSchool =>
|
||||
$"High school chapter — students graduate after grade {graduatingGrade}",
|
||||
_ => $"Students graduate after grade {graduatingGrade}"
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user