fix: remove duplicate doAutoCheckin call from handleBarcode

showScannedAsset (called on the very next line) already triggers the
auto-checkin. handleBarcode was calling doAutoCheckin immediately before
showScannedAsset, resulting in two check-in records per barcode scan.
This commit is contained in:
2026-06-02 18:50:57 -04:00
parent 52f801675e
commit 95a368163a
-4
View File
@@ -3108,10 +3108,6 @@
const asset = await api(`/api/assets/search?machine_id=${encodeURIComponent(machineId)}`);
// Asset exists — show result in-place with scan new button
showToast(`${esc(asset.name)} — found!`, false);
// Auto-checkin if GPS available (background, non-blocking)
if (AppState.gpsLat != null) {
doAutoCheckin(asset.id);
}
showScannedAsset(asset);
} catch (e) {
if (e.message === 'Asset not found' || e.message.includes('404')) {