feat: add a Tools page printer for note merge and print presets
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>
This commit is contained in:
@@ -47,6 +47,34 @@ public class ImportedFieldsTable_Tests
|
||||
Assert.That(fields.Single(f => f.Name == "Application").Value, Is.EqualTo("Yes"));
|
||||
Assert.That(fields.Single(f => f.Name == "Teacher Rec 1").Value, Is.EqualTo("Fuqua"));
|
||||
Assert.That(result.Markdown, Does.Contain("Freeform note"));
|
||||
Assert.That(result.Markdown, Does.Contain(ImportedFieldsTable.Heading));
|
||||
Assert.That(result.Markdown, Does.Not.Contain("## Imported fields"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ParseFields_ReadsAnyFieldsHeading()
|
||||
{
|
||||
foreach (var heading in new[] { "## Additional fields", "## Imported fields", "## Extra fields" })
|
||||
{
|
||||
var markdown = $"""
|
||||
{heading}
|
||||
|
||||
| Field | Value |
|
||||
| --- | --- |
|
||||
| Allergies | peanuts |
|
||||
""";
|
||||
|
||||
Assert.That(ImportedFieldsTable.GetFieldValue(markdown, "Allergies"), Is.EqualTo("peanuts"), heading);
|
||||
}
|
||||
|
||||
var otherHeading = """
|
||||
## Advisor comments
|
||||
|
||||
| Field | Value |
|
||||
| --- | --- |
|
||||
| Allergies | peanuts |
|
||||
""";
|
||||
Assert.That(ImportedFieldsTable.GetFieldValue(otherHeading, "Allergies"), Is.Null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user