Add printable report cards, progress reports and invoices

Three documents, all print-styled rather than generated server-side: no
PDF dependency is added, and "Save as PDF" in the browser produces the
file. @media print in styles.css strips the app chrome (.no-print) and
breaks each student onto its own sheet (.print-page).

- Report card: weighted category breakdown, overall percent and letter
  from the existing gradebook config, plus an attendance summary.
- Academic progress report: the same, plus assignment-level detail —
  a mid-term report is only actionable with the underlying work listed.
- 504 / IEP progress report: each goal's baseline, target, status and
  progress entries within the period, for the quarterly report IDEA
  requires. RLS keeps it to the case manager, admins and parents.
- Invoice, reachable per student from the tuition ledger: opening
  balance carried forward, itemised activity, and balance due.

Grade maths is reused from lib/grades and the class grading config from
useEffectiveConfig, so report cards cannot drift from the gradebook.

The "Email to parents" button opens a prefilled mailto: draft — the same
mechanism the intake-link share already uses. It gathers addresses from
intake guardians and linked parent accounts. mailto cannot attach a file,
so the itemisation goes in the body as text; sending a real attachment
would need a transactional email provider and an API key.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 09:45:46 -04:00
co-authored by Claude Opus 5
parent 85d87d1c62
commit 9360bf3055
8 changed files with 1145 additions and 14 deletions
+47
View File
@@ -142,3 +142,50 @@
color: var(--color-foreground);
}
}
/* ── Print: report cards, progress reports, invoices ────────────────────────
Documents are ordinary pages on screen; @media print strips the app chrome
so what lands on paper (or in "Save as PDF") is just the document. Mark app
furniture with .no-print, and wrap each student's document in .print-page so
a batch of report cards breaks one-per-sheet. */
@page {
margin: 14mm;
}
@media print {
.no-print {
display: none !important;
}
html,
body {
background: #fff !important;
}
/* The authenticated layout scrolls <main>; printing needs it to overflow. */
main {
overflow: visible !important;
}
.print-doc {
border: 0 !important;
box-shadow: none !important;
padding: 0 !important;
max-width: none !important;
}
.print-page + .print-page {
break-before: page;
}
tr,
td,
th {
break-inside: avoid;
}
a {
color: inherit;
text-decoration: none;
}
}