fix(admin): resolve Dashboard crash with null safety and add Tehran time/sorting to Tasks
Deploy Canina / deploy (push) Failing after 2m16s
Deploy Canina / deploy (push) Failing after 2m16s
This commit is contained in:
1 parent
0b5f2a88cc
commit
5e21cc76fc
2 files changed
+5
-5
No files matched your search
@@ -117,10 +117,10 @@ export default function Dashboard() {
|
||||
const COLORS = ['#8b5cf6', '#3b82f6', '#10b981'];
|
||||
|
||||
const stats = [
|
||||
{ title: 'درآمد کل', value: `${data.revenue.toLocaleString()} تومان`, icon: DollarSign, color: 'text-green-600', bg: 'bg-green-100', link: '/reports' },
|
||||
{ title: 'سفارشات جدید', value: data.newOrders.toString(), icon: ShoppingCart, color: 'text-blue-600', bg: 'bg-blue-100', link: '/orders' },
|
||||
{ title: 'کاربران فعال', value: data.users.toString(), icon: Users, color: 'text-purple-600', bg: 'bg-purple-100', link: '/users' },
|
||||
{ title: 'بازدید امروز', value: data.todayVisits.toString(), icon: Activity, color: 'text-orange-600', bg: 'bg-orange-100', link: '/reports' },
|
||||
{ title: 'درآمد کل', value: `${(data?.revenue || 0).toLocaleString()} تومان`, icon: DollarSign, color: 'text-green-600', bg: 'bg-green-100', link: '/reports' },
|
||||
{ title: 'سفارشات جدید', value: (data?.newOrders || 0).toString(), icon: ShoppingCart, color: 'text-blue-600', bg: 'bg-blue-100', link: '/orders' },
|
||||
{ title: 'کاربران فعال', value: (data?.users || 0).toString(), icon: Users, color: 'text-purple-600', bg: 'bg-purple-100', link: '/users' },
|
||||
{ title: 'بازدید امروز', value: (data?.todayVisits || 0).toString(), icon: Activity, color: 'text-orange-600', bg: 'bg-orange-100', link: '/reports' },
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
@@ -85,7 +85,7 @@ export default function TasksManagementPage() {
|
||||
}
|
||||
};
|
||||
|
||||
const filteredTasks = tasks.filter((t) => {
|
||||
const sortedTasks = [...tasks].sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());\n const filteredTasks = sortedTasks.filter((t) => {
|
||||
const matchesSearch =
|
||||
!searchTerm ||
|
||||
t.title.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
||||
|
||||
Reference in new issue
Block a user