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>
17 lines
1.1 KiB
SQL
17 lines
1.1 KiB
SQL
-- ═══════════════════════════════════════════════════════════════════════
|
|
-- 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;
|