notification

This commit is contained in:
2026-08-07 08:52:51 +07:00
parent 26094ee4d6
commit 302d262d33
7 changed files with 1112 additions and 8 deletions

View File

@@ -268,7 +268,7 @@
}
</style>
<link rel="stylesheet" href="../css/responsive.css?v=20260717-2" />
<link rel="stylesheet" href="../css/responsive.css?v=20260807-1" />
</head>
<body class="app-shell bg-background text-on-surface antialiased flex h-screen w-screen">
<!-- SideNavBar -->
@@ -297,6 +297,11 @@
<span class="material-symbols-outlined">manage_accounts</span>
<span>Tài khoản</span>
</a>
<a href="#notifications" data-nav="notifications" class="relative flex items-center gap-3 px-3 py-2 text-slate-600 dark:text-slate-400 hover:text-slate-900 hover:bg-slate-200/50 transition-all group cursor-pointer rounded-r-lg">
<span class="material-symbols-outlined">notifications</span>
<span>Thông báo</span>
<span id="notificationNavBadge" class="hidden ml-auto min-w-[20px] h-5 px-1.5 rounded-full bg-red-600 text-white text-[10px] font-extrabold leading-5 text-center">0</span>
</a>
</div>
</div>
@@ -376,6 +381,26 @@
</button>
</div>
<div class="topbar-actions flex items-center gap-4">
<div id="notificationCenterShell" class="relative">
<button id="notificationsBellBtn" type="button" class="relative inline-flex items-center justify-center w-10 h-10 rounded-lg text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors" title="Thông báo" aria-label="Mở thông báo" aria-haspopup="true" aria-expanded="false">
<span class="material-symbols-outlined">notifications</span>
<span id="notificationBadge" class="hidden absolute -top-1 -right-1 min-w-[20px] h-5 px-1 rounded-full bg-red-600 text-white text-[10px] font-extrabold leading-5 text-center ring-2 ring-slate-50 dark:ring-slate-950">0</span>
</button>
<div id="notificationPopover" class="hidden absolute right-0 top-12 z-50 w-[min(390px,calc(100vw-24px))] overflow-hidden rounded-2xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 shadow-2xl" role="dialog" aria-label="Thông báo gần đây">
<div class="flex items-center justify-between gap-3 px-4 py-3 border-b border-slate-100 dark:border-slate-800">
<div>
<h2 class="text-sm font-bold text-slate-900 dark:text-slate-50">Thông báo</h2>
<p id="notificationPopoverSummary" class="text-[11px] text-slate-500">Không có thông báo mới</p>
</div>
<button id="notificationMarkAllBtn" type="button" class="text-xs font-semibold text-primary hover:underline">Đánh dấu đã đọc</button>
</div>
<div id="notificationPopoverList" class="max-h-[420px] overflow-y-auto"></div>
<a href="#notifications" id="notificationViewAllLink" class="flex items-center justify-center gap-1 px-4 py-3 border-t border-slate-100 dark:border-slate-800 text-xs font-bold text-primary hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors">
Xem tất cả
<span class="material-symbols-outlined text-base">arrow_forward</span>
</a>
</div>
</div>
<button id="pendingAssetRequestsBtn" type="button" class="hidden relative flex items-center gap-2 px-3 py-2 rounded-lg border border-amber-200 bg-amber-50 hover:bg-amber-100 text-amber-800 transition-colors" title="Đơn chờ xử lý">
<span class="material-symbols-outlined text-base">notifications_active</span>
<span class="text-xs font-bold">Đơn chờ</span>
@@ -400,6 +425,6 @@
</div>
</main>
<script src="../js/app.js?v=20260806-4"></script>
<script src="../js/app.js?v=20260806-5"></script>
</body>
</html>