From a5904f55aa9f34c4d2bf7cf023493f9228012727 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Fri, 28 Feb 2025 12:14:50 -0500 Subject: [PATCH] feature/IO-3096-GlobalNotifications - styling checkpoint --- .../notification-center.component.jsx | 54 ++++--- .../notification-center.styles.scss | 139 +++++++++++------- 2 files changed, 113 insertions(+), 80 deletions(-) diff --git a/client/src/components/notification-center/notification-center.component.jsx b/client/src/components/notification-center/notification-center.component.jsx index a314260fc..5311fc78a 100644 --- a/client/src/components/notification-center/notification-center.component.jsx +++ b/client/src/components/notification-center/notification-center.component.jsx @@ -1,5 +1,6 @@ import { Virtuoso } from "react-virtuoso"; -import { Alert, Badge, Button, Checkbox, List, Typography } from "antd"; +import { Alert, Badge, Button, Tooltip, Typography } from "antd"; +import { EyeFilled, EyeOutlined, CheckCircleFilled, CheckCircleOutlined } from "@ant-design/icons"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import "./notification-center.styles.scss"; @@ -23,22 +24,14 @@ const NotificationCenterComponent = ({ const renderNotification = (index, notification) => { return ( - !notification.read && onNotificationClick(notification.id)} > -
- + <div className="notification-content"> + <Title level={5} className="notification-title"> <Link to={`/manage/jobs/${notification.jobid}`} onClick={(e) => { @@ -47,12 +40,15 @@ const NotificationCenterComponent = ({ onNotificationClick(notification.id); } }} + className="ro-number" > RO #{notification.roNumber} </Link> - <Text type="secondary">{day(notification.created_at).fromNow()}</Text> + <Text type="secondary" className="relative-time"> + {day(notification.created_at).fromNow()} + </Text> - +
    {notification.scenarioText.map((text, idx) => (
  • {text}
  • @@ -61,24 +57,36 @@ const NotificationCenterComponent = ({
-
+ ); }; + const hasUnread = notifications.some((n) => !n.read); + return (

{t("notifications.labels.notification-center")}

- toggleUnreadOnly(e.target.checked)}> - {t("notifications.labels.show-unread-only")} - - + +
- {error && onClose()} />} + {error && onClose()} />}