21befd5b1e
The server clock is correct (UTC); the app rendered UTC wall-clock directly, so the run log showed ~3.5h behind Tehran. Add JalaliDate.ToTehran (flat UTC+3:30 — Iran dropped DST in 2022) + DateTimeLabel, and convert the UTC-stored timestamp displays (ingestion run log, RawListing FetchedAt, report CreatedAt). Shift start/end inputs are TimeOnly, left as-is. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
115 lines
6.2 KiB
Plaintext
115 lines
6.2 KiB
Plaintext
@page
|
|
@model JobsMedical.Web.Pages.Admin.IngestedModel
|
|
@{
|
|
ViewData["Title"] = "نتایج جمعآوری";
|
|
string P(int n) => JalaliDate.ToPersianDigits(n.ToString());
|
|
int C(JobsMedical.Web.Models.RawListingStatus s) => Model.Counts.GetValueOrDefault(s);
|
|
string Pill(string key, string label, int count) =>
|
|
$"<a class=\"ing-pill {(Model.Status == key || (Model.Status is null && key == "all") ? "active" : "")}\" href=\"?status={key}\">{label} ({P(count)})</a>";
|
|
}
|
|
|
|
<div class="page-head">
|
|
<div class="container">
|
|
<h1>نتایج جمعآوری</h1>
|
|
<p class="muted"><a asp-page="/Admin/Index">← صف بررسی</a> — همهی آگهیهای جمعآوریشده و وضعیت هرکدام.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container section">
|
|
@if (Model.Message is not null)
|
|
{
|
|
<div class="alert alert-success">✓ @Model.Message</div>
|
|
}
|
|
|
|
@{ int publishedCount = Model.Counts.GetValueOrDefault(JobsMedical.Web.Models.RawListingStatus.Normalized); }
|
|
@if (publishedCount > 0)
|
|
{
|
|
<form method="post" asp-page-handler="ArchivePublished"
|
|
onsubmit="return confirm('همه آگهیهای منتشرشده از جمعآوری از سایت پنهان (بایگانی) میشوند. دادهها حذف نمیشوند و برای تحلیل باقی میمانند. ادامه میدهی؟');"
|
|
style="margin-bottom:14px;">
|
|
<button type="submit" class="btn btn-outline">
|
|
🗄 بایگانی گروهی همهی منتشرشدهها (@JalaliDate.ToPersianDigits(publishedCount.ToString()))
|
|
</button>
|
|
<span class="muted" style="font-size:12px; margin-inline-start:8px;">از سایت پنهان میکند ولی هیچچیز حذف نمیشود (آرشیو برای تحلیل).</span>
|
|
</form>
|
|
}
|
|
|
|
@if (Model.SourceBreakdown.Count > 0)
|
|
{
|
|
<div class="card card-pad" style="margin-bottom:14px;">
|
|
<strong style="display:block; margin-bottom:8px;">📊 به تفکیک منبع</strong>
|
|
<table style="width:100%; border-collapse:collapse; font-size:13.5px;">
|
|
<thead>
|
|
<tr style="color:var(--muted);">
|
|
<th style="text-align:start; padding:4px 0;">منبع</th>
|
|
<th style="text-align:start;">منتشرشده</th>
|
|
<th style="text-align:start;">کل دریافت</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var s in Model.SourceBreakdown)
|
|
{
|
|
<tr style="border-top:1px solid var(--line);">
|
|
<td style="padding:6px 0;"><strong>@s.Source</strong></td>
|
|
<td><span class="badge badge-verified">@P(s.Published)</span></td>
|
|
<td class="muted">@P(s.Total)</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|
|
|
|
<div class="ing-filters">
|
|
@Html.Raw(Pill("all", "همه", Model.Counts.Values.Sum()))
|
|
@Html.Raw(Pill("new", "در صف", C(JobsMedical.Web.Models.RawListingStatus.New)))
|
|
@Html.Raw(Pill("flagged", "پرچمخورده", C(JobsMedical.Web.Models.RawListingStatus.Flagged)))
|
|
@Html.Raw(Pill("published", "منتشرشده", C(JobsMedical.Web.Models.RawListingStatus.Normalized)))
|
|
@Html.Raw(Pill("discarded", "ردشده/اسپم", C(JobsMedical.Web.Models.RawListingStatus.Discarded)))
|
|
</div>
|
|
|
|
<p class="muted" style="font-size:13px;">@P(Model.Total) نتیجه (نمایش حداکثر ۲۰۰ مورد اخیر).</p>
|
|
|
|
@if (Model.Items.Count == 0)
|
|
{
|
|
<div class="card empty-state">موردی با این فیلتر نیست.</div>
|
|
}
|
|
else
|
|
{
|
|
foreach (var r in Model.Items)
|
|
{
|
|
var (cls, label) = r.Status switch
|
|
{
|
|
JobsMedical.Web.Models.RawListingStatus.New => ("badge-day", "در صف"),
|
|
JobsMedical.Web.Models.RawListingStatus.Flagged => ("badge-type", "پرچمخورده"),
|
|
JobsMedical.Web.Models.RawListingStatus.Normalized => ("badge-verified", "منتشر شد"),
|
|
_ => ("badge-gender", "رد شد"),
|
|
};
|
|
<div class="card card-pad" style="margin-bottom:10px;">
|
|
<div class="row" style="display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap;">
|
|
<strong>@r.SourceChannel</strong>
|
|
<span style="display:flex; gap:6px; align-items:center;">
|
|
<span class="badge @cls">@label</span>
|
|
<span class="badge badge-type">اطمینان @P(r.Confidence)٪</span>
|
|
<span class="muted" style="font-size:12px;">@JalaliDate.DateTimeLabel(r.FetchedAt)</span>
|
|
</span>
|
|
</div>
|
|
<p style="margin:8px 0; white-space:pre-wrap; font-size:13.5px;">@(r.RawText.Length > 320 ? r.RawText.Substring(0,320) + "…" : r.RawText)</p>
|
|
@if (!string.IsNullOrEmpty(r.ValidationNotes)) { <p class="muted" style="font-size:12px; margin:0 0 6px;">⚠ @r.ValidationNotes</p> }
|
|
@if (r.Status == JobsMedical.Web.Models.RawListingStatus.New || r.Status == JobsMedical.Web.Models.RawListingStatus.Flagged)
|
|
{
|
|
<a class="btn btn-outline" style="padding:4px 12px; font-size:13px;" asp-page="/Admin/Review" asp-route-id="@r.Id">بررسی و انتشار ←</a>
|
|
}
|
|
else if (r.LinkedShiftId is int sid)
|
|
{
|
|
<a class="btn btn-outline" style="padding:4px 12px; font-size:13px;" asp-page="/Shifts/Details" asp-route-id="@sid" target="_blank">مشاهده آگهی منتشرشده</a>
|
|
}
|
|
else if (r.LinkedTalentId is int tid)
|
|
{
|
|
<a class="btn btn-outline" style="padding:4px 12px; font-size:13px;" asp-page="/Talent/Details" asp-route-id="@tid" target="_blank">مشاهده «آماده به کار» منتشرشده</a>
|
|
}
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|