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:
@@ -0,0 +1,22 @@
|
||||
using Core.Entities;
|
||||
using Core.Models;
|
||||
using Core.Parsers;
|
||||
|
||||
namespace Core.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Wraps <see cref="StudentNotesFieldParser"/> for stream-based import.
|
||||
/// </summary>
|
||||
public class StudentNotesImportService : IStudentNotesImportService
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public StudentNotesImportResult Parse(
|
||||
Stream stream,
|
||||
ICollection<Student> students,
|
||||
IReadOnlyDictionary<int, string?> existingNotesByStudentId)
|
||||
{
|
||||
var reader = new StreamReader(stream, leaveOpen: true);
|
||||
using var parser = new StudentNotesFieldParser(reader);
|
||||
return parser.Parse(students, existingNotesByStudentId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user