diff --git a/static/app.js b/static/app.js index 6063942..07120cd 100644 --- a/static/app.js +++ b/static/app.js @@ -232,8 +232,6 @@ function selectBarMember(id, name, number, balance, balanceDisplay) { document.getElementById('barSelected').innerHTML = `${esc(name)} #${esc(number)} Balance: ${esc(balanceDisplay)}`; document.getElementById('barForm').classList.remove('hidden'); - document.getElementById('barProductSearch').value = ''; - document.getElementById('barProductResults').innerHTML = ''; setMsg('barMsg', '', ''); } @@ -243,46 +241,9 @@ function clearBarSelection() { document.getElementById('barAmount').value = ''; document.getElementById('barPin').value = ''; document.getElementById('barNote').value = ''; - document.getElementById('barProductSearch').value = ''; - document.getElementById('barProductResults').innerHTML = ''; setMsg('barMsg', '', ''); } -let productTimer = null; -async function barProductLookup() { - clearTimeout(productTimer); - productTimer = setTimeout(async () => { - const q = document.getElementById('barProductSearch').value.trim(); - if (!q) { document.getElementById('barProductResults').innerHTML = ''; return; } - try { - const products = await apiFetch(`/products?q=${encodeURIComponent(q)}`); - const div = document.getElementById('barProductResults'); - if (!products.length) { - div.innerHTML = '