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

@@ -167,8 +167,8 @@ export function NotificationProvider({ children }: NotificationProviderProps) {
// Check for new paid orders
useEffect(() => {
// Only run this on dashboard pages
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard")) return;
// Only run this on dashboard pages, but not on admin pages
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard") || window.location.pathname.includes("/dashboard/admin")) return;
const checkForNewOrders = async () => {
try {
@@ -250,8 +250,8 @@ export function NotificationProvider({ children }: NotificationProviderProps) {
// Fetch unread chat counts
useEffect(() => {
// Only run this on dashboard pages
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard")) return;
// Only run this on dashboard pages, but not on admin pages
if (typeof window === 'undefined' || !window.location.pathname.includes("/dashboard") || window.location.pathname.includes("/dashboard/admin")) return;
const fetchUnreadCounts = async () => {
try {