feat(pos): add exploded diagrams feature (#9) with interactive SVG viewer

- Blueprint with API endpoints: list, detail, SVG serve, vehicle-linked diagrams
- Interactive SVG viewer with zoom/pan (mouse wheel, drag, touch, keyboard)
- Clickable hotspots that highlight on hover and show part detail panel
- Parts sidebar listing all callout numbers with catalog search integration
- 3 placeholder SVG diagrams: braking system, suspension, engine components
- Seeded diagrams, hotspots, and vehicle_diagrams in DB
- Added to sidebar nav, i18n (ES/EN), and "Ver diagramas" link in catalog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 04:24:19 +00:00
parent 5a88d7c7ff
commit c333f2eaf0
10 changed files with 1759 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ def create_app():
from blueprints.marketplace_bp import marketplace_bp
app.register_blueprint(marketplace_bp)
from blueprints.diagrams_bp import diagrams_bp
app.register_blueprint(diagrams_bp)
# Health check
@app.route('/pos/health')
def health():
@@ -120,6 +123,10 @@ def create_app():
def pos_marketplace():
return render_template('marketplace.html')
@app.route('/pos/diagrams')
def pos_diagrams():
return render_template('diagrams.html')
@app.route('/pos/static/<path:filename>')
def pos_static(filename):
return send_from_directory('static', filename)