feat: Adresse & Telefon in LeadVault Tabelle + Side Panel
- Lead-Modell: address Feld hinzugefügt (Migration) - Maps-Sync: address + phone aus source JSON extrahiert - LeadVault Tabelle: Telefon/Adresse als kombinierte Spalte - LeadVault Side Panel: Adresse mit Pin-Icon - Telefonnummer ist klickbar (tel: Link) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -152,16 +152,21 @@ async function runMapsEnrich(
|
||||
// Sync to LeadVault
|
||||
const finalResults = await prisma.leadResult.findMany({ where: { jobId } });
|
||||
await sinkLeadsToVault(
|
||||
finalResults.map(r => ({
|
||||
domain: r.domain,
|
||||
companyName: r.companyName,
|
||||
contactName: r.contactName,
|
||||
contactTitle: r.contactTitle,
|
||||
email: r.email,
|
||||
linkedinUrl: r.linkedinUrl,
|
||||
emailConfidence: r.confidence,
|
||||
phone: (() => { try { return JSON.parse(r.source || "{}").phone ?? null; } catch { return null; } })(),
|
||||
})),
|
||||
finalResults.map(r => {
|
||||
let src: { phone?: string; address?: string } = {};
|
||||
try { src = JSON.parse(r.source || "{}"); } catch { /* ignore */ }
|
||||
return {
|
||||
domain: r.domain,
|
||||
companyName: r.companyName,
|
||||
contactName: r.contactName,
|
||||
contactTitle: r.contactTitle,
|
||||
email: r.email,
|
||||
linkedinUrl: r.linkedinUrl,
|
||||
emailConfidence: r.confidence,
|
||||
phone: src.phone || null,
|
||||
address: src.address || null,
|
||||
};
|
||||
}),
|
||||
"maps",
|
||||
params.queries.join(", "),
|
||||
jobId,
|
||||
|
||||
Reference in New Issue
Block a user