@using System.Security.Claims
@inject JobsMedical.Web.Services.NotificationService Notifications
@{
var title = ViewData["Title"] as string;
int unreadCount = 0;
if (User.Identity?.IsAuthenticated == true && int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier), out var _uid))
{
unreadCount = await Notifications.UnreadCountAsync(_uid);
}
}
@(title is null ? "همکادر | شیفت و استخدام کادر درمان" : title + " | همکادر")
@* Preload the body-weight font so the swap from Tahoma happens fast. Vazirmatn is
self-hosted under wwwroot/fonts (@@font-face in site.css) — no external CDN. *@
@* PWA: installable app (Web/Windows/Android via this manifest; iOS via apple-* tags) *@
@RenderBody()
@* Register the PWA service worker (offline + push notifications). *@
@* Live in-app notifications over SSE (our own origin — works in Iran, no Google push).
Updates the bell badge, shows a toast, and fires a local OS notification when allowed. *@
@if (User.Identity?.IsAuthenticated == true)
{
}
@await RenderSectionAsync("Scripts", required: false)