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:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user