From 33c13ec52478e0cd06a22ec55ce7e2eaa8ab5624 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Sun, 7 Jun 2026 22:12:51 +0330 Subject: [PATCH] [Dashboard] Panel sub-nav menu + clearer profile button (name, not phone digit) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Logged-in panels (admin/employer/job-seeker) now show a sticky role-based dashboard menu (_PanelNav) on Employer/Index, Me/Index and Admin/Overview, with the active section highlighted — so users have an obvious menu and dashboard, not just a hidden avatar. Profile button: avatar fallback shows a 👤 glyph instead of the phone's first digit (the confusing '0'), and the desktop button now shows the user's name (or «حساب من») so it reads as a profile menu. Co-Authored-By: Claude Opus 4.8 --- .../Pages/Admin/Overview.cshtml | 2 + .../Pages/Employer/Index.cshtml | 2 + src/JobsMedical.Web/Pages/Me/Index.cshtml | 2 + .../Pages/Shared/_Layout.cshtml | 6 ++- .../Pages/Shared/_PanelNav.cshtml | 40 +++++++++++++++++++ src/JobsMedical.Web/wwwroot/css/site.css | 11 +++++ 6 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 src/JobsMedical.Web/Pages/Shared/_PanelNav.cshtml diff --git a/src/JobsMedical.Web/Pages/Admin/Overview.cshtml b/src/JobsMedical.Web/Pages/Admin/Overview.cshtml index e9be931..95db80c 100644 --- a/src/JobsMedical.Web/Pages/Admin/Overview.cshtml +++ b/src/JobsMedical.Web/Pages/Admin/Overview.cshtml @@ -5,6 +5,8 @@ string P(int n) => JalaliDate.ToPersianDigits(n.ToString()); } + +

داشبورد مدیریت

diff --git a/src/JobsMedical.Web/Pages/Employer/Index.cshtml b/src/JobsMedical.Web/Pages/Employer/Index.cshtml index 892f924..0e36830 100644 --- a/src/JobsMedical.Web/Pages/Employer/Index.cshtml +++ b/src/JobsMedical.Web/Pages/Employer/Index.cshtml @@ -10,6 +10,8 @@ }; } + +

پنل مرکز درمانی

diff --git a/src/JobsMedical.Web/Pages/Me/Index.cshtml b/src/JobsMedical.Web/Pages/Me/Index.cshtml index 3a1e07d..772f252 100644 --- a/src/JobsMedical.Web/Pages/Me/Index.cshtml +++ b/src/JobsMedical.Web/Pages/Me/Index.cshtml @@ -16,6 +16,8 @@ }; } + +

پنل کارجو

diff --git a/src/JobsMedical.Web/Pages/Shared/_Layout.cshtml b/src/JobsMedical.Web/Pages/Shared/_Layout.cshtml index 04ef0ac..26b4d00 100644 --- a/src/JobsMedical.Web/Pages/Shared/_Layout.cshtml +++ b/src/JobsMedical.Web/Pages/Shared/_Layout.cshtml @@ -16,7 +16,10 @@ meName = string.IsNullOrWhiteSpace(info?.FullName) ? info?.Phone : info!.FullName; meHasAvatar = info?.HasAvatar ?? false; } - var meInitial = string.IsNullOrWhiteSpace(meName) ? "؟" : meName!.Trim().Substring(0, 1); + // Person glyph when there's no real name yet (avoid showing a phone digit like "0"). + var meInitial = (!string.IsNullOrWhiteSpace(meName) && !char.IsDigit(meName!.Trim()[0])) + ? meName!.Trim().Substring(0, 1) : "👤"; + var meLabel = (!string.IsNullOrWhiteSpace(meName) && !char.IsDigit(meName!.Trim()[0])) ? meName! : "حساب من"; // --- SEO context --- var baseUrl = $"{Context.Request.Scheme}://{Context.Request.Host}"; @@ -116,6 +119,7 @@ { @meInitial } + @meLabel