"use client"; import { ArrowUpRight, BarChart3, Bell, Box, ChevronLeft, ChevronRight, ChevronsUpDown, CircleDollarSign, ClipboardList, CreditCard, Download, Filter, Globe, HelpCircle, LayoutDashboard, LogOut, MessageSquare, MoreHorizontal, Package, PieChartIcon, Plus, RotateCcw, Search, Settings, ShoppingCart, Truck, User, Users, Wallet, } from "lucide-react"; import * as React from "react"; import type { TooltipProps } from "recharts"; import { Area, AreaChart, CartesianGrid, Cell, Pie, PieChart, Sector, Tooltip, XAxis, YAxis, } from "recharts"; import type { PieSectorDataItem } from "recharts/types/polar/Pie"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { type ChartConfig, ChartContainer } from "@/components/ui/chart"; import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "@/components/ui/collapsible"; import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Input } from "@/components/ui/input"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarTrigger, } from "@/components/ui/sidebar"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import { Tooltip as ShadTooltip, TooltipContent as ShadTooltipContent, TooltipProvider as ShadTooltipProvider, TooltipTrigger as ShadTooltipTrigger, } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; type NavItem = { label: string; icon: React.ComponentType>; href: string; isActive?: boolean; children?: NavItem[]; }; type NavGroup = { title: string; items: NavItem[]; defaultOpen?: boolean; }; type UserData = { name: string; email: string; avatar: string; }; type SidebarData = { logo: { src: string; alt: string; title: string; description: string; }; navGroups: NavGroup[]; footerGroup: NavGroup; user?: UserData; }; type StatItem = { title: string; previousValue: number; value: number; changePercent: number; isPositive: boolean; icon: React.ComponentType>; format: "currency" | "number"; }; type SalesCategoryItem = { name: string; value: number; percent: number; color: string; }; type RevenueFlowColors = { thisYear: string; prevYear: string; }; type OrderStatus = "Processing" | "Shipped" | "Delivered" | "Cancelled"; type Order = { id: string; orderNumber: string; customer: string; customerInitials: string; products: string[]; productCount: number; status: OrderStatus; total: number; date: string; }; type ActivityItem = { title: string; detail: string; time: string; }; const currencyFormatter = new Intl.NumberFormat("fa-IR", { style: "currency", currency: "IRR", }); const numberFormatter = new Intl.NumberFormat("fa-IR"); const compactCurrencyFormatter = new Intl.NumberFormat("fa-IR", { style: "currency", currency: "IRR", notation: "compact", maximumFractionDigits: 0, }); const monthLabel = (monthIndex: number) => new Intl.DateTimeFormat("fa-IR", { month: "short" }).format( new Date(2025, monthIndex, 1), ); const orderStatusLabels: Record = { Processing: "در حال پردازش", Shipped: "ارسال‌شده", Delivered: "تحویل‌شده", Cancelled: "لغوشده", }; /** * Custom hook for hover highlight interaction. * Provides stable callback to prevent unnecessary re-renders in chart components. */ function useHoverHighlight() { const [active, setActive] = React.useState(null); const handleHover = React.useCallback((value: T | null) => { setActive(value); }, []); return { active, handleHover }; } const mixBase = "var(--background)"; const palette = { primary: "var(--primary)", secondary: { light: `color-mix(in oklch, var(--primary) 75%, ${mixBase})`, dark: `color-mix(in oklch, var(--primary) 85%, ${mixBase})`, }, tertiary: { light: `color-mix(in oklch, var(--primary) 55%, ${mixBase})`, dark: `color-mix(in oklch, var(--primary) 65%, ${mixBase})`, }, quaternary: { light: `color-mix(in oklch, var(--primary) 40%, ${mixBase})`, dark: `color-mix(in oklch, var(--primary) 45%, ${mixBase})`, }, }; const salesCategoryChartConfig = { electronics: { label: "الکترونیک", color: palette.primary }, accessories: { label: "لوازم جانبی", theme: palette.secondary }, software: { label: "نرم‌افزار", theme: palette.tertiary }, other: { label: "سایر", theme: palette.quaternary }, } satisfies ChartConfig; const revenueFlowChartConfig = { thisYear: { label: "امسال", color: palette.primary }, prevYear: { label: "سال قبل", theme: palette.secondary }, } satisfies ChartConfig; const sidebarData: SidebarData = { logo: { src: "/block-media/shadcnblocks/block/logos/NovaSales-logo.svg", alt: "فروشگاه آکمه", title: "ری یو آی Store", description: "فروشگاه آنلاین", }, navGroups: [ { title: "اصلی", defaultOpen: true, items: [ { label: "داشبورد", icon: LayoutDashboard, href: "#", isActive: true, }, { label: "سفارش‌ها", icon: ClipboardList, href: "#" }, { label: "مرجوعی‌ها", icon: RotateCcw, href: "#" }, ], }, { title: "کاتالوگ", defaultOpen: true, items: [ { label: "محصولات", icon: Box, href: "#", children: [ { label: "همه محصولات", icon: Package, href: "#" }, { label: "دسته‌بندی‌ها", icon: Package, href: "#" }, { label: "موجودی", icon: Package, href: "#" }, ], }, { label: "ارسال", icon: Truck, href: "#" }, ], }, { title: "مشتریان", defaultOpen: false, items: [ { label: "همه مشتریان", icon: Users, href: "#" }, { label: "پیام‌ها", icon: MessageSquare, href: "#" }, ], }, { title: "تحلیل فروش", defaultOpen: false, items: [ { label: "نمای کلی", icon: Globe, href: "#" }, { label: "گزارش‌ها", icon: BarChart3, href: "#" }, { label: "مالی", icon: Wallet, href: "#" }, ], }, ], footerGroup: { title: "تنظیمات", items: [{ label: "تنظیمات", icon: Settings, href: "#" }], }, user: { name: "علی رضایی", email: "john@acme.store", avatar: "/block-media/shadcnblocks/block/avatar-2.webp", }, }; const statsData: StatItem[] = [ { title: "درآمد ماهانه", previousValue: 148230, value: 189540.75, changePercent: 27.86, isPositive: true, icon: CircleDollarSign, format: "currency", }, { title: "سفارش‌های تکمیل‌شده", previousValue: 18452, value: 21847, changePercent: 18.4, isPositive: true, icon: ClipboardList, format: "number", }, { title: "مشتریان جدید", previousValue: 4120, value: 4975, changePercent: 20.8, isPositive: true, icon: Users, format: "number", }, { title: "بازپرداخت‌ها", previousValue: 9821, value: 8473, changePercent: 13.73, isPositive: false, icon: CreditCard, format: "currency", }, ]; const fullYearData = [ { month: monthLabel(0), thisYear: 42000, prevYear: 38000 }, { month: monthLabel(1), thisYear: 38000, prevYear: 45000 }, { month: monthLabel(2), thisYear: 52000, prevYear: 41000 }, { month: monthLabel(3), thisYear: 45000, prevYear: 48000 }, { month: monthLabel(4), thisYear: 58000, prevYear: 44000 }, { month: monthLabel(5), thisYear: 41000, prevYear: 52000 }, { month: monthLabel(6), thisYear: 55000, prevYear: 47000 }, { month: monthLabel(7), thisYear: 48000, prevYear: 53000 }, { month: monthLabel(8), thisYear: 62000, prevYear: 49000 }, { month: monthLabel(9), thisYear: 54000, prevYear: 58000 }, { month: monthLabel(10), thisYear: 67000, prevYear: 52000 }, { month: monthLabel(11), thisYear: 71000, prevYear: 61000 }, ]; type TimePeriod = "6months" | "year"; const periodLabels: Record = { "6months": "۶ ماه اخیر", year: "۱۲ ماه", }; function getDataForPeriod(period: TimePeriod) { if (period === "6months") return fullYearData.slice(0, 6); return fullYearData; } const orderStatIRRata = { total: 1247, processing: { count: 156, percent: 12.5 }, shipped: { count: 423, percent: 33.9 }, delivered: { count: 668, percent: 53.6 }, }; const salesCategoryData: SalesCategoryItem[] = [ { name: "الکترونیک", value: 145200, percent: 58, color: palette.primary, }, { name: "لوازم جانبی", value: 62400, percent: 25, color: `color-mix(in oklch, var(--primary) 80%, ${mixBase})`, }, { name: "نرم‌افزار", value: 32500, percent: 13, color: `color-mix(in oklch, var(--primary) 60%, ${mixBase})`, }, { name: "سایر", value: 10000, percent: 4, color: `color-mix(in oklch, var(--primary) 42%, ${mixBase})`, }, ]; const orderStatuses: OrderStatus[] = [ "Processing", "Shipped", "Delivered", "Cancelled", ]; const orders: Order[] = [ { id: "1", orderNumber: "ORD-2024-001", customer: "Sarah Johnson", customerInitials: "SJ", products: ["MacBook Pro 14", "Magic Mouse"], productCount: 2, status: "Delivered", total: 2499.0, date: "Jan 28, 2024", }, { id: "2", orderNumber: "ORD-2024-002", customer: "Michael Chen", customerInitials: "MC", products: ["iPhone 15 Pro", "AirPods Pro"], productCount: 2, status: "Shipped", total: 1348.0, date: "Jan 27, 2024", }, { id: "3", orderNumber: "ORD-2024-003", customer: "Emma Wilson", customerInitials: "EW", products: ["iPad Air", "Apple Pencil", "Smart Keyboard"], productCount: 3, status: "Processing", total: 1198.0, date: "Jan 27, 2024", }, { id: "4", orderNumber: "ORD-2024-004", customer: "James Rodriguez", customerInitials: "JR", products: ["Apple Watch Ultra"], productCount: 1, status: "Delivered", total: 799.0, date: "Jan 26, 2024", }, { id: "5", orderNumber: "ORD-2024-005", customer: "Lisa Park", customerInitials: "LP", products: ["Mac Mini M2"], productCount: 1, status: "Cancelled", total: 599.0, date: "Jan 26, 2024", }, { id: "6", orderNumber: "ORD-2024-006", customer: "David Kim", customerInitials: "DK", products: ["Studio Display", "Mac Studio"], productCount: 2, status: "Shipped", total: 5498.0, date: "Jan 25, 2024", }, { id: "7", orderNumber: "ORD-2024-007", customer: "Anna Martinez", customerInitials: "AM", products: ["MacBook Air M2"], productCount: 1, status: "Delivered", total: 1199.0, date: "Jan 25, 2024", }, { id: "8", orderNumber: "ORD-2024-008", customer: "Robert Taylor", customerInitials: "RT", products: ["iPhone 15", "MagSafe Charger"], productCount: 2, status: "Processing", total: 878.0, date: "Jan 24, 2024", }, { id: "9", orderNumber: "ORD-2024-009", customer: "Jennifer Lee", customerInitials: "JL", products: ["AirPods Max"], productCount: 1, status: "Shipped", total: 549.0, date: "Jan 24, 2024", }, { id: "10", orderNumber: "ORD-2024-010", customer: "William Brown", customerInitials: "WB", products: ["iPad Pro 12.9", "Magic Keyboard"], productCount: 2, status: "Delivered", total: 1648.0, date: "Jan 23, 2024", }, { id: "11", orderNumber: "ORD-2024-011", customer: "Sophia Davis", customerInitials: "SD", products: ["MacBook Pro 16"], productCount: 1, status: "Processing", total: 2499.0, date: "Jan 23, 2024", }, { id: "12", orderNumber: "ORD-2024-012", customer: "Daniel Garcia", customerInitials: "DG", products: ["Apple TV 4K", "HomePod mini"], productCount: 2, status: "Cancelled", total: 278.0, date: "Jan 22, 2024", }, { id: "13", orderNumber: "ORD-2024-013", customer: "Olivia White", customerInitials: "OW", products: ["iPhone 15 Pro Max"], productCount: 1, status: "Delivered", total: 1199.0, date: "Jan 22, 2024", }, { id: "14", orderNumber: "ORD-2024-014", customer: "Thomas Anderson", customerInitials: "TA", products: ["Mac Pro", "Pro Display XDR"], productCount: 2, status: "Shipped", total: 12498.0, date: "Jan 21, 2024", }, { id: "15", orderNumber: "ORD-2024-015", customer: "Emily Thompson", customerInitials: "ET", products: ["iPad mini", "Apple Pencil"], productCount: 2, status: "Delivered", total: 648.0, date: "Jan 21, 2024", }, { id: "16", orderNumber: "ORD-2024-016", customer: "Christopher Moore", customerInitials: "CM", products: ["AirPods Pro 2"], productCount: 1, status: "Processing", total: 249.0, date: "Jan 20, 2024", }, { id: "17", orderNumber: "ORD-2024-017", customer: "Isabella Jackson", customerInitials: "IJ", products: ["Apple Watch Series 9"], productCount: 1, status: "Shipped", total: 399.0, date: "Jan 20, 2024", }, { id: "18", orderNumber: "ORD-2024-018", customer: "Matthew Harris", customerInitials: "MH", products: ["MacBook Air 15"], productCount: 1, status: "Delivered", total: 1299.0, date: "Jan 19, 2024", }, { id: "19", orderNumber: "ORD-2024-019", customer: "Ava Clark", customerInitials: "AC", products: ["iPhone SE", "EarPods"], productCount: 2, status: "Cancelled", total: 448.0, date: "Jan 19, 2024", }, { id: "20", orderNumber: "ORD-2024-020", customer: "Joshua Lewis", customerInitials: "JL", products: ["Mac Mini M2 Pro"], productCount: 1, status: "Processing", total: 1299.0, date: "Jan 18, 2024", }, ]; const recentActivity: ActivityItem[] = [ { title: "ثبت‌نام کاربر جدید", detail: "الکس مورگان", time: "۲ دقیقه پیش", }, { title: "ثبت سفارش جدید", detail: "الکس مورگان", time: "۲ دقیقه پیش", }, { title: "دریافت پرداخت", detail: "الکس مورگان", time: "۲ دقیقه پیش", }, { title: "ارسال فاکتور", detail: "جیمی لی", time: "۶ دقیقه پیش", }, { title: "ارتقای اشتراک", detail: "نوح رابرتس", time: "۱۲ دقیقه پیش", }, { title: "صدور بازپرداخت", detail: "الیویا وایت", time: "۱۸ دقیقه پیش", }, { title: "بازنشانی رمز", detail: "ایتن پارکر", time: "۲۴ دقیقه پیش", }, { title: "نظر جدید", detail: "سوفیا دیویس", time: "۳۲ دقیقه پیش", }, { title: "بستن تیکت پشتیبانی", detail: "مایکل چن", time: "۴۵ دقیقه پیش", }, { title: "پردازش تسویه", detail: "اما ویلسون", time: "۱ ساعت پیش", }, ]; const SidebarLogo = ({ logo }: { logo: SidebarData["logo"] }) => { return (
{logo.alt}
{logo.title} {logo.description}
); }; const NavMenuItem = ({ item }: { item: NavItem }) => { const Icon = item.icon; const hasChildren = item.children && item.children.length > 0; if (!hasChildren) { return ( {item.label} ); } return ( {item.label} {item.children!.map((child) => ( {child.label} ))} ); }; const NavUser = ({ user }: { user: UserData }) => { return ( {user.name .split(" ") .map((n) => n[0]) .join("")}
{user.name} {user.email}
{user.name .split(" ") .map((n) => n[0]) .join("")}
{user.name} {user.email}
); }; const AppSidebar = ({ ...props }: React.ComponentProps) => { return (
{sidebarData.navGroups.map((group) => ( {group.title} {group.items.map((item) => ( ))} ))} {sidebarData.user && }
); }; const DashboardHeader = () => { return (
); }; const WelcomeSection = () => { return (

خوش برگشتید، علی!

امروز{" "} ۱۲ سفارش برای ارسال و{" "} ۳ مرجوعی در انتظار دارید

); }; const StatsCards = () => { return (
{statsData.map((stat) => { const formatter = stat.format === "currency" ? currencyFormatter : numberFormatter; return (

{formatter.format(stat.value)}

{stat.isPositive ? "+" : "-"} {stat.changePercent.toLocaleString("fa-IR", { minimumFractionDigits: 1, maximumFractionDigits: 1, })} ٪ ( {formatter.format( Math.abs(stat.value - stat.previousValue), )} ) نسبت به ماه قبل
); })}
); }; const OrderStatusChart = () => { const { active: activeSegment, handleHover } = useHoverHighlight(); const orderStatusItems = [ { key: "processing", label: orderStatusLabels.Processing, ...orderStatIRRata.processing, color: palette.primary, }, { key: "shipped", label: orderStatusLabels.Shipped, ...orderStatIRRata.shipped, color: palette.secondary.light, }, { key: "delivered", label: orderStatusLabels.Delivered, ...orderStatIRRata.delivered, color: palette.tertiary.light, }, ]; return (
وضعیت سفارش‌ها

{numberFormatter.format(orderStatIRRata.total)} سفارش این ماه

{orderStatusItems.map((item, index) => (
{orderStatusItems.map((item, index) => ( {item.percent.toLocaleString("fa-IR")}٪ ))}
{orderStatusItems.map((item, index) => (
{item.label} {item.percent.toLocaleString("fa-IR")}٪
{numberFormatter.format(item.count)} سفارش
))}
); }; const renderActiveShape = (props: PieSectorDataItem) => { const { cx = 0, cy = 0, innerRadius = 0, outerRadius = 0, startAngle = 0, endAngle = 0, fill = "currentColor", } = props; return ( ); }; const SalesByCategoryChart = () => { const { active: activeSlice, handleHover: setHoveredSlice } = useHoverHighlight(); const totalSales = salesCategoryData.reduce( (acc, item) => acc + item.value, 0, ); return (
فروش بر اساس دسته

setHoveredSlice(index) } onMouseLeave={() => setHoveredSlice(null)} > {salesCategoryData.map((entry) => ( ))}
{compactCurrencyFormatter.format(totalSales)} مجموع
{salesCategoryData.map((item, index) => (
setHoveredSlice(index)} onMouseLeave={() => setHoveredSlice(null)} >
{item.name}
{compactCurrencyFormatter.format(item.value)} {item.percent.toLocaleString("fa-IR")}٪
))}
); }; const SideChartsSection = () => { return (
); }; function CustomTooltip({ active, payload, label, colors, }: any & { colors: RevenueFlowColors }) { if (!active || !payload?.length) return null; const thisYear = payload.find((p: any) => p.dataKey === "thisYear")?.value || 0; const prevYear = payload.find((p: any) => p.dataKey === "prevYear")?.value || 0; const diff = Number(thisYear) - Number(prevYear); const percentage = prevYear ? Math.round((diff / Number(prevYear)) * 100) : 0; const currentYear = new Date().getFullYear(); return (

{label}، {currentYear.toLocaleString("fa-IR")}

امسال: {currencyFormatter.format(Number(thisYear))}
سال قبل: {currencyFormatter.format(Number(prevYear))}
= 0 ? "text-emerald-500" : "text-red-500", )} > {diff >= 0 ? "+" : ""} {percentage.toLocaleString("fa-IR")}٪ نسبت به سال قبل
); } const RevenueFlowChart = () => { const [period, setPeriod] = React.useState("6months"); const { active: activeSeries, handleHover } = useHoverHighlight< "thisYear" | "prevYear" >(); const legendItems = [ { key: "thisYear", label: "امسال", color: palette.primary }, { key: "prevYear", label: "سال قبل", color: palette.secondary.light }, ] as const; React.useEffect(() => { if (typeof window === "undefined") return; const params = new URLSearchParams(window.location.search); const nextPeriod = params.get("period"); if (nextPeriod === "6months" || nextPeriod === "year") { setPeriod(nextPeriod); } }, []); React.useEffect(() => { if (typeof window === "undefined") return; const params = new URLSearchParams(window.location.search); if (period !== "6months") { params.set("period", period); } else { params.delete("period"); } const nextQuery = params.toString(); const nextUrl = nextQuery ? `${window.location.pathname}?${nextQuery}` : window.location.pathname; window.history.replaceState(null, "", nextUrl); }, [period]); const chartData = getDataForPeriod(period); const totalRevenue = chartData.reduce((acc, item) => acc + item.thisYear, 0); return (

{currencyFormatter.format(totalRevenue)}

درآمد کل ({periodLabels[period]})

{legendItems.map((item) => (
handleHover(item.key)} onMouseLeave={() => handleHover(null)} >
{item.label}
))}
بازه زمانی {(Object.keys(periodLabels) as TimePeriod[]).map((key) => ( setPeriod(key)} > {periodLabels[key]} ))}
compactCurrencyFormatter.format(value)} width={40} /> } cursor={{ strokeOpacity: 0.2 }} />
); }; const statusStyles: Record = { Processing: "bg-amber-50 text-amber-700 ring-1 ring-inset ring-amber-600/20 dark:bg-amber-900/30 dark:text-amber-400 dark:ring-amber-400/20", Shipped: "bg-blue-50 text-blue-700 ring-1 ring-inset ring-blue-700/10 dark:bg-blue-900/30 dark:text-blue-400 dark:ring-blue-400/20", Delivered: "bg-emerald-50 text-emerald-700 ring-1 ring-inset ring-emerald-600/20 dark:bg-emerald-900/30 dark:text-emerald-400 dark:ring-emerald-400/20", Cancelled: "bg-red-50 text-red-700 ring-1 ring-inset ring-red-600/10 dark:bg-red-900/30 dark:text-red-400 dark:ring-red-400/20", }; const RecentTransactionsTable = ({ className }: { className?: string }) => { const [statusFilter, setStatusFilter] = React.useState( "all", ); const [currentPage, setCurrentPage] = React.useState(1); const [isHydrated, setIsHydrated] = React.useState(false); const pageSize = 6; React.useEffect(() => { if (typeof window === "undefined") return; const params = new URLSearchParams(window.location.search); const nextStatus = params.get("status"); if ( nextStatus && (nextStatus === "all" || orderStatuses.includes(nextStatus as OrderStatus)) ) { setStatusFilter(nextStatus as OrderStatus | "all"); } const nextPage = Number(params.get("page")); if (!Number.isNaN(nextPage) && nextPage > 0) { setCurrentPage(nextPage); } setIsHydrated(true); }, []); const filteredOrders = React.useMemo(() => { if (statusFilter === "all") return orders; return orders.filter((order) => order.status === statusFilter); }, [statusFilter]); const totalPages = Math.max(1, Math.ceil(filteredOrders.length / pageSize)); const paginatedOrders = React.useMemo(() => { const startIndex = (currentPage - 1) * pageSize; return filteredOrders.slice(startIndex, startIndex + pageSize); }, [filteredOrders, currentPage, pageSize]); React.useEffect(() => { setCurrentPage(1); }, [statusFilter]); React.useEffect(() => { if (!isHydrated || typeof window === "undefined") return; const params = new URLSearchParams(window.location.search); if (statusFilter !== "all") { params.set("status", statusFilter); } else { params.delete("status"); } if (currentPage > 1) { params.set("page", String(currentPage)); } else { params.delete("page"); } const nextQuery = params.toString(); const nextUrl = nextQuery ? `${window.location.pathname}?${nextQuery}` : window.location.pathname; window.history.replaceState(null, "", nextUrl); }, [statusFilter, currentPage, isHydrated]); const goToPage = (page: number) => { setCurrentPage(Math.max(1, Math.min(page, totalPages))); }; const startRow = filteredOrders.length ? (currentPage - 1) * pageSize + 1 : 0; const endRow = Math.min(currentPage * pageSize, filteredOrders.length); return (
تراکنش‌های اخیر {filteredOrders.length.toLocaleString("fa-IR")}
فیلتر بر اساس وضعیت setStatusFilter("all")} > همه وضعیت‌ها {orderStatuses.map((status) => ( setStatusFilter(status)} > {orderStatusLabels[status]} ))}
شماره سفارش خریدار مجموع وضعیت {paginatedOrders.length === 0 ? ( تراکنشی یافت نشد. ) : ( paginatedOrders.map((order) => ( {order.orderNumber} {order.customer} {currencyFormatter.format(order.total)} {orderStatusLabels[order.status]} )) )}
{filteredOrders.length === 0 ? "۰" : `${startRow.toLocaleString("fa-IR")}-${endRow.toLocaleString("fa-IR")}`}{" "} از {filteredOrders.length.toLocaleString("fa-IR")}
); }; const RecentActivity = ({ className }: { className?: string }) => { return (
فعالیت تیم‌های اخیر
{recentActivity.map((item) => (
{item.title} {item.time}
{item.detail}
))}
); }; const DashboardContent = () => { return (
); }; const Dashboard5 = ({ className }: { className?: string }) => { return ( رفتن به محتوای اصلی ); }; export { Dashboard5 };