From 8c8f8a261c9a40fba32f25d587018538c42178cd Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 29 May 2026 07:55:44 -0400 Subject: [PATCH] Add 2D barcode scanning + connect_id search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add QR_CODE, DATA_MATRIX, PDF_417, AZTEC to barcode scanner hints so serial number stickers with 2D barcodes can be scanned - Update /api/assets/search to also match connect_id so full Connect IDs (e.g. VM-05912-0000068454) work when scanned - Bump SW cache v5→v6, footer v3.2→v3.3 --- server.py | 3 ++- static/index.html | 10 +++++++--- static/sw.js | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/server.py b/server.py index 977dff4..cfbda71 100644 --- a/server.py +++ b/server.py @@ -1129,7 +1129,8 @@ def list_assets( def search_by_machine_id(machine_id: str = Query(...)): conn = get_db() row = conn.execute( - "SELECT * FROM assets WHERE machine_id = ?", (machine_id,) + "SELECT * FROM assets WHERE machine_id = ? OR connect_id = ?", + (machine_id, machine_id), ).fetchone() conn.close() if row is None: diff --git a/static/index.html b/static/index.html index 3594a86..76b5fce 100644 --- a/static/index.html +++ b/static/index.html @@ -1091,7 +1091,7 @@