mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-20 05:28:22 +02:00
feat(contacts): add contacts page with per-store management and supplier email field
- New contacts table (group_id, name, role, phone, email, notes) per store - Suppliers table: add email field with form and card display - Page /contacts: two-column layout (suppliers read-only / free contacts CRUD) - Permissions: read all roles, create/edit/delete admin + directeur + manager - Admin can filter contacts by store; other roles see their own stores only - Migration SQL: 20260515_add_contacts_and_supplier_email.sql Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
40cf456a64
commit
805664dc32
8 files changed
+736
-6
No files matched your search
@@ -0,0 +1,21 @@
|
||||
-- Migration: Ajout email fournisseurs + table contacts par magasin
|
||||
-- Created: 2026-05-15
|
||||
|
||||
-- Ajout du champ email sur les fournisseurs
|
||||
ALTER TABLE suppliers ADD COLUMN IF NOT EXISTS email VARCHAR(255);
|
||||
|
||||
-- Table des contacts libres, rattachés à un magasin
|
||||
CREATE TABLE IF NOT EXISTS contacts (
|
||||
id SERIAL PRIMARY KEY,
|
||||
group_id INTEGER NOT NULL REFERENCES groups(id) ON DELETE CASCADE,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
role VARCHAR(255),
|
||||
phone VARCHAR(50),
|
||||
email VARCHAR(255),
|
||||
notes TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Index pour recherche rapide par magasin
|
||||
CREATE INDEX IF NOT EXISTS idx_contacts_group_id ON contacts(group_id);
|
||||
Reference in new issue
Block a user