feat: printable receipts with barcode on payment complete

- Receipt component with thermal (80mm) and full-page layout support
- Code 128 barcode from transaction number via JsBarcode
- Store name, address, line items, totals, payment info, barcode
- Print button on sale complete screen (browser print dialog)
- Email button placeholder (disabled, ready for SMTP integration)
- @media print CSS hides everything except receipt content
- Receipt data fetched from GET /transactions/:id/receipt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ryan
2026-04-04 21:18:38 +00:00
parent 0fd73015f7
commit 3519db9bd9
5 changed files with 259 additions and 22 deletions

View File

@@ -113,6 +113,14 @@ 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,