Updated capacitor focus logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled

This commit is contained in:
dhanabalan
2026-02-17 09:43:53 +05:30
parent 0dd49c2ebf
commit 84e547ec4b

View File

@@ -39,7 +39,7 @@
{{-- Modal for empty invoice--}}
@if ($emptyInvoice)
<div class="text-center text-red-500">
<p>No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.</p>
<p>No data found for the invoice number <strong>{{ $invoiceNumber }}</strong>.</p>
</div>
@endif
@@ -84,7 +84,7 @@
@empty
<tr>
<td colspan="12" class="text-center py-4 text-gray-500">
No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.
No data found for the invoice number <strong>{{ $invoiceNumber }}</strong>.
</td>
</tr>
@endforelse
@@ -164,7 +164,7 @@
@empty
<tr>
<td colspan="10" class="text-center py-4 text-gray-500">
No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.
No data found for the invoice number <strong>{{ $invoiceNumber }}</strong>.
</td>
</tr>
@endforelse
@@ -182,15 +182,34 @@
});
</script> --}}
<script>
window.addEventListener('focus-capacitor-input', () => {
window.addEventListener('focus-capacitor-input', (event) => {
console.log('Item Code:', event.detail.itemCode);
const container = document.getElementById('focus-capacitor-input');
if (container) {
container.dataset.itemCode = event.detail.itemCode;
}
setTimeout(() => {
const input = document.getElementById('capacitorInput');
if (input) {
input.focus();
input.select();
}
}, 50);
// const container = document.getElementById('focus-capacitor-input');
const input = container?.querySelector('input'); // gets the actual input inside
if (input) {
input.focus();
input.select();
}
}, 50);
});
// window.addEventListener('focus-capacitor-input', (event) => {
// console.log('Item Code:', event.detail.itemCode);
// setTimeout(() => {
// const input = document.querySelector('#capacitorInput input');
// if (input) {
// input.focus();
// input.select();
// }
// }, 50);
// });
window.addEventListener('focus-serial-number', () => {
setTimeout(() => {