feat: add CSV import for student event rankings

Let advisors load preference ranks from a converted CSV with fuzzy matching, known aliases, and a parse-preview-save page instead of relying on the ranking editor.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-28 23:41:13 -04:00
co-authored by Cursor
parent 2acd83a841
commit 4c91db37c2
13 changed files with 1156 additions and 59 deletions
@@ -0,0 +1,34 @@
using Core.Models;
namespace WebApp.Services;
/// <summary>
/// Persists parsed student event rankings.
/// </summary>
public interface IStudentEventRankingSaveService
{
/// <summary>
/// Students in the parse result who already have rankings stored.
/// </summary>
Task<IReadOnlyList<string>> GetStudentsWithExistingRankingsAsync(
StudentEventRankingParseResult parseResult,
CancellationToken cancellationToken = default);
/// <summary>
/// Replaces rankings for students who have at least one accepted rank in the parse result.
/// Other students are left unchanged.
/// </summary>
Task<StudentEventRankingSaveResult> SaveAsync(
StudentEventRankingParseResult parseResult,
CancellationToken cancellationToken = default);
}
/// <summary>
/// Outcome of saving imported event rankings.
/// </summary>
public class StudentEventRankingSaveResult
{
public int StudentsUpdated { get; set; }
public int RankingsSaved { get; set; }
}