Files
lead-scraper/components/shared/ExportButtons.tsx
Timo Uttenweiler 115cdacd08 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>
2026-03-21 18:12:31 +01:00

30 lines
917 B
TypeScript

"use client";
import { Button } from "@/components/ui/button";
import { FileSpreadsheet } from "lucide-react";
import { exportToExcel, type ExportRow } from "@/lib/utils/csv";
interface ExportButtonsProps {
rows: ExportRow[];
filename: string;
disabled?: boolean;
summary?: string;
}
export function ExportButtons({ rows, filename, disabled, summary }: ExportButtonsProps) {
return (
<div className="flex items-center gap-3 flex-wrap">
{summary && <span className="text-sm text-gray-400">{summary}</span>}
<Button
variant="outline"
size="sm"
disabled={disabled || rows.length === 0}
onClick={() => exportToExcel(rows, `${filename}.xlsx`)}
className="border-[#2e2e3e] hover:border-purple-500/50 hover:bg-purple-500/5 text-gray-300"
>
<FileSpreadsheet className="w-4 h-4 mr-1.5" /> Excel herunterladen
</Button>
</div>
);
}