"use client"; /* ─── SVG Node Icons ──────────────────────────────────────────────────── */ function IconInbox({ color = "currentColor", size = 20 }: { color?: string; size?: number }) { return ( ); } function IconClipboard({ color = "currentColor", size = 20 }: { color?: string; size?: number }) { return ( ); } function IconUser({ color = "currentColor", size = 20 }: { color?: string; size?: number }) { return ( ); } function IconPackage({ color = "currentColor", size = 20 }: { color?: string; size?: number }) { return ( ); } function IconCalendar({ color = "currentColor", size = 20 }: { color?: string; size?: number }) { return ( ); } function IconCheckCircle({ color = "currentColor", size = 20 }: { color?: string; size?: number }) { return ( ); } function IconReceipt({ color = "currentColor", size = 20 }: { color?: string; size?: number }) { return ( ); } /* ─── Data ────────────────────────────────────────────────────────────── */ const nodes = [ { id: "inbox", title: "Anfrage eingeht", desc: "Formular, E-Mail, Telefon", color: "#4F46E5", Icon: IconInbox }, { id: "order", title: "Auftrag erstellt", desc: "Automatisch aus Anfrage", color: "#F1B729", Icon: IconClipboard }, { id: "assign", title: "Techniker zuweisen", desc: "Basierend auf Verfügbarkeit", color: "#0D6E6E", Icon: IconUser }, { id: "material", title: "Material bestellen", desc: "Automatisch reserviert", color: "#F97316", Icon: IconPackage }, { id: "schedule", title: "Einsatz geplant", desc: "Termin nach Kapazität", color: "#3B82F6", Icon: IconCalendar }, { id: "done", title: "Arbeit erledigt", desc: "Dokumentiert via App", color: "#22C55E", Icon: IconCheckCircle }, { id: "invoice", title: "Rechnung versendet", desc: "Automatisch per Mail", color: "#8B5CF6", Icon: IconReceipt }, ]; /* ─── Arrow between nodes ─────────────────────────────────────────────── */ function Arrow() { return (
); } function ArrowDown() { return (
); } /* ─── Variant 1: Horizontal Pipeline (n8n style) ─────────────────────── */ function WorkflowVariant1() { return (

Variante 1 — Horizontal Pipeline (n8n-Stil)

{nodes.map((node, i) => (
{/* Node card */}
{/* Icon */}
{/* Text */}
{node.title} {node.desc}
{/* Arrow */} {i < nodes.length - 1 && }
))}
); } /* ─── Variant 2: Vertical with connector lines ───────────────────────── */ function WorkflowVariant2() { return (

Variante 2 — Vertikale Node-Kette

{nodes.map((node, i) => (
{/* Step number */}
{i + 1}
{/* Icon */}
{/* Text */}
{node.title} {node.desc}
{i < nodes.length - 1 && }
))}
); } /* ─── Variant 3: Canvas-style with zigzag ─────────────────────────────── */ function WorkflowVariant3() { return (

Variante 3 — Canvas mit Verbindungen

{/* SVG connection paths */} {/* Row 1: node 0 → 1 → 2 → 3 */} {/* Down from node 3 to row 2 */} {/* Row 2 (reversed): node 3 → 4 → 5 → 6 */} {/* Arrow tips (small circles at endpoints) */} {[280, 550, 820].map((x) => )} {[735, 465, 195].map((x) => )} {/* Row 1 */}
{nodes.slice(0, 4).map((node, i) => (
))}
{/* Row 2 — reversed direction */}
{nodes.slice(4).reverse().map((node, i) => { const origIdx = nodes.indexOf(node); return (
); })}
); } function NodeCard({ node, index }: { node: typeof nodes[0]; index: number }) { return (
{node.title} {node.desc}
{/* Handle dots — n8n style */}
); } /* ─── Stats Bar ───────────────────────────────────────────────────────── */ function StatsBar() { const stats = [ { num: "7", label: "Automatisierte Schritte", color: "var(--text-primary)" }, { num: "0", label: "Manuelle Klicks", color: "var(--accent-yellow-dark)" }, { num: "<2 Min", label: "Durchlaufzeit", color: "var(--accent-teal)" }, { num: "100%", label: "Dokumentiert", color: "#22C55E" }, ]; return (
{stats.map((s, i) => (
{s.num} {s.label}
{i < stats.length - 1 &&
}
))}
); } /* ─── Main Export ─────────────────────────────────────────────────────── */ export default function WorkflowShowcase() { return (
WORKFLOW

Von der Anfrage bis zur Rechnung

Drei Workflow-Visualisierungen im n8n-Stil. Jeder Node ist ein automatisierter Schritt.

); }