Entity model: investors (grid) vs people (contacts); fix double-count (0.1.0:48)
Per Grant's clarification of the real data model: - Investor entities come from the fundraising grid, one per row, all labeled "investor" (drops the confusing lp/organization split). Grid is source of truth. - People come ONLY from the contacts table. The grid's contacts (fundraising_ contacts) are matched to a contact-person and recorded as member_of links to their investor, instead of creating duplicate person entities. This fixes the ~doubled people count (people now ≈ contacts, not contacts + grid contacts). - System Status cards: Investors / People (resolved) / Contacts in CRM / Grid contacts, so resolved-vs-source is visible at a glance. Verified on synthetic: people == contacts count (no double-count); multi-contact investors preserved via member_of. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+9
-9
@@ -9382,20 +9382,20 @@
|
||||
|
||||
<div className="kpi-grid">
|
||||
<div className="kpi-card">
|
||||
<div className="kpi-label">LPs</div>
|
||||
<div className="kpi-value">{entities.lp ?? 0}</div>
|
||||
<div className="kpi-label">Investors</div>
|
||||
<div className="kpi-value">{entities.investor ?? 0}</div>
|
||||
</div>
|
||||
<div className="kpi-card">
|
||||
<div className="kpi-label">Organizations</div>
|
||||
<div className="kpi-value">{entities.organization ?? 0}</div>
|
||||
</div>
|
||||
<div className="kpi-card">
|
||||
<div className="kpi-label">People</div>
|
||||
<div className="kpi-label">People (resolved)</div>
|
||||
<div className="kpi-value">{entities.person ?? 0}</div>
|
||||
</div>
|
||||
<div className="kpi-card">
|
||||
<div className="kpi-label">Entity Links</div>
|
||||
<div className="kpi-value">{data.entity_links ?? 0}</div>
|
||||
<div className="kpi-label">Contacts in CRM</div>
|
||||
<div className="kpi-value">{(data.source_counts || {}).contacts ?? '—'}</div>
|
||||
</div>
|
||||
<div className="kpi-card">
|
||||
<div className="kpi-label">Grid contacts</div>
|
||||
<div className="kpi-value">{(data.source_counts || {}).fundraising_contacts ?? '—'}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user