Files
Autoparts-DB/pos/app.py
consultoria-as 21427c4dd2 feat(pos): integrate design system for facturacion, contabilidad, dashboard, config, reportes
Replace 5 POS templates with updated design system pages using tokens.css.
Add routes for dashboard, config, and reports pages.
Create stub JS files for dashboard, config, and reports modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 07:26:38 +00:00

90 lines
2.3 KiB
Python

from flask import Flask
def create_app():
app = Flask(__name__)
# Register blueprints
from blueprints.auth_bp import auth_bp
app.register_blueprint(auth_bp)
from blueprints.config_bp import config_bp
app.register_blueprint(config_bp)
from blueprints.inventory_bp import inventory_bp
app.register_blueprint(inventory_bp)
from blueprints.catalog_bp import catalog_bp
app.register_blueprint(catalog_bp)
from blueprints.pos_bp import pos_bp
app.register_blueprint(pos_bp)
from blueprints.customers_bp import customers_bp
app.register_blueprint(customers_bp)
from blueprints.cashregister_bp import cashregister_bp
app.register_blueprint(cashregister_bp)
from blueprints.invoicing_bp import invoicing_bp
app.register_blueprint(invoicing_bp)
from blueprints.accounting_bp import accounting_bp
app.register_blueprint(accounting_bp)
# Health check
@app.route('/pos/health')
def health():
return {'status': 'ok'}
from flask import render_template, send_from_directory
@app.route('/pos/login')
def pos_login():
return render_template('login.html')
@app.route('/pos/catalog')
def pos_catalog():
return render_template('catalog.html')
@app.route('/pos/inventory')
def pos_inventory():
return render_template('inventory.html')
@app.route('/pos/sale')
def pos_sale():
return render_template('pos.html')
@app.route('/pos/customers')
def pos_customers():
return render_template('customers.html')
@app.route('/pos/invoicing')
def pos_invoicing():
return render_template('invoicing.html')
@app.route('/pos/accounting')
def pos_accounting():
return render_template('accounting.html')
@app.route('/pos/dashboard')
def pos_dashboard():
return render_template('dashboard.html')
@app.route('/pos/config')
def pos_config():
return render_template('config.html')
@app.route('/pos/reports')
def pos_reports():
return render_template('reports.html')
@app.route('/pos/static/<path:filename>')
def pos_static(filename):
return send_from_directory('static', filename)
return app
if __name__ == '__main__':
app = create_app()
app.run(host='0.0.0.0', port=5001, debug=True)