Scan existing asset redirects to detail view #39
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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()callsviewAsset()directly when asset is found;showNewAssetForm()callsswitchTab("tabAddAsset")with deferred status update to survive asyncstartScanning