Compare commits

...

5 Commits

Author SHA1 Message Date
DanielS
f40268992d merge: resolve wizard conflicts with layout updates and clean fixes
Some checks failed
Staging Build / build (push) Failing after 32s
2026-08-11 22:16:35 +02:00
DanielS
b72e16706e feat(navbar): open dropdown on hover 2026-08-11 22:08:54 +02:00
DanielS
9078b5631a feat(wizard): add directional slide animations 2026-08-11 22:08:47 +02:00
DanielS
1c67cd46bb refactor(wizard): revert basket to direct edit/delete layout 2026-08-11 22:08:40 +02:00
DanielS
5b9a0c609d style: remove text-gradient, use global colors 2026-08-11 22:08:30 +02:00
14 changed files with 87 additions and 106 deletions

View File

@@ -9,7 +9,7 @@ export default async function AdminCategoriesPage() {
<div className="flex-1 space-y-8 p-8 pt-6">
<div className="flex items-center justify-between space-y-2">
<div>
<h2 className="text-3xl font-bold tracking-tight text-gradient flex items-center gap-3">
<h2 className="text-3xl font-bold tracking-tight text-white flex items-center gap-3">
<LayoutGrid className="w-8 h-8 text-primary" />
Kategorien
</h2>

View File

@@ -7,7 +7,7 @@ export default async function AdminOrdersPage() {
<div className="p-8 space-y-6">
<div className="flex justify-between items-center">
<div>
<h1 className="text-3xl font-bold tracking-tight text-gradient">Bestellungen</h1>
<h1 className="text-3xl font-bold tracking-tight text-white">Bestellungen</h1>
<p className="text-slate-400">Verwalten Sie alle Kundenbestellungen und greifen Sie auf generierte Annfragesbestätigungen zu.</p>
</div>
</div>

View File

@@ -41,7 +41,7 @@ export default async function AdminDashboard() {
return (
<div className="p-8 space-y-8">
<h2 className="text-3xl font-bold tracking-tight text-gradient">Dashboard</h2>
<h2 className="text-3xl font-bold tracking-tight text-white">Dashboard</h2>
{/* KPI Cards echte DB-Daten */}
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4">

View File

@@ -10,7 +10,7 @@ export default async function AdminProductsPage() {
<div className="flex-1 space-y-8 p-8 pt-6">
<div className="flex items-center justify-between space-y-2">
<div>
<h2 className="text-3xl font-bold tracking-tight text-gradient flex items-center gap-3">
<h2 className="text-3xl font-bold tracking-tight text-white flex items-center gap-3">
<Package className="w-8 h-8 text-primary" />
Produkte & Module
</h2>

View File

@@ -14,7 +14,7 @@ export default async function AdminUsersPage() {
<div className="flex-1 space-y-8 p-8 pt-6">
<div className="flex items-center justify-between space-y-2">
<div>
<h2 className="text-3xl font-bold tracking-tight text-gradient flex items-center gap-3">
<h2 className="text-3xl font-bold tracking-tight text-white flex items-center gap-3">
<Users className="w-8 h-8 text-primary" />
Benutzerverwaltung
</h2>

View File

@@ -10,7 +10,7 @@ export default async function WysiwygAdminPage() {
<div className="flex-1 space-y-8 p-8 pt-6">
<div className="flex items-center justify-between space-y-2">
<div>
<h2 className="text-3xl font-bold tracking-tight text-gradient flex items-center gap-3">
<h2 className="text-3xl font-bold tracking-tight text-white flex items-center gap-3">
<Edit className="w-8 h-8 text-primary" />
WYSIWYG Live-Editor
</h2>

View File

@@ -2,6 +2,7 @@
@tailwind components;
@tailwind utilities;
html {
color-scheme: dark;
}

View File

@@ -159,7 +159,7 @@ export default async function OrderSuccessPage({
</div>
<div className="flex justify-between text-base font-bold text-white">
<span>Brutto Gesamtbetrag:</span>
<span className={monthlyNet > 0 ? "text-white" : "text-gradient"}>
<span className={monthlyNet > 0 ? "text-white" : "text-primary"}>
{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(oneTimeGross)}
</span>
</div>
@@ -183,7 +183,7 @@ export default async function OrderSuccessPage({
</div>
<div className="flex justify-between text-base font-bold text-white">
<span>Brutto Gesamtbetrag:</span>
<span className="text-gradient">
<span className="text-primary">
{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(monthlyGross)} / Monat
</span>
</div>

View File

@@ -136,10 +136,13 @@ export function NavbarClient({ user, role = "partner" }: NavbarClientProps) {
<div className="h-4 w-px bg-white/10 mx-2" />
{currentUser ? (
<div className="relative">
<div
className="relative"
onMouseEnter={() => setOpen(true)}
onMouseLeave={() => setOpen(false)}
>
<Button
variant="outline"
onClick={() => setOpen(!open)}
className="border-white/10 hover:bg-white/5 gap-2 text-white"
>
<UserIcon className="w-4 h-4 text-primary" />

View File

@@ -44,13 +44,14 @@ export function SetupWizard() {
adminForm.firstName.trim().length > 0 &&
adminForm.lastName.trim().length > 0
// Validation checks for SMTP form (optional step)
// Validation checks for SMTP form
const isSmtpFormValid =
smtpForm.host.trim().length === 0 ||
(!isNaN(Number(smtpForm.port)) && smtpForm.user.trim().length > 0)
smtpForm.host.trim().length > 0 &&
!isNaN(Number(smtpForm.port)) &&
smtpForm.user.trim().length > 0
const handleFinishSetup = async () => {
if (!isAdminFormValid) return
if (!isAdminFormValid || !isSmtpFormValid) return
setLoading(true)
setErrorMsg('')

View File

@@ -7,70 +7,14 @@ import { Check } from 'lucide-react'
interface ProgressStepperProps {
step: number
basketItemsCount: number
orientation?: 'horizontal' | 'vertical'
}
const STEP_LABELS = ['Kunde', 'Modell', 'Software', 'Abschluss']
export function ProgressStepper({ step, basketItemsCount, orientation = 'horizontal' }: ProgressStepperProps) {
export function ProgressStepper({ step, basketItemsCount }: ProgressStepperProps) {
// Calculate progress percentage for active line (Step 1: 0%, Step 2: 33.3%, Step 3: 66.6%, Step 4: 100%)
const progressPercent = ((step - 1) / 3) * 100
if (orientation === 'vertical') {
return (
<div className="flex flex-col gap-6 relative py-2 pl-2">
{/* Background Line */}
<div className="absolute left-[20px] top-[20px] bottom-[20px] w-[2px] bg-slate-800 z-0 rounded-full" />
{/* Animated Active Line */}
<motion.div
className="absolute left-[20px] top-[20px] w-[2px] bg-gradient-to-b from-blue-600 via-sky-400 to-cyan-400 z-0 rounded-full shadow-[0_0_12px_rgba(56,189,248,0.8)]"
initial={{ height: '0%' }}
animate={{ height: `${progressPercent}%` }}
transition={{ duration: 0.5, ease: [0.25, 0.1, 0.25, 1] }}
/>
{[1, 2, 3, 4].map(s => {
const isDone = step > s
const isActive = step === s
return (
<div key={s} className="relative z-10 flex items-center gap-3">
<motion.div
initial={false}
animate={{
scale: isActive ? 1.1 : 1,
}}
transition={{ type: 'spring', stiffness: 300, damping: 20 }}
className={`w-9 h-9 rounded-full flex items-center justify-center font-bold text-xs shrink-0 transition-all duration-300 ${
isDone
? 'bg-sky-500 text-slate-950 shadow-[0_0_15px_rgba(56,189,248,0.6)] border-2 border-sky-400'
: isActive
? 'bg-slate-950 border-2 border-sky-400 text-sky-400 shadow-[0_0_20px_rgba(56,189,248,0.7)]'
: 'bg-slate-900 border-2 border-slate-800 text-slate-500'
}`}
>
{isDone ? <Check className="w-4 h-4 stroke-[3]" /> : s}
</motion.div>
<span
className={`text-xs font-semibold tracking-wide transition-colors duration-300 flex items-center gap-1.5 ${
isActive || isDone ? 'text-sky-300' : 'text-slate-500'
}`}
>
{STEP_LABELS[s - 1]}
{s === 3 && basketItemsCount > 0 && (
<span className="bg-sky-500 text-slate-950 text-[10px] w-4 h-4 rounded-full flex items-center justify-center font-extrabold shadow-sm">
{basketItemsCount}
</span>
)}
</span>
</div>
)
})}
</div>
)
}
return (
<div className="max-w-xl mx-auto mb-10 px-4">
<div className="flex justify-between relative">

View File

@@ -229,12 +229,12 @@ export function StepSoftware({
{/* Modules */}
{selectedProduct?.modules && selectedProduct.modules.length > 0 && (
<div className="mt-6 p-5 rounded-2xl bg-slate-900/60 border border-slate-800 space-y-4 shadow-lg">
<p className="text-xs font-bold uppercase tracking-wider text-slate-400 flex items-center gap-2">
<span className="w-2 h-2 rounded-full bg-primary animate-pulse" />
<div className="mt-6 p-5 rounded-2xl bg-white/5 border border-white/10 space-y-4">
<p className="text-sm font-bold text-white flex items-center gap-2">
<span className="w-1.5 h-1.5 rounded-full bg-primary" />
Zusatzmodule für {selectedProduct.name}
</p>
<div className="space-y-3">
<div className="space-y-2.5">
{selectedProduct.modules.map(module => {
const isExistingLicense = existingModuleIds.includes(module.id)
const disabled = isExistingLicense || isModuleDisabled(module, sel?.moduleIds ?? [])
@@ -242,14 +242,14 @@ export function StepSoftware({
return (
<div
key={module.id}
className={`flex flex-col p-4 rounded-xl border transition-all duration-300 ${
className={`flex flex-col p-4 rounded-xl border transition-all duration-200 ${
isExistingLicense
? 'border-slate-800 bg-slate-900/30 opacity-60 cursor-not-allowed'
? 'border-primary/20 bg-primary/5 opacity-75'
: disabled
? 'border-slate-800/40 bg-slate-900/20 opacity-40 cursor-not-allowed'
? 'border-white/5 bg-white/5 opacity-40'
: checked
? 'border-primary/40 bg-primary/10 shadow-[0_0_15px_rgba(59,130,246,0.1)]'
: 'border-slate-800 bg-slate-900/50 hover:bg-slate-900 hover:border-slate-700'
? 'border-primary/30 bg-primary/5'
: 'border-white/5 bg-white/5 hover:bg-white/10'
}`}
>
<div className="flex items-start space-x-3">
@@ -258,19 +258,19 @@ export function StepSoftware({
checked={checked}
onCheckedChange={() => !isExistingLicense && toggleModule(currentCategory.id, module.id)}
disabled={disabled}
className="rounded border-slate-700 data-[state=checked]:bg-primary data-[state=checked]:border-primary transition-colors"
className="rounded border-white/20 data-[state=checked]:bg-primary"
/>
<div className="flex-1">
<Label
htmlFor={isExistingLicense ? undefined : `mod-${currentCategory.id}-${module.id}`}
className={`font-semibold text-sm flex justify-between text-white ${
isExistingLicense ? 'cursor-not-allowed' : disabled ? 'cursor-not-allowed' : 'cursor-pointer'
isExistingLicense ? 'cursor-default' : disabled ? 'cursor-not-allowed' : 'cursor-pointer'
}`}
>
<span className="flex items-center gap-2 flex-wrap">
<span className="flex items-center gap-1.5 flex-wrap">
{module.name}
{isExistingLicense && (
<span className="inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded bg-slate-800 text-slate-400 border border-slate-700 font-semibold uppercase tracking-wider">
<span className="inline-flex items-center gap-1 text-[9px] px-1.5 py-0.5 rounded bg-primary/20 text-primary border border-primary/30 font-bold uppercase tracking-wider">
<Lock className="w-2.5 h-2.5" /> Bereits lizenziert
</span>
)}

View File

@@ -70,7 +70,7 @@ export function StepSummary({
<div className="lg:col-span-5 flex flex-col h-full overflow-hidden pr-4 space-y-6">
<div className="flex-1 overflow-y-auto pr-1 space-y-6 pb-4 subpixel-antialiased scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent">
{/* Header */}
{/* Header & Status Stepper */}
<div className="space-y-4">
<div className="flex items-center gap-3">
<div className="w-12 h-12 bg-primary/20 rounded-xl flex items-center justify-center border border-primary/50 shrink-0">
@@ -85,6 +85,39 @@ export function StepSummary({
</p>
</div>
</div>
{/* Vertikaler Status-Stepper */}
<div className="space-y-4 py-4 border-t border-b border-white/5">
<p className="text-[10px] font-bold uppercase tracking-wider text-slate-500">
Schritt 4 von 4 Zusammenfassung & Abschluss
</p>
<div className="flex flex-col gap-3 pl-1">
<div className="flex items-center gap-3">
<div className="w-6 h-6 rounded-full bg-green-500/20 border border-green-500/35 flex items-center justify-center text-green-400 text-xs">
<Icons.Check className="w-3.5 h-3.5" />
</div>
<span className="text-sm text-slate-400 font-medium">Kunde</span>
</div>
<div className="flex items-center gap-3">
<div className="w-6 h-6 rounded-full bg-green-500/20 border border-green-500/35 flex items-center justify-center text-green-400 text-xs">
<Icons.Check className="w-3.5 h-3.5" />
</div>
<span className="text-sm text-slate-400 font-medium">Modell</span>
</div>
<div className="flex items-center gap-3">
<div className="w-6 h-6 rounded-full bg-green-500/20 border border-green-500/35 flex items-center justify-center text-green-400 text-xs">
<Icons.Check className="w-3.5 h-3.5" />
</div>
<span className="text-sm text-slate-400 font-medium">Software</span>
</div>
<div className="flex items-center gap-3">
<div className="w-6 h-6 rounded-full bg-primary/20 border border-primary text-primary flex items-center justify-center text-xs font-bold shadow-[0_0_10px_rgba(59,130,246,0.2)]">
4
</div>
<span className="text-sm text-white font-bold">Abschluss</span>
</div>
</div>
</div>
</div>
{/* Kunden-Info Card */}

View File

@@ -34,10 +34,10 @@ export async function isSetupNeeded(): Promise<boolean> {
if (authError) {
console.error('Error checking auth users list:', authError)
return true
return false
}
if (authData && authData.users && authData.users.length > 0) {
if (authData.users.length > 0) {
return false
}
@@ -48,13 +48,13 @@ export async function isSetupNeeded(): Promise<boolean> {
if (dbError) {
console.error('Error checking users table status:', dbError)
return true
return false
}
return count === 0
} catch (e) {
console.error('Exception checking setup status:', e)
return true
return false
}
}
@@ -113,8 +113,7 @@ export async function completeSetup(
console.error('Error updating admin profile:', profileError)
}
// 5. Store SMTP configuration in public.settings (optional)
if (smtpData.host && smtpData.host.trim().length > 0) {
// 5. Store SMTP configuration in public.settings
const { error: smtpError } = await admin
.from('settings')
.upsert({
@@ -129,7 +128,7 @@ export async function completeSetup(
if (smtpError) {
console.error('Error saving SMTP settings:', smtpError)
}
return { success: false, error: `Fehler beim Speichern der SMTP-Einstellungen: ${smtpError.message}` }
}
revalidatePath('/')