feat: import leftover student fields into notes and show them on the roster
Store leftover CSV columns on hidden student notes, move catalog import to /events/import, and persist Students index columns from Chapter Settings. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,6 +8,7 @@ public class NoteNamingService : INoteNamingService
|
||||
{
|
||||
private const string PageNotePrefix = "#";
|
||||
private const string MeetingNotePrefix = "#Meeting Notes";
|
||||
private const string StudentNotePrefix = "#Student:";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string GetMeetingNoteTitle(DateTime meetingDate)
|
||||
@@ -47,4 +48,26 @@ public class NoteNamingService : INoteNamingService
|
||||
|
||||
return noteTitle.StartsWith(MeetingNotePrefix, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string GetStudentNoteTitle(int studentId) => $"{StudentNotePrefix}{studentId}";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsStudentNote(string? noteTitle)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(noteTitle))
|
||||
return false;
|
||||
|
||||
return noteTitle.StartsWith(StudentNotePrefix, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool TryParseStudentNoteId(string? noteTitle, out int studentId)
|
||||
{
|
||||
studentId = 0;
|
||||
if (!IsStudentNote(noteTitle))
|
||||
return false;
|
||||
|
||||
return int.TryParse(noteTitle.AsSpan(StudentNotePrefix.Length), out studentId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user