Add «آماده به کار» (talent) listing type — workers offering themselves
Adds a third listing kind alongside Shift/Job for healthcare staff who advertise their own availability (very common in Iranian medical channels, e.g. "دندانپزشک آماده همکاری… ۵۰٪ تسویه"). These have no facility; the contact phone is the key field. - Model: TalentListing (role, person name, years, licensed, city/district, area note, availability, gender, comp, phone) + ListingKind.Talent + RawListing.LinkedTalentId + DbSet/relations/indexes + EF migration. - Parser: detect آمادهبهکار/جویای کار → Kind=Talent; extract person name, years of experience, licensed flag, area («منطقه ۱»), phone. Facility name extraction now skipped for talent. - Validator: talent path scores role + phone + medical (no facility/pay required). - Ingestion auto-publish: creates a TalentListing for talent kind. - Review (manual publish): Talent option + talent fields; publishes a TalentListing without a facility. Shift/Job facility now falls back to a shared «نامشخص / ثبت نشده» record when the ad names none — publishing never fails on a missing facility. - Browse /Talent (indexable, filters: city/district/role/gender), details /Talent/Details (noindex — personal contact, tel: call button), _TalentCard, badge-talent, nav link, home section. - Sitemap includes /Talent; robots disallows /Talent/Details. Archiver expires stale talent listings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
@page "{id:int}"
|
||||
@model JobsMedical.Web.Pages.Talent.DetailsModel
|
||||
@{
|
||||
var t = Model.Item!;
|
||||
var heading = string.IsNullOrWhiteSpace(t.PersonName) ? (t.Role?.Name ?? "آماده به کار") : t.PersonName!;
|
||||
ViewData["Title"] = $"{heading} — آماده به کار";
|
||||
// Personal contact info: keep this page out of search indexes.
|
||||
ViewData["NoIndex"] = true;
|
||||
string comp;
|
||||
if (t.PayType == JobsMedical.Web.Models.PayType.Percentage && t.SharePercent is int sp)
|
||||
comp = $"{JalaliDate.ToPersianDigits(sp.ToString())}٪ سهم درآمد";
|
||||
else if (t.PayAmount is long pa && pa > 0)
|
||||
comp = JalaliDate.Toman(pa) + " مدنظر";
|
||||
else
|
||||
comp = "توافقی";
|
||||
string? telHref = null;
|
||||
if (!string.IsNullOrWhiteSpace(t.Phone))
|
||||
{
|
||||
var digits = new string(t.Phone.Where(char.IsDigit).ToArray());
|
||||
if (digits.Length >= 7) telHref = "tel:" + digits;
|
||||
}
|
||||
}
|
||||
|
||||
<div class="page-head">
|
||||
<div class="container">
|
||||
<h1>@heading</h1>
|
||||
<p class="muted">آماده همکاری @(t.Role is not null ? "— " + t.Role.Name : "") · 📍 @t.City?.Name@(t.District?.Name is not null ? "، " + t.District.Name : (t.AreaNote is not null ? "، " + t.AreaNote : ""))</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container section">
|
||||
<div class="detail-grid">
|
||||
<div>
|
||||
<div class="card card-pad">
|
||||
<div class="row" style="gap:8px; flex-wrap:wrap;">
|
||||
@if (t.Role is not null) { <span class="badge badge-type">@t.Role.Name</span> }
|
||||
<span class="badge badge-talent">آماده به کار</span>
|
||||
@if (t.YearsExperience is int yrs && yrs > 0) { <span class="badge badge-day">@JalaliDate.ToPersianDigits(yrs.ToString()) سال سابقه</span> }
|
||||
@if (t.IsLicensed) { <span class="badge badge-verified">پروانهدار</span> }
|
||||
@if (t.Gender != JobsMedical.Web.Models.Gender.Any) { <span class="badge badge-gender">@JalaliDate.GenderLabel(t.Gender)</span> }
|
||||
@if (t.Availability is JobsMedical.Web.Models.EmploymentType emp)
|
||||
{
|
||||
<span class="badge badge-job">@(emp switch {
|
||||
JobsMedical.Web.Models.EmploymentType.FullTime => "تماموقت",
|
||||
JobsMedical.Web.Models.EmploymentType.PartTime => "پارهوقت",
|
||||
JobsMedical.Web.Models.EmploymentType.Contract => "قراردادی",
|
||||
_ => "طرح" })</span>
|
||||
}
|
||||
</div>
|
||||
@if (!string.IsNullOrWhiteSpace(t.AreaNote))
|
||||
{
|
||||
<p style="margin:12px 0 0;"><strong>محدوده کاری:</strong> @t.AreaNote</p>
|
||||
}
|
||||
<p style="margin:12px 0 0;"><strong>دستمزد مدنظر:</strong> @comp</p>
|
||||
@if (!string.IsNullOrWhiteSpace(t.Description))
|
||||
{
|
||||
<hr style="border:none; border-top:1px solid var(--line); margin:16px 0;" />
|
||||
<p style="white-space:pre-wrap; margin:0;">@t.Description</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside>
|
||||
<div class="card card-pad">
|
||||
<h3 style="margin-top:0;">تماس</h3>
|
||||
@if (telHref is not null)
|
||||
{
|
||||
<a href="@telHref" class="btn btn-accent btn-block btn-lg" dir="ltr">📞 @t.Phone</a>
|
||||
<p class="muted" style="font-size:12px; margin:10px 0 0;">با این فرد مستقیم تماس بگیرید.</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="muted">شماره تماس ثبت نشده است.</p>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(t.SourceUrl))
|
||||
{
|
||||
<a href="@t.SourceUrl" target="_blank" rel="nofollow noopener" class="btn btn-outline btn-block" style="margin-top:8px;">منبع آگهی ↗</a>
|
||||
}
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user