From fd9a57b96c5d74a9ec548f87a5c2977bd97e3cc3 Mon Sep 17 00:00:00 2001 From: DrMesta103 Date: Fri, 12 Jun 2026 22:16:23 +0330 Subject: [PATCH] feat: unified sticky header and removed redundant titles --- src/app/admin/locations/page.js | 8 --- src/app/admin/page.js | 6 +-- src/app/admin/settings/page.js | 5 -- src/app/admin/warehouses/page.js | 10 ---- src/components/Header.js | 88 +++++++++++--------------------- 5 files changed, 33 insertions(+), 84 deletions(-) diff --git a/src/app/admin/locations/page.js b/src/app/admin/locations/page.js index 3b4f633..3e0688f 100644 --- a/src/app/admin/locations/page.js +++ b/src/app/admin/locations/page.js @@ -142,14 +142,6 @@ export default function AdminLocations() {
- {/* Header Title */} -
-

تنظیمات قفسه‌ها

-

- ثبت، ویرایش و مدیریت قفسه‌های انبار -

-
- {/* Action Box */}
diff --git a/src/app/admin/page.js b/src/app/admin/page.js index 3ce8869..59d172b 100644 --- a/src/app/admin/page.js +++ b/src/app/admin/page.js @@ -44,7 +44,7 @@ export default function AdminDashboard() {
- تنظیمات و انبارها + تنظیمات مدیریت @@ -53,7 +53,7 @@ export default function AdminDashboard() {
- وضعیت قفسه‌ها + مدیریت قفسه‌ها @@ -91,7 +91,7 @@ export default function AdminDashboard() {
- مدیریت کاربران و گزارشات + کاربران
diff --git a/src/app/admin/settings/page.js b/src/app/admin/settings/page.js index e5fec67..1709436 100644 --- a/src/app/admin/settings/page.js +++ b/src/app/admin/settings/page.js @@ -92,11 +92,6 @@ export default function SettingsPage() {
-
-

تنظیمات اصلی

-

مدیریت قوانین انبارگردانی و دسترسی‌ها

-
-
{/* Blind Counting Setting */} diff --git a/src/app/admin/warehouses/page.js b/src/app/admin/warehouses/page.js index 72b32dd..18fcfe7 100644 --- a/src/app/admin/warehouses/page.js +++ b/src/app/admin/warehouses/page.js @@ -96,16 +96,6 @@ export default function WarehousesPage() {
-
-

- - مدیریت انبارهای حسابفا -

-

- کد انبار باید دقیقاً منطبق با کد انبار در سیستم حسابفا باشد. با افزودن انبار در اینجا، دسترسی کاربران به آن در اپلیکیشن فعال می‌شود. -

-
- {/* Add New Warehouse */}
diff --git a/src/components/Header.js b/src/components/Header.js index 8fccb5b..22506f6 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -29,74 +29,46 @@ export default function Header({ title = 'داشبورد', showBack = false }) { return name.charAt(0); }; - if (!showBack) { - // Style 4: Modern Floating Island (Pill) Design - return ( - - -
- {user?.avatarUrl ? ( - {user.name} - ) : ( - getInitial(user?.name) - )} -
-
- پردیس رایانه - - {user?.name || 'کاربر'} - -
- - -
- {user?.roles?.includes('ADMIN') && ( - - - - )} - -
-
- ); - } - - // Inner pages (showBack = true) return ( - +
+ {showBack ? ( + + ) : ( +
+ {getInitial(user?.name)} +
+ )} +
-
+
{title}
-
- {/* Decorative dot for symmetry */} -
+
+ {!showBack && user?.roles?.includes('ADMIN') && ( + + + + )} +
);