feat: add optional student nickname for informal display

Keep legal first and last names for formal lists; show DisplayFirstName on teams, calendars, and import matching so two Josiahs can be told apart.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-12 00:06:33 -04:00
co-authored by Cursor
parent c03ffc0833
commit 29101e2ead
35 changed files with 516 additions and 41 deletions
+7 -1
View File
@@ -56,6 +56,10 @@ namespace Core.Parsers
{
}
public TeamParser(StreamReader reader, bool ignoreBlankLines = true) : base(reader, ignoreBlankLines)
{
}
public Team[] Parse(ICollection<EventDefinition> events, ICollection<Student> students)
{
var teams = new List<Team>();
@@ -118,7 +122,9 @@ namespace Core.Parsers
{
Fuzz.Ratio(s.Name, studentName),
Fuzz.Ratio(s.FirstNameLastName, studentName),
Fuzz.Ratio(s.FirstName, studentName)
Fuzz.Ratio(s.FirstName, studentName),
Fuzz.Ratio(s.DisplayFirstName, studentName),
string.IsNullOrWhiteSpace(s.Nickname) ? 0 : Fuzz.Ratio(s.Nickname, studentName)
}.Max()
where rat > 90
orderby rat descending