MEGAINFRA-WEBAPP/docs/superpowers/specs
DEls da756f5224 feat(worker-qr): real PDF + CSV batch export
Replace the off-screen CSS grid + window.print() in the worker QR
batch dialog with two on-click exports:

  - Download PDF — A4 portrait, 2x5 grid of CR80 (85x54mm) cards per
    page, brand orange header, generated with pdf-lib (dynamically
    imported, same pattern as src/lib/photo-pdf.ts).
  - Download CSV — UTF-8 BOM, columns employee_no, name, position,
    worker_type, project_code, qr_payload via Papa.unparse.

The single-card print on the worker detail page still uses
window.print() — one card has no pagination problem, only the batch
view did.

Spec §4.4 updated to match the new output mechanism and explain the
mobile failure mode that prompted the change.

New tests (8) cover the CSV builder (header order, qr_payload ==
employee_no per spec §4.1, RFC 4180 quoting, empty input) and the PDF
builder (empty input throws, valid %PDF output, 11 workers paginate
onto 2 pages, fake PNG injection so layout is testable without qrcode).
2026-09-20 20:43:10 +02:00
..
2026-08-19-po-import-queue-redesign.md docs: add PO import queue spec/plan, ignore cooler.env, rewrite n8n ingest impl 2026-08-19 22:03:39 +02:00
2026-08-19-purchase-order-upload-design.md Spec: clarify PO upload dialog does not auto-close 2026-08-19 15:03:48 +02:00
2026-08-26-needs-review-modal-compact.png docs(specs): screenshot of compact needs-review modal with working PDF 2026-08-26 23:33:33 +02:00
2026-08-26-needs-review-modal-resize-and-pdf-viewer-design.md docs(specs): fix stale URL example, 'above' wording, and add recordId notes 2026-08-26 23:34:10 +02:00
2026-08-26-pdf-url-fix-and-modal-compact-design.md docs(specs): PDF URL fix + compact needs-review modal 2026-08-26 23:20:08 +02:00
2026-08-26-purchasing-ui-tweaks-design.md docs(specs): purchasing UI tweaks — shorter upload labels, unlinked-DN styling, view PO PDF, fulfillment bug 2026-08-26 23:56:34 +02:00
2026-08-27-po-supplier-edit-and-dn-collapse-design.md docs(spec): PO detail supplier edit + DN items collapse 2026-08-27 00:49:42 +02:00
2026-08-28-fuel-attention-dismissal-design.md docs(spec): fuel attention dismissal design 2026-08-28 12:19:59 +02:00
2026-08-28-plant-hours-weekly-log-design.md docs(plant-hours): weekly log import + exception report design 2026-08-28 12:20:58 +02:00
2026-08-28-site-overhead-monthly-and-oneoff-design.md docs(spec): clarify card subtitle covers monthly + one-off 2026-08-28 12:33:53 +02:00
2026-08-30-pwa-split-icon-design.md docs(spec): MEGA Ask vs MEGA OPS PWA split-install icon design 2026-08-30 22:11:02 +02:00
2026-08-31-vehicle-unit-type-toggle-ui-design.md docs(spec): vehicle unit_type inline-edit UI (fleet + plant) 2026-08-31 12:48:57 +02:00
2026-09-11-ingestion-restructure-design.md docs(spec): add PO fulfilment model — outstanding is computed, not stored 2026-09-11 10:09:12 +02:00
2026-09-11-mega-clock-timeclock-pwa-design.md docs(clock): add design spec for standalone MEGA Clock timeclock PWA 2026-09-11 23:54:39 +02:00
2026-09-11-sidebar-restructure-design.md docs(spec): sidebar restructure — grouped nav with landing pages 2026-09-11 16:37:59 +02:00
2026-09-11-site-scope-switcher-design.md docs(site-scope): spec the global site scope switcher 2026-09-11 22:20:05 +02:00
2026-09-11-suppliers-design.md docs(spec): correct the suppliers migration's expected merge count 2026-09-11 18:02:18 +02:00
2026-09-11-workers-timesheets-qr-design.md feat(worker-qr): real PDF + CSV batch export 2026-09-20 20:43:10 +02:00
2026-09-17-delivery-note-inbox-design.md feat(dn-batches): one batch per tick by default 2026-09-17 22:54:32 +02:00
2026-09-17-dn-inbox-corrections-design.md docs(delivery-notes): spec the inbox corrections after the first real run 2026-09-17 20:41:20 +02:00
2026-09-18-hybrid-delivery-note-ingestion-design.md docs: design hybrid delivery note ingestion 2026-09-18 18:34:57 +02:00