export function renderItems(categories, items) { let html = ''; categories.forEach(category => { html += `

${category}

`; items[category].forEach(item => { if (item && item._id != undefined) { html += `
#
${item.date}
${item.count} шт.
Цена за 1 шт.
${item.price.toFixed(2)}₽
` } else { html += `
В этой категории пока что нету товаров
` } }); }); return html; }