10d4727bd5
- Notification entity + NotificationService: on publish, notify users whose saved prefs match the listing (role/city/+shift type); users with no preference aren't spammed - Wired into PostShift, PostJob, and Admin Review publish - 🔔 bell with unread count in the header (@inject) + /Me/Notifications page (mark-all-read on open) - Reliable in-app delivery (works in Iran without FCM); Web Push can ride the same records later - Verified: employee pref → employer posts matching shift → employee bell=۱ + 'شیفت جدید: پزشک عمومی' Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
1.5 KiB
Plaintext
40 lines
1.5 KiB
Plaintext
@page
|
|
@model JobsMedical.Web.Pages.Me.NotificationsModel
|
|
@{
|
|
ViewData["Title"] = "اعلانها";
|
|
}
|
|
|
|
<div class="page-head">
|
|
<div class="container">
|
|
<h1>🔔 اعلانها</h1>
|
|
<p class="muted">فرصتهای جدید متناسب با علاقهمندیهای تو.
|
|
<a asp-page="/Preferences/Index">تنظیم علاقهمندیها</a></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container section" style="max-width:680px;">
|
|
@if (Model.Items.Count == 0)
|
|
{
|
|
<div class="card empty-state">
|
|
هنوز اعلانی نداری. وقتی شیفت یا استخدام متناسب با علاقهمندیهایت منتشر شود، اینجا میبینی.
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
foreach (var n in Model.Items)
|
|
{
|
|
<a class="card card-pad" href="@(n.Url ?? "#")"
|
|
style="display:block; margin-bottom:10px; @(n.IsRead ? "" : "border-inline-start:4px solid var(--accent);")">
|
|
<div class="row" style="display:flex; justify-content:space-between; align-items:center; gap:8px;">
|
|
<strong>@(n.IsRead ? "" : "🟠 ")@n.Title</strong>
|
|
<span class="muted" style="font-size:12px;">@JalaliDate.ToLongDate(DateOnly.FromDateTime(n.CreatedAt))</span>
|
|
</div>
|
|
@if (!string.IsNullOrEmpty(n.Body))
|
|
{
|
|
<p class="muted" style="margin:6px 0 0; font-size:13.5px;">@n.Body</p>
|
|
}
|
|
</a>
|
|
}
|
|
}
|
|
</div>
|