Integrate local business workflow and SaaS redesign

This commit is contained in:
2026-06-12 21:08:35 +02:00
parent f00c5a3193
commit 21c7e4c9a4
88 changed files with 2683 additions and 849 deletions

View File

@@ -4,7 +4,7 @@ import { useMemo, useState } from "react";
import { useQuery } from "convex/react";
import { FunctionReturnType } from "convex/server";
import { Activity, Files, SquarePen } from "lucide-react";
import { Activity, Files, FileSearch, SquarePen } from "lucide-react";
import Link from "next/link";
import { api } from "@/convex/_generated/api";
@@ -80,9 +80,9 @@ function getStageLabel(stage: string) {
function AuditsBoardLoading() {
return (
<section className="space-y-4">
<header className="space-y-2">
<p className="text-sm text-muted-foreground">Interne Audit-Übersicht</p>
<h1 className="text-2xl font-semibold tracking-normal">Audits</h1>
<header className="agency-panel space-y-2 p-4">
<p className="agency-kicker">Evidence Dossier</p>
<h1 className="font-heading text-2xl font-semibold tracking-normal">Audits</h1>
<p className="text-sm text-muted-foreground">Audits werden geladen...</p>
</header>
<div className="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">
@@ -149,12 +149,12 @@ export function AuditsBoard() {
if (rows.length === 0) {
return (
<section className="space-y-4">
<header className="space-y-2">
<p className="text-sm text-muted-foreground">Interne Audit-Übersicht</p>
<h1 className="text-2xl font-semibold tracking-normal">Audits</h1>
<header className="agency-panel space-y-2 p-4">
<p className="agency-kicker">Evidence Dossier</p>
<h1 className="font-heading text-2xl font-semibold tracking-normal">Audits</h1>
</header>
<Card>
<Card className="agency-panel">
<CardHeader>
<h2 className="text-sm font-medium">Noch keine Audits</h2>
<CardDescription>
@@ -169,16 +169,20 @@ export function AuditsBoard() {
return (
<section className="space-y-4">
<header className="space-y-2">
<p className="text-sm text-muted-foreground">Interne Audit-Übersicht</p>
<h1 className="text-2xl font-semibold tracking-normal">Audits</h1>
<header className="agency-panel space-y-2 p-4">
<p className="agency-kicker">Evidence Dossier</p>
<h1 className="font-heading text-2xl font-semibold tracking-normal">Audits</h1>
<p className="max-w-3xl text-sm leading-6 text-muted-foreground">
Laufende Generierungen, veröffentlichbare Audits und Fehlerzustände
als Prüfmappe statt lose Datensatzliste.
</p>
</header>
<div className="flex flex-wrap gap-2" aria-label="Audit-Filter">
{auditStatusFilters.map((filter) => (
<button
aria-pressed={activeFilter === filter.value}
className="inline-flex min-h-8 items-center gap-2 rounded-md border px-3 py-1 text-sm text-muted-foreground transition-colors hover:bg-muted aria-pressed:border-foreground aria-pressed:text-foreground"
className="agency-tab"
key={filter.value}
onClick={() => setActiveFilter(filter.value)}
type="button"
@@ -199,14 +203,15 @@ export function AuditsBoard() {
return (
<Card
aria-labelledby={rowTitleId}
className="flex min-w-0 flex-col"
className="agency-panel flex min-w-0 flex-col overflow-hidden"
key={row.id}
>
<CardHeader className="gap-3">
<div className="flex flex-wrap items-start justify-between gap-2">
<div className="min-w-0">
<CardDescription>
{row.kind === "audit" ? "Audit" : "Pipeline"}
<CardDescription className="inline-flex items-center gap-2">
<FileSearch className="size-3.5" aria-hidden="true" />
{row.kind === "audit" ? "Audit Evidence" : "Pipeline Evidence"}
</CardDescription>
<CardTitle className="mt-1 break-words text-base" id={rowTitleId}>
{row.title}
@@ -222,11 +227,11 @@ export function AuditsBoard() {
<CardContent className="flex flex-1 flex-col gap-4">
<div className="grid gap-3 text-sm">
<div className="min-w-0">
<div className="evidence-surface min-w-0 rounded-md px-3 py-2">
<p className="text-xs font-medium text-muted-foreground">Domain</p>
<p className="mt-1 break-all">{row.checkedDomain}</p>
</div>
<div className="min-w-0">
<div className="min-w-0 rounded-md border border-border/75 bg-background/60 p-3">
<p className="text-xs font-medium text-muted-foreground">
{row.kind === "audit" ? "Seiten" : "Phase"}
</p>
@@ -244,14 +249,14 @@ export function AuditsBoard() {
)}
</p>
</div>
<div className="min-w-0">
<div className="min-w-0 rounded-md bg-muted/45 p-3">
<p className="text-xs font-medium text-muted-foreground">Slug</p>
<p className="mt-1 break-words text-muted-foreground">
{row.kind === "generation" ? `Run ${row.runId}` : row.title}
</p>
</div>
{row.kind === "generation" && row.errorSummary ? (
<p className="break-words rounded-md border bg-muted/20 px-3 py-2 text-xs text-muted-foreground">
<p className="break-words rounded-md border border-destructive/30 bg-[var(--danger-soft)] px-3 py-2 text-xs text-destructive">
{row.errorSummary}
</p>
) : null}
@@ -260,7 +265,7 @@ export function AuditsBoard() {
<div className="mt-auto flex justify-end">
{row.kind === "audit" ? (
<Link
className="inline-flex min-h-8 items-center gap-1 rounded-md px-2 text-sm text-primary hover:bg-muted"
className="inline-flex min-h-8 items-center gap-1 rounded-md px-2 text-sm font-semibold text-primary hover:bg-muted"
href={row.detailHref}
>
<SquarePen className="size-4" aria-hidden="true" />
@@ -277,7 +282,7 @@ export function AuditsBoard() {
);
})}
{visibleRows.length === 0 ? (
<Card className="sm:col-span-2 xl:col-span-3">
<Card className="agency-panel sm:col-span-2 xl:col-span-3">
<CardHeader>
<CardTitle>Keine Treffer</CardTitle>
<CardDescription>