revert: restore legacy PDF417 barcode generation implementation

Restore custom PDF417 generator, renderer, and component that were previously removed. Update all components to use the legacy Pdf417Barcode instead of Pdf417BarcodeWasm.

Restored files:
- app/lib/pdf/pdf417.ts - Custom PDF417 generator library
- app/lib/pdf/renderBarcode.ts - Canvas-based barcode renderer
- app/ui/Pdf417Barcode.tsx - React component using custom generator

Updated imports in:
- app/ui/BillEditForm.tsx
- app/ui/PrintPreview.tsx
- app/ui/ViewBillCard.tsx
- app/ui/ViewLocationCard.tsx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-21 20:52:04 +01:00
parent c22c1fb7fb
commit 1e8a817fcc
7 changed files with 1145 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ import { useRouter } from "next/navigation";
import { formatYearMonth } from "../lib/format";
import { useTranslations } from "next-intl";
import { uploadProofOfPayment } from "../lib/actions/billActions";
import { Pdf417BarcodeWasm } from "./Pdf417BarcodeWasm";
import { Pdf417Barcode } from "./Pdf417Barcode";
export interface ViewBillCardProps {
location: BillingLocation;
@@ -111,7 +111,7 @@ export const ViewBillCard: FC<ViewBillCardProps> = ({ location, bill, shareId })
hub3aText ?
<div className="form-control p-1">
<label className="label p-2 grow bg-white border border-gray-300 rounded-box justify-center">
<Pdf417BarcodeWasm hub3aText={hub3aText} />
<Pdf417Barcode hub3aText={hub3aText} />
</label>
<p className="text-xs my-1">{t.rich('barcode-disclaimer', { br: () => <br /> })}</p>
</div> : null