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,48 @@
|
||||
using Core.Entities;
|
||||
using Core.Notes;
|
||||
|
||||
namespace Core.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Result of parsing a student notes field CSV.
|
||||
/// </summary>
|
||||
public class StudentNotesImportResult
|
||||
{
|
||||
public List<StudentNotesImportMatch> Matches { get; set; } = [];
|
||||
|
||||
public List<StudentNotesImportIssue> Issues { get; set; } = [];
|
||||
|
||||
public List<string> Errors { get; set; } = [];
|
||||
|
||||
public List<string> Warnings { get; set; } = [];
|
||||
|
||||
public IReadOnlyList<string> FieldNames { get; set; } = [];
|
||||
|
||||
public bool IsSuccess => Errors.Count == 0;
|
||||
|
||||
public int StudentsWithChanges => Matches.Count(m => m.Merge.Changed);
|
||||
}
|
||||
|
||||
public class StudentNotesImportMatch
|
||||
{
|
||||
public required Student Student { get; set; }
|
||||
|
||||
public string RawStudentName { get; set; } = string.Empty;
|
||||
|
||||
public int RowNumber { get; set; }
|
||||
|
||||
public int StudentScore { get; set; }
|
||||
|
||||
public List<ImportedField> IncomingFields { get; set; } = [];
|
||||
|
||||
public required ImportedFieldsMergeResult Merge { get; set; }
|
||||
}
|
||||
|
||||
public class StudentNotesImportIssue
|
||||
{
|
||||
public int RowNumber { get; set; }
|
||||
|
||||
public string RawStudentName { get; set; } = string.Empty;
|
||||
|
||||
public string Message { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user