feat: complete session — catalog, marketplace, WhatsApp, peer-to-peer, install scripts
Major features: - Pixel-Perfect glassmorphism design (landing + POS + public catalog) - OEM/Local catalog toggle with Nexpart taxonomy (14 groups, 108 subgroups, 558 part types) - Marketplace B2B Phase 1 (bodegas, POs, status machine, WA+email notifications) - Peer-to-peer inventory (multi-instance, LAN discovery) - WhatsApp: photo→Vision AI, voice→Whisper, conversational quotations - Smart unified search (VIN/plate/part_number/keyword auto-detect) - Shop Supplies tab (vehicle-independent parts) - Chatbot AI fallback chain (5 models) + response cache - CSV inventory import tool + setup_instance.sh installer - Tablet-responsive CSS + sidebar toggle - Filters, export CSV, employee edit, business data save - Quotation system (WA→POS) with auto-print on confirmation - Live stats on landing page Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Nexus Autoparts — Clientes</title>
|
||||
<link rel="stylesheet" href="/pos/static/css/tokens.css" />
|
||||
<link rel="stylesheet" href="/pos/static/css/pos-glass.css" />
|
||||
<link rel="manifest" href="/pos/static/pwa/manifest.json" />
|
||||
<meta name="theme-color" content="#F5A623" />
|
||||
|
||||
@@ -1721,13 +1722,41 @@
|
||||
<div class="page-header__subtitle">Directorio, crédito y historial de compras</div>
|
||||
</div>
|
||||
<div class="page-header__actions">
|
||||
<button class="btn btn-ghost">
|
||||
<button class="btn btn-ghost" onclick="openCustomerFilters(this)">
|
||||
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M2 5h12M4 8h8M6 11h4"/></svg>
|
||||
Filtros
|
||||
</button>
|
||||
<button class="btn btn-ghost">
|
||||
<script>
|
||||
function openCustomerFilters(btn) {
|
||||
var table = document.querySelector('table');
|
||||
if (!table) { showToast('Carga la lista de clientes primero', 'warn'); return; }
|
||||
// Auto-detect columns: look at headers to find the right indexes
|
||||
var ths = table.querySelectorAll('thead th');
|
||||
var colMap = {};
|
||||
ths.forEach(function(th, i) {
|
||||
var t = th.textContent.trim().toLowerCase();
|
||||
if (t.indexOf('tipo') !== -1 || t.indexOf('tier') !== -1) colMap.tipo = i;
|
||||
if (t.indexOf('ciudad') !== -1 || t.indexOf('city') !== -1) colMap.ciudad = i;
|
||||
if (t.indexOf('crédito') !== -1 || t.indexOf('credito') !== -1 || t.indexOf('credit') !== -1) colMap.credito = i;
|
||||
if (t.indexOf('status') !== -1 || t.indexOf('estado') !== -1) colMap.status = i;
|
||||
});
|
||||
var filters = [];
|
||||
if (colMap.tipo !== undefined) filters.push({label:'Tipo', column: colMap.tipo, values: getUniqueColumnValues(table, colMap.tipo)});
|
||||
if (colMap.credito !== undefined) filters.push({label:'Crédito', column: colMap.credito, values: getUniqueColumnValues(table, colMap.credito)});
|
||||
if (colMap.ciudad !== undefined) filters.push({label:'Ciudad', column: colMap.ciudad, values: getUniqueColumnValues(table, colMap.ciudad)});
|
||||
if (colMap.status !== undefined) filters.push({label:'Estado', column: colMap.status, values: getUniqueColumnValues(table, colMap.status)});
|
||||
if (filters.length === 0) {
|
||||
// Fallback: use first 3 columns
|
||||
for (var i = 1; i < Math.min(4, ths.length); i++) {
|
||||
filters.push({label: ths[i].textContent.trim(), column: i, values: getUniqueColumnValues(table, i)});
|
||||
}
|
||||
}
|
||||
toggleFilterPanel(btn, filters);
|
||||
}
|
||||
</script>
|
||||
<button class="btn btn-ghost" onclick="exportVisibleTableCSV('clientes')">
|
||||
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M14 10v3a1 1 0 01-1 1H3a1 1 0 01-1-1v-3M8 1v9M4 6l4 4 4-4"/></svg>
|
||||
Exportar
|
||||
Exportar CSV
|
||||
</button>
|
||||
<button class="btn btn-primary" onclick="openNewCustomerModal()">
|
||||
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2.2"><line x1="8" y1="2" x2="8" y2="14"/><line x1="2" y1="8" x2="14" y2="8"/></svg>
|
||||
@@ -2149,6 +2178,7 @@
|
||||
|
||||
<script src="/pos/static/js/i18n.js"></script>
|
||||
<script src="/pos/static/js/app-init.js"></script>
|
||||
<script src="/pos/static/js/pos-utils.js"></script>
|
||||
<script src="/pos/static/js/sidebar.js"></script>
|
||||
<script src="/pos/static/js/customers.js"></script>
|
||||
<script src="/pos/static/js/offline-banner.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user