re-retriede image if cached one doesnt exist anymore

This commit is contained in:
Shiro-Nek0
2026-02-26 22:52:34 -03:00
parent 81cacd3589
commit 3a39cb95db
2 changed files with 61 additions and 20 deletions

View File

@@ -518,7 +518,13 @@
document.getElementById('display-price').innerText = clp.format(d.price);
document.getElementById('display-barcode').innerText = d.barcode;
document.getElementById('display-img').src = d.image || './static/placeholder.png';
updateForm(d.barcode, d.name, d.price, d.image, 'Editando: ' + d.name);
let title = 'Editando: ' + d.name;
if (d.note) {
title += ` (${d.note})`; // This will show "Editando: Item (Imagen recuperada)"
}
updateForm(d.barcode, d.name, d.price, d.image, title);
});
socket.on('scan_error', d => {