refactor: enhance client portal UI with KPI cards, update dashboard data structures, and improve project status visualization.

This commit is contained in:
poyrazavsever
2026-06-09 00:02:21 +03:00
parent 99d27f3a6a
commit 41c6d86746
3 changed files with 150 additions and 65 deletions
+6 -7
View File
@@ -49,20 +49,19 @@ export default async function DashboardPage() {
.gte("log_date", thirtyDaysAgoStr)
.order("log_date", { ascending: true });
// 5. Fetch calendar events (upcoming)
const { data: events } = await supabase
.from("calendar_events")
// 5. Fetch recent clients
const { data: clients } = await supabase
.from("clients")
.select("*")
.gte("starts_at", todayStr)
.order("starts_at", { ascending: true })
.limit(10);
.order("created_at", { ascending: false })
.limit(5);
const dashboardData = {
tasks: tasks || [],
projects: projects || [],
finances: finances || [],
logs: logs || [],
events: events || [],
clients: clients || [],
};
return <DashboardClient data={dashboardData} />;