Chapter officers can merge a markdown note onto filtered students, teams, or events and save the recipe. Extra student-note columns are additional fields (any ## … fields heading) so they work as print tokens whether imported or typed by hand. Co-authored-by: Cursor <cursoragent@cursor.com>
80 lines
1.8 KiB
C#
80 lines
1.8 KiB
C#
namespace Core.Printing;
|
|
|
|
/// <summary>
|
|
/// Built-in merge token names. Imported student-note field names are supplied at runtime.
|
|
/// </summary>
|
|
public static class PrintFieldCatalog
|
|
{
|
|
public static readonly string[] Layout =
|
|
[
|
|
NoteTemplateMerger.PageBreakToken,
|
|
NoteTemplateMerger.AnswerSpaceToken
|
|
];
|
|
|
|
public static readonly string[] Chapter =
|
|
[
|
|
"Chapter.Name",
|
|
"Chapter.ShortName",
|
|
"Chapter.CompetitionYear",
|
|
"Chapter.YearlyTheme",
|
|
"Chapter.StateAbbrev"
|
|
];
|
|
|
|
public static readonly string[] Student =
|
|
[
|
|
"FirstName",
|
|
"LastName",
|
|
"Name",
|
|
"LastNameFirstName",
|
|
"Grade",
|
|
"TsaYear",
|
|
"Email",
|
|
"PhoneNumber",
|
|
"StateId",
|
|
"RegionalId",
|
|
"NationalId",
|
|
"OfficerRole"
|
|
];
|
|
|
|
public static readonly string[] Team =
|
|
[
|
|
"Identifier",
|
|
"Name",
|
|
"EventName",
|
|
"EventShortName",
|
|
"EventFormat",
|
|
"TeamSize",
|
|
"Eligibility",
|
|
"Description",
|
|
"Theme"
|
|
];
|
|
|
|
public static readonly string[] Event =
|
|
[
|
|
"Name",
|
|
"ShortName",
|
|
"EventFormat",
|
|
"TeamSize",
|
|
"Eligibility",
|
|
"LevelOfEffort",
|
|
"SemifinalistActivity",
|
|
"RegionalEvent",
|
|
"Description",
|
|
"Theme",
|
|
"Documentation",
|
|
"Notes"
|
|
];
|
|
|
|
public static IReadOnlyList<string> EntityTokens(PrintEntityType entityType) =>
|
|
entityType switch
|
|
{
|
|
PrintEntityType.Student => Student,
|
|
PrintEntityType.Team => Team,
|
|
PrintEntityType.Event => Event,
|
|
_ => []
|
|
};
|
|
|
|
public static IReadOnlyList<string> BuiltInFor(PrintEntityType entityType) =>
|
|
[.. Chapter, .. EntityTokens(entityType)];
|
|
}
|