Enhance event occurrence parsing with school level filtering

This commit introduces a new SchoolLevel enum and updates the EventOccurrenceParser to filter event occurrences based on the specified school level (Middle School or High School). The EventOccurrenceParseResult and EventOccurrenceParserResult classes have been updated to track skipped section headers and counts for both school levels. Additionally, the EventOccurrenceParserService has been modified to read the school level from configuration, and the UI has been updated to allow users to select the school level for event imports. This enhancement improves the accuracy of event parsing and provides better user feedback on skipped occurrences.
This commit is contained in:
2026-01-09 09:39:00 -05:00
parent ea1a4a04ad
commit 8183c0200d
7 changed files with 270 additions and 27 deletions
+17 -1
View File
@@ -32,10 +32,26 @@ public class EventOccurrenceParseResult
/// <summary>
/// List of high school (HS) section headers that were encountered but skipped
/// because they don't match any event definition in the system.
/// because they don't match the chapter's school level setting.
/// </summary>
public List<string> SkippedHSSectionHeaders { get; set; } = new();
/// <summary>
/// List of middle school (MS) section headers that were encountered but skipped
/// because they don't match the chapter's school level setting.
/// </summary>
public List<string> SkippedMSSectionHeaders { get; set; } = new();
/// <summary>
/// Number of Middle School (MS) event occurrences that were skipped due to school level filtering.
/// </summary>
public int SkippedMSEventCount { get; set; }
/// <summary>
/// Number of High School (HS) event occurrences that were skipped due to school level filtering.
/// </summary>
public int SkippedHSEventCount { get; set; }
/// <summary>
/// Total number of event occurrences successfully parsed.
/// </summary>
+18
View File
@@ -0,0 +1,18 @@
namespace Core.Models;
/// <summary>
/// School level for filtering event occurrences.
/// </summary>
public enum SchoolLevel
{
/// <summary>
/// Middle School level
/// </summary>
MiddleSchool,
/// <summary>
/// High School level
/// </summary>
HighSchool
}