2026-06-03 06:31:15 +03:30
|
|
|
@page
|
|
|
|
|
@model JobsMedical.Web.Pages.Admin.FacilitiesModel
|
|
|
|
|
@{
|
|
|
|
|
ViewData["Title"] = "مدیریت مراکز درمانی";
|
|
|
|
|
string TypeLabel(FacilityType t) => t switch
|
|
|
|
|
{
|
|
|
|
|
FacilityType.Hospital => "بیمارستان",
|
|
|
|
|
FacilityType.Clinic => "کلینیک",
|
|
|
|
|
_ => "درمانگاه",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div class="page-head">
|
|
|
|
|
<div class="container">
|
|
|
|
|
<h1>تأیید مراکز درمانی</h1>
|
|
|
|
|
<p class="muted">
|
|
|
|
|
<a asp-page="/Admin/Index">← صف آگهیها</a>
|
2026-06-04 16:26:15 +03:30
|
|
|
· @JalaliDate.ToPersianDigits(Model.Awaiting.Count.ToString()) مرکز منتظر بررسی
|
2026-06-03 06:31:15 +03:30
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="container section">
|
2026-06-04 16:26:15 +03:30
|
|
|
@if (Model.Msg is not null) { <div class="alert alert-success">@Model.Msg</div> }
|
|
|
|
|
|
|
|
|
|
<h2 style="font-size:20px;">منتظر بررسی (مدارک ارسالشده)</h2>
|
|
|
|
|
@if (Model.Awaiting.Count == 0)
|
2026-06-03 06:31:15 +03:30
|
|
|
{
|
2026-06-04 16:26:15 +03:30
|
|
|
<div class="card empty-state">مرکزی منتظر بررسی نیست.</div>
|
2026-06-03 06:31:15 +03:30
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2026-06-04 16:26:15 +03:30
|
|
|
foreach (var f in Model.Awaiting)
|
2026-06-03 06:31:15 +03:30
|
|
|
{
|
|
|
|
|
<div class="card card-pad" style="margin-bottom:10px;">
|
2026-06-04 16:26:15 +03:30
|
|
|
<div class="row" style="display:flex; justify-content:space-between; align-items:flex-start; gap:10px;">
|
2026-06-03 06:31:15 +03:30
|
|
|
<div>
|
2026-06-04 16:26:15 +03:30
|
|
|
<strong>@f.Name</strong> — @TypeLabel(f.Type) <span class="badge badge-type">در حال بررسی</span>
|
2026-06-03 06:31:15 +03:30
|
|
|
<div class="muted" style="font-size:13px;">
|
|
|
|
|
📍 @f.City?.Name@(f.District is not null ? "، " + f.District.Name : "")
|
|
|
|
|
@if (f.OwnerUser is not null) { <text> · مالک: <span dir="ltr">@JalaliDate.ToPersianDigits(f.OwnerUser.Phone)</span></text> }
|
|
|
|
|
@if (!string.IsNullOrEmpty(f.Phone)) { <text> · تلفن: <span dir="ltr">@JalaliDate.ToPersianDigits(f.Phone)</span></text> }
|
|
|
|
|
</div>
|
|
|
|
|
@if (!string.IsNullOrEmpty(f.Address)) { <div class="muted" style="font-size:13px;">@f.Address</div> }
|
|
|
|
|
</div>
|
2026-06-04 16:26:15 +03:30
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="margin:10px 0;">
|
|
|
|
|
<strong style="font-size:13px;">مدارک (@JalaliDate.ToPersianDigits(f.Documents.Count.ToString())):</strong>
|
|
|
|
|
@if (f.Documents.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
<span class="muted" style="font-size:13px;"> — مدرکی بارگذاری نشده.</span>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<div style="display:flex; flex-wrap:wrap; gap:8px; margin-top:6px;">
|
|
|
|
|
@foreach (var d in f.Documents)
|
|
|
|
|
{
|
|
|
|
|
<a class="btn btn-outline" style="padding:6px 12px; font-size:13px;" href="/facility-doc/@d.Id" target="_blank">📎 @d.FileName</a>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="display:flex; gap:8px; flex-wrap:wrap; align-items:flex-end;">
|
2026-06-03 06:31:15 +03:30
|
|
|
<form method="post">
|
2026-06-04 16:26:15 +03:30
|
|
|
<button asp-page-handler="Verify" asp-route-id="@f.Id" class="btn btn-accent" style="white-space:nowrap;">✓ تأیید شد</button>
|
|
|
|
|
</form>
|
|
|
|
|
<form method="post" style="display:flex; gap:6px; flex:1; min-width:220px;">
|
|
|
|
|
<input type="text" name="note" placeholder="دلیل رد (اختیاری)" style="flex:1;" />
|
|
|
|
|
<button asp-page-handler="Reject" asp-route-id="@f.Id" class="btn btn-outline" style="white-space:nowrap; color:var(--danger); border-color:var(--danger);">رد</button>
|
2026-06-03 06:31:15 +03:30
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<h2 style="font-size:20px; margin-top:30px;">مراکز تأییدشده</h2>
|
|
|
|
|
@if (Model.Verified.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
<div class="card empty-state">هنوز مرکزی تأیید نشده.</div>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
foreach (var f in Model.Verified)
|
|
|
|
|
{
|
|
|
|
|
<div class="card card-pad" style="margin-bottom:10px;">
|
|
|
|
|
<div class="row" style="display:flex; justify-content:space-between; align-items:center; gap:10px;">
|
|
|
|
|
<div>
|
|
|
|
|
<strong>@f.Name</strong> <span class="badge badge-verified">✓ تأیید شده</span>
|
|
|
|
|
<div class="muted" style="font-size:13px;">📍 @f.City?.Name — @TypeLabel(f.Type)</div>
|
|
|
|
|
</div>
|
|
|
|
|
<form method="post">
|
|
|
|
|
<button asp-page-handler="Unverify" asp-route-id="@f.Id" class="btn btn-outline" style="white-space:nowrap;">لغو تأیید</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-06-04 16:26:15 +03:30
|
|
|
|
|
|
|
|
@if (Model.Others.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
<h2 style="font-size:20px; margin-top:30px;">سایر مراکز (بدون درخواست تأیید)</h2>
|
|
|
|
|
foreach (var f in Model.Others)
|
|
|
|
|
{
|
|
|
|
|
<div class="card card-pad" style="margin-bottom:10px;">
|
|
|
|
|
<div class="row" style="display:flex; justify-content:space-between; align-items:center; gap:10px;">
|
|
|
|
|
<div>
|
|
|
|
|
<strong>@f.Name</strong> — @TypeLabel(f.Type)
|
|
|
|
|
@if (f.Verification == JobsMedical.Web.Models.VerificationStatus.Rejected) { <span class="badge badge-gender">رد شده</span> }
|
|
|
|
|
<div class="muted" style="font-size:13px;">📍 @f.City?.Name@(f.District is not null ? "، " + f.District.Name : "")</div>
|
|
|
|
|
</div>
|
|
|
|
|
<form method="post">
|
|
|
|
|
<button asp-page-handler="Verify" asp-route-id="@f.Id" class="btn btn-accent" style="white-space:nowrap;">✓ تأیید مستقیم</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-06-03 06:31:15 +03:30
|
|
|
</div>
|