diff --git a/js/views/Pantry.js b/js/views/Pantry.js index b289b14..c9175d0 100644 --- a/js/views/Pantry.js +++ b/js/views/Pantry.js @@ -125,7 +125,7 @@ export function getPantryHTML() { -
+
@@ -185,17 +185,9 @@ function ingredientRowHtml(id, pantry) { const qty = getPantryTotal(id, pantry); const hasProducts = ingredientHasProducts(id); const products = hasProducts ? getProductsForIngredient(id) : []; - const pantryItems = hasProducts ? getPantryProducts(id, pantry) : []; - const stockedCount = pantryItems.filter((i) => i.qty > 0).length; const hasStock = qty > 0; const accent = hasStock ? '#6ee7b7' : '#4b4a46'; const qtyColor = hasStock ? '#6ee7b7' : '#d7d2c8'; - const subtitle = hasProducts - ? `${stockedCount}/${products.length} produktów` - : categoryLabel(def.category); - const status = hasProducts - ? (stockedCount === 0 ? 'wybierz produkt' : stockedCount === products.length ? 'wszystko na stanie' : 'częściowo na stanie') - : (hasStock ? 'na stanie' : 'brak'); const badgeText = hasProducts ? productCountShortLabel(products.length) : unitLabel(def.pantryUnit); return `
-
+
${esc(formatQtyWithUnit(qty, def.pantryUnit))} ${esc(badgeText)}
- ${esc(status)}
`; } @@ -250,14 +240,11 @@ function renderBoard() { const icon = CATEGORY_ICONS[cat] || 'fa-jar'; return `
-
-
-

- ${esc(categoryLabel(cat))} -

-

${ids.length} ${getCategoryItemLabel(ids.length)}

-
- przesuń w bok +
+

+ ${esc(categoryLabel(cat))} +

+

${ids.length} ${getCategoryItemLabel(ids.length)}