feat: update notification data transformation and enhance user history display
This commit is contained in:
@@ -47,7 +47,7 @@ const transformNotificationData = (apiData) => {
|
||||
return apiData.map((item, index) => ({
|
||||
id: `notification-${item.notification_error_id}-${index}`, // Unique key prefix with array index
|
||||
type: item.is_read ? 'resolved' : item.is_delivered ? 'warning' : 'critical',
|
||||
title: item.device_name || 'Unknown Device',
|
||||
title: item.error_code_name || 'Unknown Error',
|
||||
issue: item.error_code || item.error_code_name || 'Unknown Error',
|
||||
description: `${item.error_code} - ${item.error_code_name || ''}`,
|
||||
timestamp: item.created_at
|
||||
@@ -324,7 +324,6 @@ const ListNotification = memo(function ListNotification(props) {
|
||||
borderColor: notification.isRead ? '#f0f0f0' : '#d6e4ff',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
onClick={() => handleMarkAsRead(notification.id)}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user