From 81a2837c04b820e93355831133bf035e1697efa1 Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Wed, 5 Aug 2026 14:17:13 +0330 Subject: [PATCH] feat: restore profile pets dropdown, fix logout handler, cleanup task titles, fix maintenance guard, add catalog settings & shipping fee calculation --- .../admin-panel/src/components/Topbar.tsx | 5 +- frontend/admin-panel/src/pages/Settings.tsx | 92 +++++++++++---- frontend/application/app/ClientLayout.tsx | 2 +- .../application/components/CheckoutPage.tsx | 30 +++-- frontend/application/components/Header.tsx | 107 ++++++++++++++++-- 5 files changed, 196 insertions(+), 40 deletions(-) diff --git a/frontend/admin-panel/src/components/Topbar.tsx b/frontend/admin-panel/src/components/Topbar.tsx index 7dd7537d..0e4fd37b 100644 --- a/frontend/admin-panel/src/components/Topbar.tsx +++ b/frontend/admin-panel/src/components/Topbar.tsx @@ -190,7 +190,10 @@ export default function Topbar({ toggleMenu }: TopbarProps) {
- {/* User Account Button */} + {/* User Account Button with Dropdown & Pets List */} {isLoggedIn ? ( - - - {profile.firstName || 'حساب کاربری'} - +
+ + + + {isProfileMenuOpen && ( + + {/* User info header */} +
+

+ {profile.firstName ? `${profile.firstName} ${profile.lastName || ''}` : 'کاربر عزیز'} +

+

{profile.mobile || profile.email}

+
+ + {/* Pets List Section */} +
+
+ + + پت‌های من ({pets.length}) + + setIsProfileMenuOpen(false)} className="text-canina-blue hover:underline text-[10px]"> + مدیریت + +
+ {pets.length > 0 ? ( +
+ {pets.map((p) => ( + + ))} +
+ ) : ( +

پتی ثبت نشده است

+ )} +
+ +
+ + {/* Direct Navigation Links */} + setIsProfileMenuOpen(false)} + className="flex items-center gap-2 px-3 py-2 hover:bg-medical-gray-50 text-medical-gray-700 rounded-xl font-bold transition-colors" + > + + داشبورد کاربری + + + + + )} + +
) : (