UI improvements: Leadspeicher, Maps enrichment, exports
- Rename LeadVault → Leadspeicher throughout (sidebar, topbar, page) - SidePanel: full lead detail view with contact, source, tags (read-only), Google Maps link for address - Tags: kontaktiert stored as tag (toggleable), favorit tag toggle - Remove Status column, StatusBadge dropdown, Priority feature - Remove Aktualisieren button from Leadspeicher - Bulk actions: remove status dropdown - Export: LeadVault Excel-only, clean columns, freeze row + autofilter - Export dropdown: click-based (fix overflow-hidden clipping) - ExportButtons: remove CSV, Excel only everywhere - Maps page: post-search Anymailfinder enrichment button - ProgressCard: "Suche läuft..." instead of "Warte auf Anymailfinder-Server..." - Quick SERP renamed to "Schnell neue Suche" - Results page: Excel export, always-enabled download button - Anymailfinder: fix bulk field names, array-of-arrays format - Apify: fix countryCode lowercase - API: sourceTerm search, contacted/favorite tag filters Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,17 +28,29 @@ export async function GET(
|
||||
error: job.error,
|
||||
createdAt: job.createdAt,
|
||||
updatedAt: job.updatedAt,
|
||||
results: job.results.map(r => ({
|
||||
id: r.id,
|
||||
companyName: r.companyName,
|
||||
domain: r.domain,
|
||||
contactName: r.contactName,
|
||||
contactTitle: r.contactTitle,
|
||||
email: r.email,
|
||||
confidence: r.confidence,
|
||||
linkedinUrl: r.linkedinUrl,
|
||||
createdAt: r.createdAt,
|
||||
})),
|
||||
results: job.results.map(r => {
|
||||
let address: string | null = null;
|
||||
let phone: string | null = null;
|
||||
if (r.source) {
|
||||
try {
|
||||
const src = JSON.parse(r.source) as { address?: string; phone?: string };
|
||||
address = src.address ?? null;
|
||||
phone = src.phone ?? null;
|
||||
} catch { /* ignore */ }
|
||||
}
|
||||
return {
|
||||
id: r.id,
|
||||
companyName: r.companyName,
|
||||
domain: r.domain,
|
||||
contactName: r.contactName,
|
||||
contactTitle: r.contactTitle,
|
||||
email: r.email,
|
||||
linkedinUrl: r.linkedinUrl,
|
||||
address,
|
||||
phone,
|
||||
createdAt: r.createdAt,
|
||||
};
|
||||
}),
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("GET /api/jobs/[id]/status error:", err);
|
||||
|
||||
@@ -83,7 +83,6 @@ async function runEnrichment(
|
||||
contactName: result.person_full_name || null,
|
||||
contactTitle: result.person_job_title || null,
|
||||
email: result.email || null,
|
||||
confidence: result.valid_email ? 1.0 : result.email_status === "risky" ? 0.5 : 0,
|
||||
linkedinUrl: result.person_linkedin_url || null,
|
||||
source: JSON.stringify({ email_status: result.email_status, category: result.decision_maker_category }),
|
||||
},
|
||||
@@ -104,7 +103,6 @@ async function runEnrichment(
|
||||
contactTitle: r.person_job_title || null,
|
||||
email: r.email || null,
|
||||
linkedinUrl: r.person_linkedin_url || null,
|
||||
emailConfidence: r.valid_email ? 1.0 : r.email_status === "risky" ? 0.5 : 0,
|
||||
})),
|
||||
"airscale",
|
||||
undefined,
|
||||
|
||||
@@ -110,7 +110,6 @@ async function runLinkedInEnrich(
|
||||
where: { id: result.id },
|
||||
data: {
|
||||
email: email || null,
|
||||
confidence: isValid ? 1.0 : emailStatus === "risky" ? 0.5 : 0,
|
||||
contactName: row["person_full_name"] || row["Full Name"] || result.contactName || null,
|
||||
contactTitle: row["person_job_title"] || row["Job Title"] || result.contactTitle || null,
|
||||
},
|
||||
@@ -135,7 +134,6 @@ async function runLinkedInEnrich(
|
||||
where: { id: r.id },
|
||||
data: {
|
||||
email: found.email || null,
|
||||
confidence: isValid ? 1.0 : found.email_status === "risky" ? 0.5 : 0,
|
||||
contactName: found.person_full_name || r.contactName || null,
|
||||
contactTitle: found.person_job_title || r.contactTitle || null,
|
||||
},
|
||||
@@ -162,7 +160,6 @@ async function runLinkedInEnrich(
|
||||
contactTitle: r.contactTitle,
|
||||
email: r.email,
|
||||
linkedinUrl: r.linkedinUrl,
|
||||
emailConfidence: r.confidence,
|
||||
})),
|
||||
"linkedin",
|
||||
undefined,
|
||||
|
||||
@@ -99,6 +99,8 @@ async function runMapsEnrich(
|
||||
companyName: p.name || null,
|
||||
phone: p.phone,
|
||||
address: p.address,
|
||||
description: p.description,
|
||||
industry: p.category,
|
||||
})),
|
||||
"maps",
|
||||
params.queries.join(", "),
|
||||
@@ -132,7 +134,7 @@ async function runMapsEnrich(
|
||||
);
|
||||
|
||||
for (const result of enrichResults) {
|
||||
const hasEmail = !!result.valid_email;
|
||||
const hasEmail = !!result.email;
|
||||
if (hasEmail) emailsFound++;
|
||||
|
||||
const resultId = domainToResultId.get(result.domain || "");
|
||||
@@ -144,7 +146,6 @@ async function runMapsEnrich(
|
||||
contactName: result.person_full_name || null,
|
||||
contactTitle: result.person_job_title || null,
|
||||
email: result.email || null,
|
||||
confidence: result.valid_email ? 1.0 : result.email_status === "risky" ? 0.5 : 0,
|
||||
linkedinUrl: result.person_linkedin_url || null,
|
||||
},
|
||||
});
|
||||
@@ -167,7 +168,6 @@ async function runMapsEnrich(
|
||||
contactTitle: r.person_job_title || null,
|
||||
email: r.email || null,
|
||||
linkedinUrl: r.person_linkedin_url || null,
|
||||
emailConfidence: r.valid_email ? 1.0 : r.email_status === "risky" ? 0.5 : 0,
|
||||
})),
|
||||
"maps",
|
||||
params.queries.join(", "),
|
||||
|
||||
@@ -122,7 +122,6 @@ async function runSerpEnrich(
|
||||
contactName: result.person_full_name || null,
|
||||
contactTitle: result.person_job_title || null,
|
||||
email: result.email || null,
|
||||
confidence: result.valid_email ? 1.0 : result.email_status === "risky" ? 0.5 : 0,
|
||||
linkedinUrl: result.person_linkedin_url || null,
|
||||
source: JSON.stringify({
|
||||
url: serpData?.url,
|
||||
@@ -150,7 +149,6 @@ async function runSerpEnrich(
|
||||
contactTitle: r.person_job_title || null,
|
||||
email: r.email || null,
|
||||
linkedinUrl: r.person_linkedin_url || null,
|
||||
emailConfidence: r.valid_email ? 1.0 : r.email_status === "risky" ? 0.5 : 0,
|
||||
serpTitle: serpData?.title || null,
|
||||
serpSnippet: serpData?.description || null,
|
||||
serpRank: serpData?.position ?? null,
|
||||
|
||||
Reference in New Issue
Block a user