Files
hamkadr/src/JobsMedical.Web/Pages/Employer/Index.cshtml
T
soroush.asadi bdcca5e548
CI/CD / CI · dotnet build (push) Successful in 1m7s
CI/CD / Deploy · hamkadr (push) Successful in 1m57s
Redesign header menu: separate account dropdown from dashboard nav
The profile dropdown was doing three jobs at once (account actions, the
job-seeker panel menu, and the admin panel menu) and a stray inline @if
for the notification badge leaked into the markup as literal text.

- Profile dropdown is now account-only: identity card (avatar + name +
  phone), one role-aware dashboard entry, edit profile, logout. This
  removes the leaked @if and de-clutters the menu.
- Dashboard menu is centralized in _PanelNav and auto-rendered by the
  layout on every logged-in panel page (/Admin, /Me, /Employer,
  /Preferences) instead of being duplicated in the dropdown and pages.
- Drop the now-duplicate manual <partial name="_PanelNav" /> from
  Overview, Ingested, Me/Index, Employer/Index.
- CSS: identity-card (.pd-id) styles + mobile tweaks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 07:33:22 +03:30

82 lines
4.3 KiB
Plaintext

@page
@model JobsMedical.Web.Pages.Employer.IndexModel
@{
ViewData["Title"] = "پنل کارفرما";
string TypeLabel(FacilityType t) => t switch
{
FacilityType.Hospital => "بیمارستان",
FacilityType.Clinic => "کلینیک",
_ => "درمانگاه",
};
}
<div class="page-head">
<div class="container">
<h1>پنل مرکز درمانی</h1>
<p class="muted">شیفت‌ها و موقعیت‌های استخدامی مرکز خود را مدیریت کن.</p>
</div>
</div>
<div class="container section">
@if (Model.Facilities.Count == 0)
{
<div class="card empty-state">
<p>هنوز مرکزی ثبت نکرده‌ای.</p>
<a class="btn btn-accent btn-lg" asp-page="/Employer/RegisterFacility">ثبت مرکز درمانی</a>
</div>
}
else
{
<div class="rec-banner">
<div>
<h2 style="margin:0 0 4px;">انتشار فرصت جدید</h2>
<span style="opacity:.9; font-size:14px;">شیفت یا موقعیت استخدامی منتشر کن</span>
</div>
<div style="display:flex; gap:8px;">
<a class="btn btn-outline" asp-page="/Employer/PostShift">+ شیفت</a>
<a class="btn btn-outline" asp-page="/Employer/PostJob">+ استخدام</a>
<a class="btn btn-outline" asp-page="/Employer/RegisterFacility">+ مرکز</a>
</div>
</div>
<div class="grid grid-3">
@foreach (var c in Model.Facilities)
{
<div class="card card-pad">
<div class="row" style="display:flex; justify-content:space-between; align-items:center;">
<span class="facility" style="font-weight:800; font-size:16px;">@c.Facility.Name</span>
@switch (c.Facility.Verification)
{
case JobsMedical.Web.Models.VerificationStatus.Verified:
<span class="badge badge-verified">✓ تأیید شده</span>
break;
case JobsMedical.Web.Models.VerificationStatus.Pending:
<span class="badge badge-type">در حال بررسی</span>
break;
case JobsMedical.Web.Models.VerificationStatus.Rejected:
<span class="badge badge-gender">رد شده</span>
break;
default:
<span class="badge badge-type">تأیید نشده</span>
break;
}
</div>
<p class="muted" style="margin:8px 0;">
@TypeLabel(c.Facility.Type) — 📍 @c.Facility.City?.Name@(c.Facility.District is not null ? "، " + c.Facility.District.Name : "")
</p>
<div class="info-row"><span class="k">شیفت‌های باز</span><span class="v">@JalaliDate.ToPersianDigits(c.OpenShifts.ToString())</span></div>
<div class="info-row"><span class="k">موقعیت‌های استخدامی</span><span class="v">@JalaliDate.ToPersianDigits(c.OpenJobs.ToString())</span></div>
<div class="info-row"><span class="k">اعلام تمایل‌ها</span><span class="v" style="color:var(--accent)">@JalaliDate.ToPersianDigits(c.Applicants.ToString())</span></div>
<a class="btn btn-outline btn-block" style="margin-top:12px;" asp-page="/Employer/Listings" asp-route-facilityId="@c.Facility.Id">مدیریت آگهی‌ها و متقاضیان</a>
@if (c.Facility.Verification != JobsMedical.Web.Models.VerificationStatus.Verified)
{
<a class="btn btn-outline btn-block" style="margin-top:8px;" asp-page="/Employer/Verify" asp-route-id="@c.Facility.Id">
@(c.Facility.Verification == JobsMedical.Web.Models.VerificationStatus.Pending ? "مشاهده/افزودن مدارک تأیید" : "درخواست تأیید و بارگذاری مدارک")
</a>
}
</div>
}
</div>
}
</div>