Phase 1C: Frontend unified contact UI
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user