feat: configurable vehicle compatibility source (TecDoc / QWEN / Both)
Backend: - Added GET/PUT /pos/api/config/vehicle-compat-source endpoints - Added get_compat_source() helper reading from tenant_config - create_item() now respects config: runs TecDoc and/or QWEN accordingly - auto_match_item_vehicles() respects config: runs only configured source Frontend: - Added 'Compatibilidad de Vehiculos' section in config.html - Added loadVehicleCompatSource() / saveVehicleCompatSource() in config.js - Regenerated config.min.js
This commit is contained in:
@@ -551,7 +551,40 @@
|
||||
</div>
|
||||
|
||||
<!-- ===============================================================
|
||||
SECTION 8: MONEDA / CURRENCY
|
||||
SECTION 8: VEHICLE COMPATIBILITY SOURCE
|
||||
=============================================================== -->
|
||||
<div class="settings-section">
|
||||
<div class="settings-section__header">
|
||||
<div class="settings-section__icon">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<div class="settings-section__title">Compatibilidad de Vehículos</div>
|
||||
<div class="settings-section__desc">Elige la fuente para asignar vehículos compatibles a tus productos</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-card">
|
||||
<div class="settings-card__title">Fuente de Datos</div>
|
||||
<div class="form-grid">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Método de asignación automática</label>
|
||||
<select class="form-select" id="cfg-compat-source">
|
||||
<option value="tecdoc">TecDoc — Base de datos oficial de autopartes</option>
|
||||
<option value="qwen">QWEN AI — Inteligencia artificial (experimental)</option>
|
||||
<option value="both">Ambos — TecDoc primero, QWEN como complemento</option>
|
||||
</select>
|
||||
<span class="form-hint">Afecta la creación de productos y el botón "Auto-Match"</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: var(--space-4); display: flex; justify-content: flex-end;">
|
||||
<button class="btn btn--primary" id="btn-save-compat-source">Guardar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===============================================================
|
||||
SECTION 9: MONEDA / CURRENCY
|
||||
=============================================================== -->
|
||||
<div class="settings-section">
|
||||
<div class="settings-section__header">
|
||||
|
||||
Reference in New Issue
Block a user