feat: receipt PDF save and print via html2pdf.js

- Save PDF button downloads receipt directly
- Print button opens PDF in new window and triggers print dialog
- Replaces previous window.print() approach that lost styles
- Receipt generated on demand from transaction data, no file storage needed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ryan
2026-04-04 23:23:52 +00:00
parent 8820a56a51
commit 49db60e31f
5 changed files with 59 additions and 16 deletions

View File

@@ -113,14 +113,6 @@ body {
background-color: var(--muted-foreground);
}
/* Print styles — only show receipt content */
@media print {
body * { visibility: hidden; }
.print\:block, .print\:block * { visibility: visible; }
.print\:block { position: absolute; left: 0; top: 0; }
.print\:hidden { display: none !important; }
}
/* Prevent browser autofill from overriding dark theme input colors */
input:-webkit-autofill,
input:-webkit-autofill:hover,