feat(catalog): corregir duplicados de menu y agregar 10 platillos y 5 frescos naturales con fotos reales

This commit is contained in:
unknown
2026-10-06 13:31:32 -06:00
parent 6560ecedf7
commit 480d5b9403
19 changed files with 230 additions and 15 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

+1 -1
View File
@@ -2285,6 +2285,6 @@
<script src="/js/sounds.js?v=9.6"></script>
<script src="/js/jsQR.js"></script>
<script src="/js/food-icons.js?v=1.1"></script>
<script src="/js/app.js?v=10.0"></script>
<script src="/js/app.js?v=10.1"></script>
</body>
</html>
+13 -4
View File
@@ -550,11 +550,20 @@ async function loadInitialData() {
populateStudentSelector();
// 2. Cargar productos y categorías
const resProd = await fetch('/api/productos');
// 2. Cargar productos y categorías de la escuela activa
const escId = (currentUser && currentUser.escuela_id) || (currentStudent && currentStudent.escuela_id) || 1;
const resProd = await fetch(`/api/productos?escuela_id=${escId}`);
const dataProd = await resProd.json();
categories = dataProd.categorias;
products = dataProd.productos;
categories = dataProd.categorias || [];
// Deduplicar productos para garantizar que nunca se repita ninguno
const seenNames = new Set();
products = (dataProd.productos || []).filter(p => {
const key = String(p.nombre).trim().toLowerCase();
if (seenNames.has(key)) return false;
seenNames.add(key);
return true;
});
renderCategories();
renderProducts();