+
setIsOpen(false)}
+ title={group.title}
+ className={`w-12 h-12 flex items-center justify-center rounded-2xl transition-all ${
+ hasActiveChild
+ ? 'bg-purple-600 text-white shadow-md shadow-purple-600/30'
+ : 'text-gray-500 hover:bg-purple-50 hover:text-purple-700'
+ }`}
+ >
+
+
+
+ {/* Flyout Submenu on Hover in Collapsed Mode */}
+
+
+ {group.title}
+
+
+ {group.items.map((subItem) => {
+ const isSubActive =
+ location.pathname === subItem.path ||
+ (subItem.path !== '/' && location.pathname.startsWith(subItem.path));
+ const SubIcon = subItem.icon;
+ return (
+
+
+
+ {subItem.label}
+
+ {subItem.badge !== undefined && (
+
+ {subItem.badge}
+
+ )}
+
+ );
+ })}
+
+
+
+ );
+ }
+
return (
{/* Group Accordion Header */}
diff --git a/frontend/admin-panel/src/components/Topbar.tsx b/frontend/admin-panel/src/components/Topbar.tsx
index f89061f..3f1c317 100644
--- a/frontend/admin-panel/src/components/Topbar.tsx
+++ b/frontend/admin-panel/src/components/Topbar.tsx
@@ -1,12 +1,14 @@
import { useState, useRef, useEffect } from 'react';
import { useNavigate, Link } from 'react-router-dom';
-import { Search, UserCircle, Menu, Activity, ShieldCheck, MessageSquare, Calendar, Clock, RefreshCw } from 'lucide-react';
+import { Search, UserCircle, Menu, Activity, ShieldCheck, MessageSquare, Calendar, Clock, RefreshCw, PanelRightClose, PanelRightOpen } from 'lucide-react';
import { toast } from 'react-hot-toast';
import api from '../services/api';
import { useAdminAuthStore } from '../store/adminAuthStore';
interface TopbarProps {
toggleMenu: () => void;
+ isCollapsed?: boolean;
+ toggleCollapse?: () => void;
}
const SEARCHABLE_PAGES = [
@@ -57,7 +59,7 @@ interface LiveMonitoringSummary {
};
}
-export default function Topbar({ toggleMenu }: TopbarProps) {
+export default function Topbar({ toggleMenu, isCollapsed, toggleCollapse }: TopbarProps) {
const navigate = useNavigate();
const [searchQuery, setSearchQuery] = useState('');
const [showResults, setShowResults] = useState(false);
@@ -207,6 +209,18 @@ export default function Topbar({ toggleMenu }: TopbarProps) {
+ {toggleCollapse && (
+
+ )}
+
diff --git a/frontend/admin-panel/src/index.css b/frontend/admin-panel/src/index.css
index fde2187..a605a93 100644
--- a/frontend/admin-panel/src/index.css
+++ b/frontend/admin-panel/src/index.css
@@ -56,5 +56,22 @@
.font-vazir {
font-family: "Vazirmatn", sans-serif !important;
}
+
+ /* Custom visible styled scrollbar for tables & cards */
+ .custom-scrollbar::-webkit-scrollbar {
+ height: 8px;
+ width: 8px;
+ }
+ .custom-scrollbar::-webkit-scrollbar-track {
+ background: #f1f5f9;
+ border-radius: 9999px;
+ }
+ .custom-scrollbar::-webkit-scrollbar-thumb {
+ background: #cbd5e1;
+ border-radius: 9999px;
+ }
+ .custom-scrollbar::-webkit-scrollbar-thumb:hover {
+ background: #94a3b8;
+ }
}
diff --git a/frontend/admin-panel/src/pages/Orders.tsx b/frontend/admin-panel/src/pages/Orders.tsx
index 1be649a..bce8c7b 100644
--- a/frontend/admin-panel/src/pages/Orders.tsx
+++ b/frontend/admin-panel/src/pages/Orders.tsx
@@ -710,9 +710,9 @@ export default function Orders() {
{/* Orders Table */}
-
-
-
+
+
+
| شماره / کد پیگیری |
diff --git a/frontend/admin-panel/src/pages/Transactions.tsx b/frontend/admin-panel/src/pages/Transactions.tsx
index 698adb1..d92a18c 100644
--- a/frontend/admin-panel/src/pages/Transactions.tsx
+++ b/frontend/admin-panel/src/pages/Transactions.tsx
@@ -595,8 +595,8 @@ export default function Transactions() {
هیچ تراکنشی با فیلترهای مشخص شده یافت نشد.
) : (
-
-
+
+
| کاربر خریدار |
diff --git a/frontend/admin-panel/src/pages/Users.tsx b/frontend/admin-panel/src/pages/Users.tsx
index b0ad057..c2e455a 100644
--- a/frontend/admin-panel/src/pages/Users.tsx
+++ b/frontend/admin-panel/src/pages/Users.tsx
@@ -378,21 +378,21 @@ export default function Users() {
{/* Users Table */}
-
-
-
-
+
+
+
+
- | کاربر |
- شماره موبایل |
- نوع حساب |
- مجموع خرید (LTV) |
- سفارشات |
- ❤️ مهربانی |
- دیدگاهها |
- کیف پول |
- تاریخ عضویت |
- عملیات |
+ کاربر |
+ شماره موبایل |
+ نوع حساب |
+ مجموع خرید (LTV) |
+ سفارشات |
+ ❤️ مهربانی |
+ دیدگاهها |
+ کیف پول |
+ تاریخ عضویت |
+ عملیات |
@@ -418,21 +418,21 @@ export default function Users() {
return (
-
-
+
+
{fullName.charAt(0)}
-
+
{fullName}
{isMainAdmin && (
حساب اصلی مدیریت
)}
|
-
+ |
{user.mobile || '---'}
|
-
+ |
|
-
+ |
{spent > 0 ? `${spent.toLocaleString('fa-IR')} ت` : '۰'}
|
-
+ |
{user.ordersCount || 0}
|
-
+ |
{charity > 0 ? `${charity.toLocaleString('fa-IR')} ت` : '---'}
|
-
+ |
{user.reviewsCount || 0}
|
-
+ |
{balance > 0 ? `${balance.toLocaleString('fa-IR')} ت` : '۰'}
|
-
+ |
{user.createdAt ? new Date(user.createdAt).toLocaleDateString('fa-IR') : '---'}
|
-
+ |
| |