feat: local ZXing, Register New Asset, OCR serial search #68

Open
opened 2026-06-02 23:09:27 +00:00 by shawn · 0 comments
Owner

Changes (commit b8ea737)

1. Barcode scanner now works without CDN

  • ZXing library downloaded to static/zxing.min.js (local first)
  • Falls back to CDN if local fails
  • No more CDN dependency for scanning to work

2. Register New Asset button

  • Scan result shows Register button
  • Prompts for asset name -> creates via POST /api/assets
  • Works in both Barcode mode (asset found or not found) and OCR mode

3. OCR serial number search

  • When OCR extracted machine_id is not found, auto-trys all 4+ digit numbers from OCR text as serial searches
  • Shows result when match is found via serial
  • Also adds Register button on OCR not-found result
### Changes (commit b8ea737) **1. Barcode scanner now works without CDN** - ZXing library downloaded to `static/zxing.min.js` (local first) - Falls back to CDN if local fails - No more CDN dependency for scanning to work **2. Register New Asset button** - Scan result shows ➕ **Register** button - Prompts for asset name -> creates via POST /api/assets - Works in both Barcode mode (asset found or not found) and OCR mode **3. OCR serial number search** - When OCR extracted machine_id is not found, auto-trys all 4+ digit numbers from OCR text as serial searches - Shows result when match is found via serial - Also adds Register button on OCR not-found result
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-asset-tracker#68