From b746fc987d1c2beb90e6a470ca575875db5a30b9 Mon Sep 17 00:00:00 2001 From: Thomas Reitz Date: Thu, 12 Mar 2026 20:45:01 +0100 Subject: [PATCH] fix(crm): Kontaktdaten-Card zeigt alle Allgemein-Felder konstant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit E-Mail, Telefon, Mobil, LinkedIn, Unternehmen, Position, Abteilung werden immer angezeigt — leere Felder mit '—' Platzhalter Co-Authored-By: Claude Sonnet 4.6 --- .../crm/contacts/ContactDetailPage.module.css | 5 + .../src/crm/contacts/ContactDetailPage.tsx | 165 +++++++----------- 2 files changed, 71 insertions(+), 99 deletions(-) diff --git a/packages/frontend/src/crm/contacts/ContactDetailPage.module.css b/packages/frontend/src/crm/contacts/ContactDetailPage.module.css index 450a3d3..8c058e9 100644 --- a/packages/frontend/src/crm/contacts/ContactDetailPage.module.css +++ b/packages/frontend/src/crm/contacts/ContactDetailPage.module.css @@ -176,6 +176,11 @@ word-break: break-word; } +.empty { + color: var(--color-text-muted); + opacity: 0.5; +} + /* ---- Address row (full-width below infoColumns) ---- */ .addressRow { margin-top: 1rem; diff --git a/packages/frontend/src/crm/contacts/ContactDetailPage.tsx b/packages/frontend/src/crm/contacts/ContactDetailPage.tsx index 7248c42..7222231 100644 --- a/packages/frontend/src/crm/contacts/ContactDetailPage.tsx +++ b/packages/frontend/src/crm/contacts/ContactDetailPage.tsx @@ -206,61 +206,51 @@ export function ContactDetailPage() {

Kontaktdaten

- {/* Two sub-columns */} + {/* Two sub-columns — always show all Allgemein fields */}
- {/* Left: communication */} + {/* Left: Kommunikation */}
- {contact.email && ( - <> - E-Mail - - - {contact.email} - - - - )} - {contact.phone && ( - <> - Telefon - {contact.phone} - - )} - {contact.mobile && ( - <> - Mobil - - - {contact.mobile} - - - - )} - {contact.linkedinUrl && ( - <> - LinkedIn - - - - {contact.linkedinUrl.replace( - /^https?:\/\/(www\.)?linkedin\.com\/in\//, - '', - )} - - - - )} + E-Mail + + {contact.email ? ( + + {contact.email} + + ) : } + + + Telefon + + {contact.phone ?? } + + + Mobil + + {contact.mobile ? ( + + {contact.mobile} + + ) : } + + + LinkedIn + + {contact.linkedinUrl ? ( + + + {contact.linkedinUrl.replace( + /^https?:\/\/(www\.)?linkedin\.com\/in\//, + '', + )} + + ) : } + + {contact.website && ( <> Website @@ -278,12 +268,12 @@ export function ContactDetailPage() { )}
- {/* Right: context */} + {/* Right: Kontext */}
- {contact.company && ( - <> - Unternehmen - + Unternehmen + + {contact.company ? ( + <> {contact.company.industry && ( - + ({contact.company.industry}) )} - - - )} - {contact.position && ( - <> - Position - - {contact.position} - - - )} - {contact.department && ( - <> - Abteilung - - {contact.department} - - - )} + + ) : } + + + Position + + {contact.position ?? } + + + Abteilung + + {contact.department ?? } + + {contact.birthday && ( <> Geburtsdatum @@ -341,12 +320,7 @@ export function ContactDetailPage() { Status {ENTITY_STATUS_LABELS[contact.status] ?? contact.status} @@ -361,16 +335,9 @@ export function ContactDetailPage() {
Adresse - {contact.street && ( - <> - {contact.street} -
- - )} + {contact.street && <>{contact.street}
} {contact.zip} {contact.city} - {contact.country && contact.country !== 'DE' && ( - <>, {contact.country} - )} + {contact.country && contact.country !== 'DE' && <>, {contact.country}}