251210:1709 Frontend: reeactor organization and run build
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
admin
2025-12-10 17:09:11 +07:00
parent aa96cd90e3
commit c8a0f281ef
140 changed files with 3780 additions and 1473 deletions

View File

@@ -24,8 +24,8 @@ export function NotificationsDropdown() {
const unreadCount = data?.unreadCount || 0;
const handleNotificationClick = (notification: any) => {
if (!notification.is_read) {
markAsRead.mutate(notification.notification_id);
if (!notification.isRead) {
markAsRead.mutate(notification.notificationId);
}
if (notification.link) {
router.push(notification.link);
@@ -64,21 +64,21 @@ export function NotificationsDropdown() {
<div className="max-h-96 overflow-y-auto">
{notifications.slice(0, 5).map((notification: any) => (
<DropdownMenuItem
key={notification.notification_id}
key={notification.notificationId}
className={`flex flex-col items-start p-3 cursor-pointer ${
!notification.is_read ? 'bg-muted/30' : ''
!notification.isRead ? 'bg-muted/30' : ''
}`}
onClick={() => handleNotificationClick(notification)}
>
<div className="flex justify-between w-full">
<span className="font-medium text-sm">{notification.title}</span>
{!notification.is_read && <span className="h-2 w-2 rounded-full bg-blue-500 mt-1" />}
{!notification.isRead && <span className="h-2 w-2 rounded-full bg-blue-500 mt-1" />}
</div>
<div className="text-xs text-muted-foreground mt-1 line-clamp-2">
{notification.message}
</div>
<div className="text-[10px] text-muted-foreground mt-1 self-end">
{formatDistanceToNow(new Date(notification.created_at), {
{formatDistanceToNow(new Date(notification.createdAt), {
addSuffix: true,
})}
</div>