From ddcc9f85a8938bb969673362f739d7bb83546bed Mon Sep 17 00:00:00 2001 From: Aleksandar Date: Wed, 10 Dec 2025 14:00:43 +0100 Subject: [PATCH] Feature/UI: updated layout, page, cards, sidebar, stats, user management --- apps/admin/src/app/layout.tsx | 2 +- apps/admin/src/app/page.tsx | 170 +++++-- apps/admin/src/components/ui/Sidebar.tsx | 29 +- apps/admin/src/components/ui/StatsCard.tsx | 87 ++-- apps/admin/src/components/ui/card.tsx | 8 + .../src/components/users/UserManagement.tsx | 455 +++++++++++------- 6 files changed, 473 insertions(+), 278 deletions(-) diff --git a/apps/admin/src/app/layout.tsx b/apps/admin/src/app/layout.tsx index 8ae151c..ea43760 100644 --- a/apps/admin/src/app/layout.tsx +++ b/apps/admin/src/app/layout.tsx @@ -26,7 +26,7 @@ export default function RootLayout({ -
+
{children} diff --git a/apps/admin/src/app/page.tsx b/apps/admin/src/app/page.tsx index a0d682a..3324733 100644 --- a/apps/admin/src/app/page.tsx +++ b/apps/admin/src/app/page.tsx @@ -1,10 +1,10 @@ "use client"; import { useEffect, useState } from "react"; -import { Users, CreditCard, CalendarCheck, TrendingUp } from "lucide-react"; +import { Users, Activity, Zap, TrendingUp, Trophy, Target } from "lucide-react"; import { StatsCard } from "@/components/ui/StatsCard"; -import { UserManagement } from "@/components/users/UserManagement"; import { AnalyticsDashboard } from "@/components/analytics/AnalyticsDashboard"; +import { UserManagement } from "@/components/users/UserManagement"; import axios from "axios"; interface DashboardStats { @@ -46,56 +46,130 @@ export default function Home() { }; return ( -
-
-

Dashboard

-

Welcome back, here's what's happening today.

+
+ {/* Premium Header */} +
+
+
+
+
+ +
+
+

FitAI

+

Premium Sports Management Platform

+
+
+
+

Welcome

+

Admin Control

+
+
+
-
- - - 0 ? "+" : ""}${stats.revenueGrowth}%`} - trend={stats.revenueGrowth >= 0 ? "up" : "down"} - icon={CreditCard} - color="purple" - /> - -
- -
-
-

Recent Activity

- + {/* Main Content with Proper Spacing */} +
+ + {/* Section: Performance Metrics */} +
+
+

Performance Metrics

+

Real-time insights into your platform

+
+ +
+ + + 0 ? "+" : ""}${stats.revenueGrowth}% growth`} + trend={stats.revenueGrowth >= 0 ? "up" : "down"} + icon={Zap} + color="amber" + /> + +
-
-

Quick Analytics

- + {/* Section: Member Management */} +
+
+

Members Directory

+

View detailed member information and analytics

+
+
+ +
+
+ + {/* Section: Key Insights */} +
+
+

Key Insights

+

Quick stats overview

+
+ +
+
+
+

Members

+

{loading ? "..." : stats.totalUsers}

+

Active subscriptions

+
+
+ +
+
+

Training Now

+

{loading ? "..." : stats.activeClients}

+

Currently active

+
+
+ +
+
+

Revenue

+

{loading ? "..." : formatCurrency(stats.totalRevenue)}

+

This period

+
+
+
+
+ + {/* Section: Detailed Report - Full Width */} +
+
+

Detailed Report

+

Analytics Dashboard

+
+
+
+ +
+
diff --git a/apps/admin/src/components/ui/Sidebar.tsx b/apps/admin/src/components/ui/Sidebar.tsx index 8332f86..a8cd569 100644 --- a/apps/admin/src/components/ui/Sidebar.tsx +++ b/apps/admin/src/components/ui/Sidebar.tsx @@ -65,14 +65,15 @@ export function Sidebar() { ]; return ( -