diff --git a/frontend/src/pages/dashboard/DashboardPage.tsx b/frontend/src/pages/dashboard/DashboardPage.tsx
index 28e2022..c1d237e 100644
--- a/frontend/src/pages/dashboard/DashboardPage.tsx
+++ b/frontend/src/pages/dashboard/DashboardPage.tsx
@@ -1,22 +1,23 @@
/**
* ════════════════════════════════════════════════════════════
- * مُصادَق (Musadaq) — Dashboard Page
+ * مُصادَق (Musadaq) — Premium Dark Dashboard Page
* ════════════════════════════════════════════════════════════
*/
import { useState, useEffect } from 'react';
-import {
- FileText,
- TrendingUp,
- ArrowUpRight,
- ArrowDownRight,
+import {
+ FileText,
+ TrendingUp,
+ ArrowUpRight,
Clock,
CheckCircle2,
- Building2
+ Building2,
+ Loader2,
+ Upload,
+ AlertTriangle,
} from 'lucide-react';
import { motion } from 'framer-motion';
import apiClient from '../../api/client';
-
import { useNavigate } from 'react-router-dom';
export const DashboardPage = () => {
@@ -41,44 +42,41 @@ export const DashboardPage = () => {
if (isLoading) {
return (
-
-
+
+
+
جاري تحميل البيانات...
);
}
const statCards = [
- {
- title: 'إجمالي الفواتير',
- value: stats?.totalInvoices || 0,
- icon: FileText,
- color: 'bg-blue-500',
- trend: '+12%',
- isUp: true
+ {
+ title: 'إجمالي الفواتير',
+ value: stats?.stats?.totalInvoices || 0,
+ icon: FileText,
+ gradient: 'from-blue-500 to-blue-600',
+ glow: 'shadow-blue-500/20',
},
- {
- title: 'الفواتير المصدقة',
- value: stats?.approvedInvoices || 0,
- icon: CheckCircle2,
- color: 'bg-emerald-500',
- trend: '+8%',
- isUp: true
+ {
+ title: 'الفواتير المصدقة',
+ value: stats?.stats?.approvedInvoices || 0,
+ icon: CheckCircle2,
+ gradient: 'from-emerald-500 to-emerald-600',
+ glow: 'shadow-emerald-500/20',
},
- {
- title: 'إجمالي الشركات',
- value: stats?.companiesCount || 0,
- icon: Building2,
- color: 'bg-purple-500',
- trend: '+2',
- isUp: true
+ {
+ title: 'إجمالي الشركات',
+ value: stats?.stats?.companiesCount || 0,
+ icon: Building2,
+ gradient: 'from-purple-500 to-purple-600',
+ glow: 'shadow-purple-500/20',
},
- {
- title: 'إجمالي الضرائب (JOD)',
- value: Number(stats?.totalTax || 0).toLocaleString('ar-JO', { minimumFractionDigits: 3 }),
- icon: TrendingUp,
- color: 'bg-amber-500',
- trend: '+5%',
- isUp: true
+ {
+ title: 'إجمالي الضرائب (JOD)',
+ value: Number(stats?.stats?.totalTax || 0).toLocaleString('ar-JO', { minimumFractionDigits: 3 }),
+ icon: TrendingUp,
+ gradient: 'from-amber-500 to-amber-600',
+ glow: 'shadow-amber-500/20',
},
];
@@ -86,11 +84,11 @@ export const DashboardPage = () => {