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
+3 -3
View File
@@ -13,7 +13,7 @@ from app.core.audit import log_audit
from app.models.address import Address
VALID_ENTITY_TYPES = {"company", "contact"}
VALID_ENTITY_TYPES = {"contact"}
VALID_ADDRESS_TYPES = {"billing", "shipping", "headquarters", "branch", "private", "other"}
@@ -206,7 +206,7 @@ async def migrate_existing_addresses(db: AsyncSession) -> int:
existing = await db.execute(
select(Address).where(
Address.tenant_id == company.tenant_id,
Address.entity_type == "company",
Address.entity_type == "contact",
Address.entity_id == company.id,
Address.address_type == "headquarters",
Address.deleted_at.is_(None),
@@ -217,7 +217,7 @@ async def migrate_existing_addresses(db: AsyncSession) -> int:
addr = Address(
tenant_id=company.tenant_id,
entity_type="company",
entity_type="contact",
entity_id=company.id,
label="Hauptsitz",
address_type="headquarters",