Admin: bulk-delete published ingested posts; talent: point to source when no phone
CI/CD / CI · dotnet build (push) Successful in 1m52s
CI/CD / Deploy · hamkadr (push) Successful in 2m41s

- /Admin/Ingested: "حذف گروهی همه‌ی منتشرشده‌ها" button removes, in one
  transaction, every aggregated Shift/Job/Talent published from ingestion
  plus the approved (Normalized) raw items that produced them. Confirms
  first and reports counts. Raw rows deleted before the posts (they hold
  the FKs); DB cascade clears applications/interest events.
- Talent details: when the contact number couldn't be extracted (e.g.
  Divar's login-gated reveal), show a prominent "مشاهده شماره در دیوار/مدجابز ↗"
  link to the original ad instead of the call button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-08 08:36:12 +03:30
parent a5d6e212e2
commit b092a5cfe5
3 changed files with 53 additions and 4 deletions
@@ -19,6 +19,13 @@
var digits = new string(t.Phone.Where(char.IsDigit).ToArray());
if (digits.Length >= 7) telHref = "tel:" + digits;
}
// Friendly source name (used to point users to the original ad when no number was extracted).
string? sourceName = null;
if (!string.IsNullOrWhiteSpace(t.SourceUrl))
{
var host = System.Uri.TryCreate(t.SourceUrl, UriKind.Absolute, out var su) ? su.Host : t.SourceUrl!;
sourceName = host.Contains("divar") ? "دیوار" : host.Contains("medjobs") ? "مدجابز" : host;
}
}
<div class="page-head">
@@ -68,14 +75,17 @@
<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 if (!string.IsNullOrWhiteSpace(t.SourceUrl))
{
@* Number wasn't extractable (e.g. behind a login-gated reveal) — point to the source. *@
<p class="muted" style="margin-top:0;">شماره مستقیم استخراج نشد.</p>
<a href="@t.SourceUrl" target="_blank" rel="nofollow noopener" class="btn btn-accent btn-block btn-lg">مشاهده شماره در @sourceName ↗</a>
<p class="muted" style="font-size:12px; margin:10px 0 0;">این آگهی از @sourceName جمع‌آوری شده؛ برای دریافت شماره به آگهی اصلی مراجعه کن.</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>