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
+8 -1
View File
@@ -23,7 +23,14 @@ public static class FuzzyStudentMatcher
public static int Score(Student student, string name)
{
var candidates = new[] { student.Name, student.FirstNameLastName, student.LastNameFirstName };
var candidates = new[]
{
student.Name,
student.FirstNameLastName,
student.LastNameFirstName,
student.DisplayFirstName,
student.Nickname
}.Where(c => !string.IsNullOrWhiteSpace(c));
return candidates.Max(candidate => Math.Max(Fuzz.Ratio(candidate, name), Fuzz.TokenSetRatio(candidate, name)));
}
}