mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 23:56:40 +02:00
fix(crm): link imported Ansprechpartner to CRM company via companyId
When importing contact persons from Lexware, if the parent company is already in the CRM (detected via linkedMap), the companyId is now passed to createContact so the contact is properly associated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
332a623d6f
commit
00f6b9842e
1 changed files with 3 additions and 0 deletions
|
|
@ -146,6 +146,7 @@ function ImportTab() {
|
|||
const handleImportContactPerson = (
|
||||
person: LexwareContactPersonEntry,
|
||||
companyName: string,
|
||||
companyId?: string,
|
||||
) => {
|
||||
const cpName =
|
||||
[person.firstName, person.lastName].filter(Boolean).join(' ') ||
|
||||
|
|
@ -156,6 +157,7 @@ function ImportTab() {
|
|||
lastName: person.lastName || undefined,
|
||||
email: person.emailAddress || undefined,
|
||||
phone: person.phoneNumber || undefined,
|
||||
companyId: companyId || undefined,
|
||||
companyName: companyName || undefined,
|
||||
type: 'PERSON',
|
||||
},
|
||||
|
|
@ -417,6 +419,7 @@ function ImportTab() {
|
|||
handleImportContactPerson(
|
||||
cp,
|
||||
contact.company?.name ?? '',
|
||||
linked?.type === 'company' ? linked.id : undefined,
|
||||
)
|
||||
}
|
||||
title={`${cpName} als CRM-Kontakt importieren`}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue