Scan existing asset redirects to detail view #39

Closed
opened 2026-05-24 21:17:09 +00:00 by shawn · 0 comments
Owner

Problem

Scanning a barcode for an existing asset showed a scan result card ("View Details" + "Check In" buttons) instead of going directly to the asset.

Solution

Existing asset scans now redirect directly to the full asset detail view on the Assets tab. Auto-checkin still runs in background if GPS is available. New barcodes (not found in DB) still show the Add Asset form, and now correctly switch to the Add Asset tab.

Changes

  • static/index.html: handleBarcode() calls viewAsset() directly when asset is found; showNewAssetForm() calls switchTab("tabAddAsset") with deferred status update to survive async startScanning
## Problem Scanning a barcode for an existing asset showed a scan result card ("View Details" + "Check In" buttons) instead of going directly to the asset. ## Solution Existing asset scans now redirect directly to the full asset detail view on the Assets tab. Auto-checkin still runs in background if GPS is available. New barcodes (not found in DB) still show the Add Asset form, and now correctly switch to the Add Asset tab. ## Changes - `static/index.html`: `handleBarcode()` calls `viewAsset()` directly when asset is found; `showNewAssetForm()` calls `switchTab("tabAddAsset")` with deferred status update to survive async `startScanning`
shawn closed this issue 2026-05-24 21:17:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-asset-tracker#39