Files
hamkadr/src/JobsMedical.Web/Pages/Me/Profile.cshtml
T
soroush.asadi aa61efd46f
CI/CD / CI · dotnet build (push) Successful in 47s
CI/CD / Deploy · hamkadr (push) Successful in 1m28s
[Applicant+Admin] Withdraw application, delete account, admin analytics dashboard
Applicant: 'انصراف از درخواست' on /Me removes the Apply event for that shift/job. Account: 'حذف حساب من' on /Me/Profile permanently deletes the user + cascades (profile, alerts, reviews, applications), detaches anonymous visitor history, and signs out (per privacy policy). Admin: /Admin/Analytics dashboard — totals (users, facilities/verified, open shifts/jobs, applications, reviews), 7-day deltas, and a 14-day applications bar chart; linked from Overview alongside the new نظرات moderation page.

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

107 lines
5.8 KiB
Plaintext

@page
@model JobsMedical.Web.Pages.Me.ProfileModel
@{
ViewData["Title"] = "پروفایل من";
}
<div class="page-head">
<div class="container">
<h1>پروفایل من</h1>
<p class="muted"><a asp-page="/Me/Index">← پنل کارجو</a></p>
</div>
</div>
<div class="container section" style="max-width:680px;">
@if (Model.Msg is not null) { <div class="alert alert-success">@Model.Msg</div> }
<form method="post" enctype="multipart/form-data" class="card card-pad">
<div style="display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-bottom:14px;">
<div class="avatar-lg">
@if (Model.HasAvatar)
{
<img src="/avatar/@User.FindFirst(System.Security.Claims.ClaimTypes.NameIdentifier)!.Value" alt="avatar" />
}
else
{
<span>@((Model.FullName ?? Model.Phone).Trim().Substring(0,1))</span>
}
</div>
<div style="flex:1; min-width:200px;">
<label>تصویر پروفایل</label>
<input type="file" name="avatar" accept="image/jpeg,image/png,image/webp" />
<p class="muted" style="font-size:12px; margin:4px 0 0;">JPG/PNG/WebP، حداکثر ۲ مگابایت.</p>
@if (Model.HasAvatar)
{
<button type="submit" asp-page-handler="DeleteAvatar" class="btn btn-outline" style="padding:3px 10px; font-size:12px; margin-top:6px;">حذف تصویر</button>
}
</div>
</div>
<div class="filter-group">
<label>نام و نام خانوادگی</label>
<input type="text" name="FullName" value="@Model.FullName" placeholder="مثلاً دکتر زهرا احمدی" />
</div>
<div class="filter-group">
<label>شماره موبایل</label>
<input type="text" value="@JalaliDate.ToPersianDigits(Model.Phone)" dir="ltr" disabled />
</div>
<div style="display:flex; gap:8px; flex-wrap:wrap;">
<div class="filter-group" style="flex:1; min-width:160px;">
<label>نقش</label>
<select name="RoleId">
<option value="">انتخاب نشده</option>
@foreach (var r in Model.Roles) { <option value="@r.Id" selected="@(Model.RoleId == r.Id)">@r.Name</option> }
</select>
</div>
<div class="filter-group" style="flex:1; min-width:160px;">
<label>شهر</label>
<select name="CityId">
<option value="">انتخاب نشده</option>
@foreach (var c in Model.Cities) { <option value="@c.Id" selected="@(Model.CityId == c.Id)">@c.Name</option> }
</select>
</div>
</div>
<div style="display:flex; gap:8px; flex-wrap:wrap;">
<div class="filter-group" style="flex:1; min-width:160px;">
<label>تخصص / سمت</label>
<input type="text" name="Specialty" value="@Model.Specialty" placeholder="مثلاً پرستار ICU" />
</div>
<div class="filter-group" style="flex:1; min-width:120px;">
<label>سابقه (سال)</label>
<input type="number" name="YearsExperience" min="0" max="70" value="@Model.YearsExperience" dir="ltr" />
</div>
</div>
<div class="filter-group">
<label>شماره نظام پزشکی/پرستاری (اختیاری)</label>
<input type="text" name="LicenseNo" value="@Model.LicenseNo" dir="ltr" />
</div>
<div class="filter-group">
<label>درباره من</label>
<textarea name="Bio" rows="4" placeholder="معرفی کوتاه، مهارت‌ها و سابقه...">@Model.Bio</textarea>
</div>
<div class="filter-group">
<label>رزومه (رزومه شغلی)</label>
@if (Model.ResumeName is not null)
{
<p style="margin:0 0 6px;">
<a href="/resume/@User.FindFirst(System.Security.Claims.ClaimTypes.NameIdentifier)!.Value" target="_blank">📎 @Model.ResumeName</a>
<button type="submit" asp-page-handler="DeleteResume" class="btn btn-outline" style="padding:3px 10px; font-size:12px; margin-inline-start:8px; color:var(--danger); border-color:var(--danger);">حذف</button>
</p>
}
<input type="file" name="resume" accept="image/jpeg,image/png,image/webp,application/pdf" />
<p class="muted" style="font-size:12px; margin:4px 0 0;">PDF یا تصویر، حداکثر ۵ مگابایت. مراکز درمانی هنگام بررسی درخواست شما می‌توانند آن را ببینند.</p>
</div>
<button type="submit" class="btn btn-accent btn-block btn-lg">ذخیره پروفایل</button>
</form>
<div class="card card-pad" style="margin-top:14px; border-color:var(--danger);">
<h3 style="margin-top:0; color:var(--danger);">حذف حساب کاربری</h3>
<p class="muted" style="font-size:13px;">با حذف حساب، اطلاعات پروفایل، رزومه، هشدارها و درخواست‌های شما حذف می‌شود. این کار بازگشت‌ناپذیر است.</p>
<form method="post" asp-page-handler="DeleteAccount" onsubmit="return confirm('آیا از حذف کامل حساب خود مطمئنی؟ این کار بازگشت‌ناپذیر است.');">
<button type="submit" class="btn btn-outline" style="color:var(--danger); border-color:var(--danger);">حذف حساب من</button>
</form>
</div>
</div>