import { Metadata } from 'next' import { Calendar, CheckCircle2, Clock, ListTodo, Plus, UserRoundCheck } from 'lucide-react' import { Button } from '@/components/ui/button' import { Card } from '@/components/ui/card' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' import { auth } from '@/auth' import { redirect } from 'next/navigation' import { db } from '@/lib/db' export const metadata: Metadata = { title: 'Dashboard', description: 'Task management and team collaboration dashboard' } export default async function DashboardPage() { const session = await auth() if (!session) { redirect('/login') } // Fetch tasks (placeholder - implement actual DB queries) const tasks = [ { id: 1, title: 'Design new landing page', status: 'In Progress', dueDate: '2023-12-01', progress: 60 }, { id: 2, title: 'Implement authentication', status: 'Todo', dueDate: '2023-12-05', progress: 0 }, { id: 3, title: 'Write documentation', status: 'Done', dueDate: '2023-11-30', progress: 100 } ] return (

Dashboard

Overview Tasks Calendar
Total Tasks
12
In Progress
4
Completed
8
Team Members
6

Recent Tasks

{tasks.map(task => (

{task.title}

Due: {task.dueDate}

{task.status}
))}

Upcoming Deadlines

Design Review

Tomorrow at 2:00 PM

Team Meeting

Friday at 10:00 AM

All Tasks

{/* Todo Column */}

Todo

{tasks.filter(t => t.status === 'Todo').map(task => (
{task.title}

Due: {task.dueDate}

))}
{/* In Progress Column */}

In Progress

{tasks.filter(t => t.status === 'In Progress').map(task => (
{task.title}

Due: {task.dueDate}

))}
{/* Done Column */}

Done

{tasks.filter(t => t.status === 'Done').map(task => (
{task.title}

Due: {task.dueDate}

))}

Calendar

{/* Today's Schedule */}

Today's Schedule

09:00 AM
Team Standup

Daily team sync meeting

02:00 PM
Design Review

Review new landing page design

04:30 PM
Sprint Planning

Plan next sprint tasks

{/* Upcoming Events */}

Upcoming Events

Tomorrow
Client Meeting

10:00 AM - Project update discussion

Friday
Team Building

02:00 PM - Virtual team activity

) }