Add settings page for tag-to-company mappings and auto-create Paperclip projects
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m22s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m22s
When a case is created, a Paperclip project is now automatically created in the correct company based on the appeal_subtype tag. Tag-to-company mappings are managed via a new Settings page that pulls companies from Paperclip DB. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -376,6 +376,16 @@ CREATE TABLE IF NOT EXISTS chair_feedback (
|
||||
created_at TIMESTAMPTZ DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tag_company_mappings (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
tag TEXT NOT NULL, -- appeal_subtype value (e.g. building_permit)
|
||||
tag_label TEXT NOT NULL DEFAULT '', -- Hebrew display label
|
||||
company_id TEXT NOT NULL, -- Paperclip company UUID
|
||||
company_name TEXT NOT NULL DEFAULT '', -- cached company name for display
|
||||
created_at TIMESTAMPTZ DEFAULT now(),
|
||||
UNIQUE(tag, company_id)
|
||||
);
|
||||
|
||||
-- ═══════════════════════════════════════════════════════════════════
|
||||
-- Indexes
|
||||
-- ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user