diff --git a/packages/frontend/src/shell/DashboardPage.module.css b/packages/frontend/src/shell/DashboardPage.module.css index 869b171..89601f4 100644 --- a/packages/frontend/src/shell/DashboardPage.module.css +++ b/packages/frontend/src/shell/DashboardPage.module.css @@ -17,3 +17,80 @@ margin: 0; color: var(--color-text); } + +/* ── Tabs ── */ + +.tabBar { + display: flex; + gap: 0; + border-bottom: 2px solid var(--color-border); + margin-bottom: 1.75rem; +} + +.tab { + padding: 0.625rem 1.375rem; + background: none; + border: none; + border-bottom: 2px solid transparent; + margin-bottom: -2px; + font-size: 0.9375rem; + font-weight: 500; + color: var(--color-text-muted); + cursor: pointer; + transition: color 0.15s, border-color 0.15s; + white-space: nowrap; +} + +.tab:hover { + color: var(--color-text); +} + +.activeTab { + color: var(--color-primary); + border-bottom-color: var(--color-primary); + font-weight: 600; +} + +.tabContent { + min-height: 200px; +} + +/* ── Platzhalter für bestehenden Home-Inhalt ── */ + +.placeholder { + background: var(--color-bg-card); + border-radius: var(--radius-md); + padding: 1.5rem; + box-shadow: var(--shadow-sm); + border: 1px solid var(--color-border); +} + +/* ── Coming Soon ── */ + +.comingSoon { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 4rem 2rem; + text-align: center; + gap: 0.5rem; +} + +.comingSoonIcon { + font-size: 2.5rem; + margin-bottom: 0.5rem; +} + +.comingSoonTitle { + font-size: 1.125rem; + font-weight: 600; + color: var(--color-text); + margin: 0; +} + +.comingSoonSub { + font-size: 0.9375rem; + color: var(--color-text-muted); + margin: 0; +} diff --git a/packages/frontend/src/shell/DashboardPage.tsx b/packages/frontend/src/shell/DashboardPage.tsx index 233af3b..352f05a 100644 --- a/packages/frontend/src/shell/DashboardPage.tsx +++ b/packages/frontend/src/shell/DashboardPage.tsx @@ -1,38 +1,95 @@ +import { useState } from 'react'; import { useAuth } from '../auth/AuthContext'; import { WeatherWidget } from '../components/WeatherWidget'; import { EventCountdownTiles } from '../components/EventCountdownTiles'; import styles from './DashboardPage.module.css'; -export function DashboardPage() { - const { user } = useAuth(); +type DashboardTab = 'home' | 'emails' | 'calendar' | 'tasks' | 'contacts'; +const TABS: { id: DashboardTab; label: string }[] = [ + { id: 'home', label: 'Home' }, + { id: 'emails', label: 'E-Mail' }, + { id: 'calendar', label: 'Kalender' }, + { id: 'tasks', label: 'Aufgaben' }, + { id: 'contacts', label: 'Kontakte' }, +]; + +// ── Tab-Inhalte ─────────────────────────────────────────────────────────────── + +function HomeTab({ firstName, lastName, city, role }: { + firstName?: string; + lastName?: string; + city?: string | null; + role?: string; +}) { return ( -
- {/* Header: Titel links, Wetter rechts */} + <>

- Willkommen, {user?.firstName} {user?.lastName} + Willkommen, {firstName} {lastName}

- +
- - {/* Messe-Countdown-Kacheln */} - -
+

INSIGHT Platform - Sprint 1 Alpha

- Rolle: {user?.role} + Rolle: {role}

+ + ); +} + +function ComingSoonTab({ label }: { label: string }) { + return ( +
+ 🚧 +

{label}

+

Inhalt folgt in Kürze.

+
+ ); +} + +// ── Main ────────────────────────────────────────────────────────────────────── + +export function DashboardPage() { + const { user } = useAuth(); + const [activeTab, setActiveTab] = useState('home'); + + return ( +
+ {/* Tab-Leiste */} +
+ {TABS.map((tab) => ( + + ))} +
+ + {/* Tab-Inhalt */} +
+ {activeTab === 'home' && ( + + )} + {activeTab === 'emails' && } + {activeTab === 'calendar' && } + {activeTab === 'tasks' && } + {activeTab === 'contacts' && } +
); }