Phase 1C: Frontend unified contact UI

This commit is contained in:
Agent Zero
2026-07-23 17:17:32 +02:00
parent a8331fbc2b
commit 879106c4eb
62 changed files with 552 additions and 1276 deletions
-2
View File
@@ -5,7 +5,6 @@ from app.models.ai_conversation import AIConversation, AIMessage
from app.models.attachment import Attachment
from app.models.audit import AuditLog, DeletionLog
from app.models.auth import ApiToken, PasswordResetToken
from app.models.company import Company
from app.models.contact import Contact, ContactPerson
from app.models.contact_folder import ContactFolder
from app.models.entity_history import EntityHistory
@@ -37,7 +36,6 @@ __all__ = [
"NotificationPreference",
"PasswordResetToken",
"ApiToken",
"Company",
"Contact",
"ContactPerson",
"ContactFolder",
+2 -2
View File
@@ -12,9 +12,9 @@ from app.core.db import Base, TenantMixin
class Address(Base, TenantMixin):
"""Polymorphic address entity — multiple addresses per company or contact.
"""Polymorphic address entity — multiple addresses per contact.
entity_type: 'company' or 'contact'
entity_type: 'contact'
entity_id: FK to companies.id or contacts.id
address_type: billing, shipping, headquarters, branch, private, other
is_default: one default address per (entity_type, entity_id, address_type)
-13
View File
@@ -1,13 +0,0 @@
"""Backward-compat shim — Company is now Contact with type='company'.
This module re-exports Contact as Company for code that still imports
from app.models.company. The old companies table no longer exists;
all company data lives in the contacts table with type='company'.
"""
from app.models.contact import Contact, ContactPerson
# Backward-compat: Company is now just a Contact with type='company'
Company = Contact
__all__ = ["Company", "ContactPerson"]