Added focus to production order and qr input in production quantity page
This commit is contained in:
@@ -87,6 +87,15 @@
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('focus-qr-input', () => {
|
||||
const input = document.getElementById('qr-scan-input');
|
||||
|
||||
if (input) {
|
||||
input.focus();
|
||||
input.select();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const scanInput = document.getElementById('qr-scan-input');
|
||||
if (!scanInput) return;
|
||||
@@ -97,10 +106,10 @@
|
||||
|
||||
const value = scanInput.value.trim();
|
||||
|
||||
if (value !== '') {
|
||||
// if (value != '') {
|
||||
Livewire.dispatch('handleQrScan', { value: value });
|
||||
scanInput.value = '';
|
||||
}
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user