fix(pos): corregir error 'state is not defined' y favicon 404

- catalog.js: state → nav (variable correcta del catalogo)
- vsClearAll: resetea nav en vez de state inexistente
- favicon.ico: sirve icon-192.png del PWA

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 08:18:13 +00:00
parent 1547b35b14
commit d1093ab9a2
2 changed files with 10 additions and 6 deletions

View File

@@ -52,6 +52,10 @@ def create_app():
from flask import render_template, send_from_directory, jsonify, g
@app.route('/favicon.ico')
def favicon():
return send_from_directory('static/pwa', 'icon-192.png', mimetype='image/png')
@app.route('/pos/login')
def pos_login():
return render_template('login.html',

View File

@@ -927,11 +927,11 @@
var modelText = vsModel.options[vsModel.selectedIndex].text;
var engineText = vsEngine.options[vsEngine.selectedIndex].text;
state.brand = { id: parseInt(vsBrand.value), name: brandText };
state.model = { id: parseInt(vsModel.value), name: modelText };
state.year = { id: parseInt(vsYear.value), value: yearText };
state.engine = { id_mye: parseInt(myeId), name: engineText };
state.level = 'categories';
nav.brand = { id: parseInt(vsBrand.value), name: brandText };
nav.model = { id: parseInt(vsModel.value), name: modelText };
nav.year = { id: parseInt(vsYear.value), year: yearText };
nav.engine = { id_mye: parseInt(myeId), name: engineText };
nav.level = 'categories';
loadCategories();
@@ -952,7 +952,7 @@
vsEngine.disabled = true;
vsClear.style.display = 'none';
state = { level: 'brands', brand: null, model: null, year: null, engine: null, category: null, group: null, page: 1, totalPages: 1 };
nav.level = 'brands'; nav.brand = null; nav.model = null; nav.year = null; nav.engine = null; nav.category = null; nav.group = null; currentPage = 1;
loadBrands();
}