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>
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
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}"
|
|
};
|
|
}
|