Actualiser assets/js/app.js
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
This commit is contained in:
@@ -9367,17 +9367,10 @@ function showAddForm() {
|
|||||||
${currentProduct.weight_info ? `<p style="font-size:0.8rem;color:var(--text-light)">${escapeHtml(currentProduct.weight_info)}</p>` : ''}
|
${currentProduct.weight_info ? `<p style="font-size:0.8rem;color:var(--text-light)">${escapeHtml(currentProduct.weight_info)}</p>` : ''}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
// Set unit selector
|
// Set unit selector
|
||||||
const unit = currentProduct.unit || 'pz';
|
const unit = currentProduct.unit || 'pz';
|
||||||
const unitSelect = document.getElementById('add-unit');
|
const unitSelect = document.getElementById('add-unit');
|
||||||
unitSelect.value = unit;
|
unitSelect.value = unit;
|
||||||
|
|
||||||
function showAddForm() {
|
|
||||||
renderLocationButtons('location-selector', document.getElementById('add-location')?.value || 'dispensa', 'selectLocation');
|
|
||||||
const catIcon = CATEGORY_ICONS[mapToLocalCategory(currentProduct.category, currentProduct.name)] || '📦';
|
|
||||||
|
|
||||||
|
|
||||||
document.getElementById('add-quantity').value = unit === 'conf' ? (currentProduct._confCount || currentProduct.last_qty || 1) : (currentProduct.default_quantity || 1);
|
document.getElementById('add-quantity').value = unit === 'conf' ? (currentProduct._confCount || currentProduct.last_qty || 1) : (currentProduct.default_quantity || 1);
|
||||||
document.getElementById('add-quantity').dataset.manuallySet = 'false';
|
document.getElementById('add-quantity').dataset.manuallySet = 'false';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user