INSIGHT-MVP/packages/crm-service
Thomas Reitz 48df3c3144 feat(crm): Phase 1 backend schema expansion + frontend integration
Backend (CRM-Expert Phase 1):
- New enums: ContactSource, EntityStatus, CompanySize, OwnerRole,
  LostReason, EmailType, PhoneType
- Contact: add linkedinUrl, birthday, source, department, status
- Company: add vatId, taxId, tradeRegisterNumber, registerCourt,
  companySize, deliveryAddress, dataEnrichedAt/Source, status
- Deal: add lostReason + lostReasonText (required when status=LOST)
- Multi-value emails/phones tables (contact_emails, contact_phones)
- Owner m:n model (contact_owners, company_owners, deal_owners)
- Redis Pub/Sub CRM events (crm.contact.created, crm.deal.won, etc.)
- Activity due_soon scheduler (cron every 15 min)
- SQL migration with data migration for existing records

Frontend integration:
- types.ts: all new enums, interfaces, label maps
- api.ts: owner CRUD endpoints (add/remove for contacts/companies/deals)
- hooks.ts: 6 new owner mutation hooks
- ContactFormModal: LinkedIn, birthday, source, department, status fields
- ContactDetailPage: display new fields (LinkedIn, department, birthday,
  source, status badge)
- CompanyDetailPage: display vatId, taxId, trade register, company size,
  delivery address, data enrichment info
- DealFormModal: lost reason dropdown + text (shown when status=LOST)
- DealDetailPage: display lost reason with label
- CompaniesPage: EntityStatus-aware status dots (ACTIVE/INACTIVE/BLOCKED)
- ActivityType: add FOLLOWUP to all label maps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:56:41 +01:00
..
keys feat(crm): add standalone dev environment and test token generator 2026-03-10 16:03:59 +01:00
prisma feat(crm): Phase 1 backend schema expansion + frontend integration 2026-03-12 15:56:41 +01:00
scripts feat(crm): add standalone dev environment and test token generator 2026-03-10 16:03:59 +01:00
src feat(crm): Phase 1 backend schema expansion + frontend integration 2026-03-12 15:56:41 +01:00
.dockerignore feat(crm): scaffold CRM service with full CRUD modules 2026-03-10 15:54:13 +01:00
docker-compose.crm-dev.yml feat(crm): add standalone dev environment and test token generator 2026-03-10 16:03:59 +01:00
Dockerfile feat(crm): scaffold CRM service with full CRUD modules 2026-03-10 15:54:13 +01:00
nest-cli.json feat(crm): scaffold CRM service with full CRUD modules 2026-03-10 15:54:13 +01:00
package-lock.json feat(crm): integrate Lexware Office for vouchers and contact sync 2026-03-10 20:28:41 +01:00
package.json feat(crm): integrate Lexware Office for vouchers and contact sync 2026-03-10 20:28:41 +01:00
Summarize.md feat(crm): Phase 1 backend schema expansion + frontend integration 2026-03-12 15:56:41 +01:00
tsconfig.json feat(crm): scaffold CRM service with full CRUD modules 2026-03-10 15:54:13 +01:00