diff --git a/assets/css/style.css b/assets/css/style.css index 2e5bc55..60e76f3 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -2732,6 +2732,27 @@ body { font-size: 0.95rem; } +.btn-edit-inline { + position: absolute; + top: 8px; + right: 8px; + background: rgba(255,255,255,0.9); + border: 1px solid #ddd; + border-radius: 50%; + width: 36px; + height: 36px; + font-size: 1rem; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 1px 3px rgba(0,0,0,0.12); +} + +.product-preview-large { + position: relative; +} + /* ===== INVENTORY STATUS BAR ===== */ .inventory-status-bar { background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%); diff --git a/assets/js/app.js b/assets/js/app.js index f731886..2b4528c 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -2301,13 +2301,13 @@ function showProductAction() { ${currentProduct.weight_info ? `
⚖️ ${escapeHtml(currentProduct.weight_info)}
` : ''} ${currentProduct.barcode ? `📊 ${currentProduct.barcode}
` : ''} + `; // Check if product needs editing (unknown name, missing info) const isUnknown = !currentProduct.name || /sconosciuto|unknown|^$/i.test(currentProduct.name.trim()) || currentProduct.name.trim().length < 2; - const needsEdit = isUnknown || !currentProduct.brand; // Edit product info section let editInfoEl = document.getElementById('action-edit-info'); @@ -2318,42 +2318,38 @@ function showProductAction() { preview.parentElement.insertBefore(editInfoEl, preview.nextSibling); } - if (needsEdit) { - const categoryOptions = Object.entries(CATEGORY_LABELS).map(([key, label]) => - `` - ).join(''); - - editInfoEl.innerHTML = ` -${isUnknown ? 'Inserisci il nome e le informazioni del prodotto' : 'Puoi modificare o completare le info mancanti'}
-Inserisci il nome e le informazioni del prodotto
' : ''} +