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:
2026-04-18 05:35:53 +00:00
parent 6b097614a0
commit e95f7cf684
54 changed files with 11226 additions and 1422 deletions

View File

@@ -0,0 +1,16 @@
-- ═══════════════════════════════════════════════════════════════════════
-- Marketplace — per-tenant employees table migration
-- Apply to: tenant_template, tenant_refaccionaria_demo, tenant_acct_test,
-- and any future tenant DB.
-- ═══════════════════════════════════════════════════════════════════════
ALTER TABLE employees
ADD COLUMN IF NOT EXISTS marketplace_role VARCHAR(20) NOT NULL DEFAULT 'buyer',
ADD COLUMN IF NOT EXISTS bodega_id INTEGER;
-- Valid values: 'buyer' (refaccionaria/taller) | 'seller' (bodega) | 'admin'
-- bodega_id references master.bodegas(id_bodega). No FK because that table
-- lives in a different database — the app enforces referential integrity.
CREATE INDEX IF NOT EXISTS idx_employees_marketplace_role ON employees (marketplace_role);
CREATE INDEX IF NOT EXISTS idx_employees_bodega ON employees (bodega_id) WHERE bodega_id IS NOT NULL;