@{ ViewData["Title"] = "Notification History"; ViewData["PageIcon"] = "bi-bell"; var items = Model as IEnumerable ?? Enumerable.Empty(); var pageNumber = (int)(ViewBag.PageNumber ?? 1); var pageSize = (int)(ViewBag.PageSize ?? 25); var totalCount = (int)(ViewBag.TotalCount ?? 0); var totalPages = (int)(ViewBag.TotalPages ?? 1); } @section Styles { }
@if (!items.Any()) {

No notifications yet.

} else {
@foreach (var n in items) { bool mIsRead = (bool)n.IsRead; string mTitle = (string)n.Title; string mMessage = (string)n.Message; string? mLink = (string?)n.Link; string mType = (string)n.NotificationType; DateTime mCreatedAt = ((DateTime)n.CreatedAt).Tz(ViewBag.CompanyTimeZone as string);
@if (!mIsRead) { } @mTitle
@mCreatedAt.ToString("MMM d, yyyy h:mm tt")
Type @mType
Message @mMessage
@if (!string.IsNullOrEmpty(mLink)) { }
}
@foreach (var n in items) { bool isRead = (bool)n.IsRead; string title = (string)n.Title; string message = (string)n.Message; string? link = (string?)n.Link; string notifType = (string)n.NotificationType; DateTime createdAt = ((DateTime)n.CreatedAt).Tz(ViewBag.CompanyTimeZone as string); DateTime? readAt = n.ReadAt == null ? (DateTime?)null : ((DateTime)n.ReadAt).Tz(ViewBag.CompanyTimeZone as string); }
Title Message Type Received Read
@if (!isRead) { } @if (!string.IsNullOrEmpty(link)) { @title } else { @title } @message @notifType @createdAt.ToString("MMM d, yyyy h:mm tt") @if (readAt.HasValue) { @readAt.Value.ToString("MMM d, h:mm tt") } else { Unread }
@if (totalPages > 1) { }
} @section Scripts { }