import { ExternalLink, FolderKanban, Plus, Tags, CheckCircle2 } from "lucide-react"; import Link from "next/link"; import { StatsCard } from "@/components/dashboard/stats-card"; import { MotionFade } from "@/components/motion-fade"; import { PortfolioProjectActions } from "@/components/admin/portfolio-project-actions"; import { AppCard } from "@/components/ui/app-card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { CardContent } from "@/components/ui/card"; import { getAdminAppPath } from "@/lib/admin-routing"; import { getSiteSettings } from "@/lib/app-config"; import { getLocalizedPath } from "@/lib/locale"; import { getLocalizedValue, type PortfolioCategoryView, type PortfolioProjectView } from "@/lib/portfolio"; type PortfolioProjectsOverviewProps = { categories: PortfolioCategoryView[]; projects: PortfolioProjectView[]; selectedCategory: string; selectedStatus: "all" | "draft" | "published"; }; const copy = { all: "Alle", newProject: "Neues Projekt", newCategory: "Neues Kategorie", openProject: "Ansehen", untitled: "Unbenanntes Projekt", empty: "Noch keine Projekte vorhanden.", }; export async function PortfolioProjectsOverview({ categories, projects, selectedCategory, }: PortfolioProjectsOverviewProps) { const siteSettings = await getSiteSettings(); return (
project.isPublished).length)} icon={CheckCircle2} />
{categories.map((category) => ( ))}
{projects.map((project, index) => (

{getLocalizedValue(project.title, "de") || copy.untitled}

{project.isPublished ? "Published" : "Draft"} {project.viewMode}
{project.category.name.de || project.category.name.en || project.category.name.ar} {project.projectYear}
))} {projects.length === 0 ? ( {copy.empty} ) : null}
); }