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:
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user