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:
@@ -10,7 +10,7 @@ import { formatYearMonth } from "../lib/format";
|
||||
import { DecodeResult, findDecodePdf417 } from "../lib/pdf/barcodeDecoderWasm";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
import { InfoBox } from "./InfoBox";
|
||||
import { Pdf417BarcodeWasm } from "./Pdf417BarcodeWasm";
|
||||
import { Pdf417Barcode } from "./Pdf417Barcode";
|
||||
|
||||
// Next.js does not encode an utf-8 file name correctly when sending a form with a file attachment
|
||||
// This is a workaround for that
|
||||
@@ -203,7 +203,7 @@ export const BillEditForm: FC<BillEditFormProps> = ({ location, bill }) => {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user