68 lines
2.4 KiB
Plaintext
68 lines
2.4 KiB
Plaintext
@model NotificationItem
|
|
@{
|
|
ViewData["Title"] = "Detail Notifikasi";
|
|
}
|
|
|
|
<div class="flex flex-col gap-2 md:flex-row md:justify-between md:gap-0">
|
|
<div class="prose">
|
|
<span class="text-xl font-semibold text-gray-900 font-['Plus_Jakarta_Sans']">
|
|
Notifikasi
|
|
</span>
|
|
</div>
|
|
|
|
<div class="flex flex-col gap-2 sm:flex-row">
|
|
<a href="@Url.Action("Index", "Notifications")" class="btn btn-sm w-full sm:w-auto rounded-full bg-white border border-gray-300 hover:bg-gray-50" onclick="modal_download.showModal()">
|
|
<i class="ph ph-arrow-left"></i>
|
|
Kembali
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="h-6"></div>
|
|
|
|
<div class="card bg-white shadow-sm border border-gray-100">
|
|
<div class="card-body space-y-4">
|
|
<div class="flex flex-wrap items-center gap-2 text-sm">
|
|
<span class="badge badge-outline rounded">@GetCategoryLabel(Model.Category)</span>
|
|
<span class="badge badge-soft rounded-full @GetSeverityClass(Model.Severity)">@GetSeverityLabel(Model.Severity)</span>
|
|
<span class="badge @(Model.IsRead ? "badge-ghost text-gray-600" : "badge-primary")">
|
|
@(Model.IsRead ? "Sudah Dibaca" : "Belum Dibaca")
|
|
</span>
|
|
<span class="text-gray-500">
|
|
@Model.CreatedAt.ToString("dd MMMM yyyy HH:mm")
|
|
</span>
|
|
</div>
|
|
|
|
<article class="prose max-w-none text-gray-800 whitespace-pre-line leading-relaxed">
|
|
@Model.Summary
|
|
</article>
|
|
</div>
|
|
</div>
|
|
|
|
@functions {
|
|
private static string GetCategoryLabel(NotificationCategory category) => category switch
|
|
{
|
|
NotificationCategory.StatusAkun => "Status Akun",
|
|
NotificationCategory.Transaksi => "Transaksi",
|
|
NotificationCategory.Pengajuan => "Pengajuan",
|
|
_ => category.ToString()
|
|
};
|
|
|
|
private static string GetSeverityClass(NotificationSeverity severity) => severity switch
|
|
{
|
|
NotificationSeverity.Success => "badge-success",
|
|
NotificationSeverity.Warning => "badge-warning",
|
|
NotificationSeverity.Error => "badge-error",
|
|
_ => "badge-neutral"
|
|
};
|
|
|
|
private static string GetSeverityLabel(NotificationSeverity severity) => severity switch
|
|
{
|
|
NotificationSeverity.Success => "Sukses",
|
|
NotificationSeverity.Warning => "Peringatan",
|
|
NotificationSeverity.Error => "Gagal",
|
|
NotificationSeverity.Info => "Info",
|
|
_ => severity.ToString()
|
|
};
|
|
}
|