Revamp admin dashboard analytics and UI

Refactored the admin dashboard to use tabbed navigation for analytics and management. Enhanced AdminAnalytics with Recharts visualizations, added top vendors by revenue, and improved chart tooltips. Removed unused columns from vendor table. Updated layout and notification context to exclude admin pages from dashboard-specific UI and notifications. Minor debug logging added to SystemStatusCard.
This commit is contained in:
g
2025-11-28 19:08:40 +00:00
parent f212859bda
commit 4b0bd2cf8c
8 changed files with 337 additions and 219 deletions

View File

@@ -18,6 +18,8 @@ export default function Layout({ children }: LayoutProps) {
// Check if we're in a chat detail page
const isChatDetailPage = pathname?.includes('/dashboard/chats/') && !pathname?.endsWith('/chats') && !pathname?.endsWith('/new')
// Check if we're on an admin page
const isAdminPage = pathname?.includes('/dashboard/admin')
useEffect(() => setMounted(true), [])
@@ -27,7 +29,7 @@ export default function Layout({ children }: LayoutProps) {
<div className={`flex h-screen ${theme === "dark" ? "dark" : ""}`}>
<Sidebar />
<div className="w-full flex flex-1 flex-col">
{!isChatDetailPage && (
{!isChatDetailPage && !isAdminPage && (
<header className="h-16 border-b border-border flex items-center justify-end px-6">
<div className="flex items-center space-x-2">
<UnifiedNotifications />