Phase 1C: Frontend unified contact UI
This commit is contained in:
+5
-5
@@ -29,8 +29,8 @@ from app.core.db import Base, close_engine, reset_engine_for_testing
|
||||
from app.core.service_container import get_container # noqa: F401
|
||||
from app.main import create_app
|
||||
from app.models.ai_conversation import AIConversation, AIMessage # noqa: F401
|
||||
from app.models.company import Company
|
||||
from app.models.contact import CompanyContact, Contact # noqa: F401
|
||||
from app.models.contact import Contact
|
||||
from app.models.contact import Contact, ContactPerson # noqa: F401
|
||||
from app.models.plugin import Plugin, PluginMigration # noqa: F401
|
||||
from app.models.role import Role
|
||||
from app.models.tenant import Tenant
|
||||
@@ -131,7 +131,7 @@ def clean_tables(db_setup):
|
||||
# TRUNCATE all tables with CASCADE — fast and reliable isolation
|
||||
conn.execute(
|
||||
text(
|
||||
"TRUNCATE TABLE contact_pgp_keys, pgp_keys, mail_account_send_permissions, mail_account_delegates, mail_seen_by, vacation_sent_log, mail_signatures, mail_templates, mail_rules, mail_label_assignments, mail_labels, mail_attachments, mails, mail_folders, mail_accounts, resource_bookings, resources, subtasks, user_calendar_visibility, calendar_shares, calendar_entry_links, calendar_entries, calendars, files, folders, entity_links, share_links, permissions, tag_assignments, tags, workflow_step_history, workflow_instances, workflows, ai_messages, ai_conversations, plugin_migrations, plugins, company_contacts, contacts, api_tokens, password_reset_tokens, notifications, deletion_log, audit_log, sessions, roles, companies, user_tenants, users, tenants CASCADE;"
|
||||
"TRUNCATE TABLE contact_pgp_keys, pgp_keys, mail_account_send_permissions, mail_account_delegates, mail_seen_by, vacation_sent_log, mail_signatures, mail_templates, mail_rules, mail_label_assignments, mail_labels, mail_attachments, mails, mail_folders, mail_accounts, resource_bookings, resources, subtasks, user_calendar_visibility, calendar_shares, calendar_entry_links, calendar_entries, calendars, files, folders, entity_links, share_links, permissions, tag_assignments, tags, workflow_step_history, workflow_instances, workflows, ai_messages, ai_conversations, plugin_migrations, plugins, contacts, api_tokens, password_reset_tokens, notifications, deletion_log, audit_log, sessions, roles, user_tenants, users, tenants CASCADE;"
|
||||
)
|
||||
)
|
||||
conn.commit()
|
||||
@@ -268,7 +268,7 @@ async def seed_tenant_and_users(db: AsyncSession) -> dict[str, Any]:
|
||||
await db.flush()
|
||||
|
||||
# Create a company in tenant A
|
||||
company_a = Company(
|
||||
company_a = Contact(
|
||||
tenant_id=tenant_a.id,
|
||||
name="Company Alpha",
|
||||
industry="IT",
|
||||
@@ -276,7 +276,7 @@ async def seed_tenant_and_users(db: AsyncSession) -> dict[str, Any]:
|
||||
updated_by=admin_a.id,
|
||||
)
|
||||
# Create a company in tenant B
|
||||
company_b = Company(
|
||||
company_b = Contact(
|
||||
tenant_id=tenant_b.id,
|
||||
name="Company Beta",
|
||||
industry="Finance",
|
||||
|
||||
Reference in New Issue
Block a user