diff --git a/components/admin/portfolio-project-form.tsx b/components/admin/portfolio-project-form.tsx index 4fcc06b..1e38d6c 100644 --- a/components/admin/portfolio-project-form.tsx +++ b/components/admin/portfolio-project-form.tsx @@ -3,10 +3,13 @@ import type { PortfolioProjectViewMode, PortfolioSectionType } from "@/lib/db/enums"; import { ArrowDown, + ArrowLeft, + ArrowRight, ArrowUp, BookOpenText, BriefcaseBusiness, CalendarDays, + Check, CircleAlert, FolderTree, Grid2x2, @@ -19,7 +22,7 @@ import { UserRound, } from "lucide-react"; import Link from "next/link"; -import { type ReactNode, useEffect, useRef, useState } from "react"; +import { Fragment, type ReactNode, useEffect, useRef, useState } from "react"; import { useFormStatus } from "react-dom"; import { MediaFieldPicker, type MediaFieldState } from "@/components/admin/media-field-picker"; @@ -50,6 +53,8 @@ import { getPortfolioWizardProgress, isPortfolioAssetReady, isPortfolioSectionReady, + type PortfolioWizardStep, + type PortfolioWizardStepState, } from "@/lib/portfolio-form-progress"; import type { MediaOption } from "@/lib/media"; import type { PortfolioCategoryView, PortfolioProjectView } from "@/lib/portfolio"; @@ -145,6 +150,65 @@ const viewModeOptions: Array<{ { value: "CASE_STUDY", label: "Case Study", description: "Structured challenge/solution/outcome view. Sections 1–3 become the lead panels.", icon: BriefcaseBusiness }, ]; +const WIZARD_STEPS: Array<{ key: PortfolioWizardStep; label: string; description: string }> = [ + { key: "basics", label: "Grundlagen", description: "Kategorie & Metadaten" }, + { key: "content", label: "Inhalte", description: "Lokalisierte Texte" }, + { key: "sections", label: "Abschnitte", description: "Projektgeschichte" }, + { key: "assets", label: "Medien", description: "Cover & Galerie" }, +]; + +function WizardStepper({ + activeKey, + progress, + onSelect, +}: { + activeKey: PortfolioWizardStep; + progress: PortfolioWizardStepState[]; + onSelect: (key: PortfolioWizardStep) => void; +}) { + return ( +
- Fill Basics and Localized Content to publish — or save as a draft anytime. -
- ) : ( -- Ready to save. Sections and assets are optional. -
- )} +