Modifica prodotto: rimossa immagine rotta dal form

This commit is contained in:
dadaloop82
2026-03-13 14:24:42 +00:00
parent c76ffd731e
commit e300f56c52
3 changed files with 4 additions and 9 deletions
+3 -8
View File
@@ -2401,7 +2401,7 @@ function editProductFromAction() {
document.getElementById('pf-name').value = currentProduct.name || ''; document.getElementById('pf-name').value = currentProduct.name || '';
document.getElementById('pf-brand').value = currentProduct.brand || ''; document.getElementById('pf-brand').value = currentProduct.brand || '';
document.getElementById('pf-barcode').value = currentProduct.barcode || ''; document.getElementById('pf-barcode').value = currentProduct.barcode || '';
document.getElementById('pf-image').value = currentProduct.image_url || ''; document.getElementById('pf-image').value = '';
document.getElementById('pf-notes').value = currentProduct.notes || ''; document.getElementById('pf-notes').value = currentProduct.notes || '';
document.getElementById('pf-unit').value = currentProduct.unit || 'pz'; document.getElementById('pf-unit').value = currentProduct.unit || 'pz';
document.getElementById('pf-defqty').value = currentProduct.default_quantity || 1; document.getElementById('pf-defqty').value = currentProduct.default_quantity || 1;
@@ -2417,14 +2417,9 @@ function editProductFromAction() {
document.getElementById('pf-category').dataset.manuallySet = 'true'; document.getElementById('pf-category').dataset.manuallySet = 'true';
document.getElementById('pf-defqty').dataset.manuallySet = 'true'; document.getElementById('pf-defqty').dataset.manuallySet = 'true';
// Image preview // Image preview - not shown in edit mode
const preview = document.getElementById('pf-image-preview'); const preview = document.getElementById('pf-image-preview');
if (currentProduct.image_url) { preview.style.display = 'none';
preview.src = currentProduct.image_url;
preview.style.display = 'block';
} else {
preview.style.display = 'none';
}
// Conf size row // Conf size row
const pfConfRow = document.getElementById('pf-conf-size-row'); const pfConfRow = document.getElementById('pf-conf-size-row');
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -874,6 +874,6 @@
</div> </div>
</div> </div>
<script src="assets/js/app.js?v=20260313d"></script> <script src="assets/js/app.js?v=20260313e"></script>
</body> </body>
</html> </html>