From cbcf3e89608a5ef753d195fdacb106fc72c14830 Mon Sep 17 00:00:00 2001 From: Nilanshu Date: Tue, 3 Nov 2020 15:20:37 +0530 Subject: [PATCH] fixed small errors --- backend/backend/services/mailService.js | 2 ++ dashboard/.gitignore | 1 + dashboard/debug.log | 1 + dashboard/src/components/nav/TopNav.js | 6 ++++-- .../components/notification/NotificationMenu.js | 15 +++++++++++---- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/backend/backend/services/mailService.js b/backend/backend/services/mailService.js index 69d613485b..3d1b1cd31a 100755 --- a/backend/backend/services/mailService.js +++ b/backend/backend/services/mailService.js @@ -1066,6 +1066,8 @@ const _this = { firstName, userId, projectId, + ack_url : acknowledgeUrl, + resolve_url: resolveUrl, acknowledgeUrl, resolveUrl, incidentType, diff --git a/dashboard/.gitignore b/dashboard/.gitignore index a0ff0634a5..87e2cf38e6 100755 --- a/dashboard/.gitignore +++ b/dashboard/.gitignore @@ -19,6 +19,7 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +debug.log yarn.lock Untitled-1 diff --git a/dashboard/debug.log b/dashboard/debug.log index 1c93f67978..c3ba366475 100644 --- a/dashboard/debug.log +++ b/dashboard/debug.log @@ -65,3 +65,4 @@ [1102/151905.525:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5) [1102/151905.525:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022) [1102/151905.525:ERROR:exception_snapshot_win.cc(99)] thread ID 13024 not found in process +[1103/081245.415:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3) diff --git a/dashboard/src/components/nav/TopNav.js b/dashboard/src/components/nav/TopNav.js index 0b53386260..fd098d2007 100755 --- a/dashboard/src/components/nav/TopNav.js +++ b/dashboard/src/components/nav/TopNav.js @@ -89,7 +89,8 @@ class TopContent extends Component {
0 ? 'red' : 'green' - } Text-color--white Border-radius--4 Text-fontWeight--bold Padding-left--8 Padding-right--8 Padding-top--4 Padding-bottom--4 pointer`} + } Text-color--white Border-radius--4 Text-fontWeight--bold Padding-left--8 Padding-right--8 pointer`} + style={{paddingBottom:'6px',paddingTop:'6px'}} onClick={this.handleActiveIncidentClick} id="activeIncidents" > @@ -125,7 +126,8 @@ class TopContent extends Component { }); return count > 0 ? (
diff --git a/dashboard/src/components/notification/NotificationMenu.js b/dashboard/src/components/notification/NotificationMenu.js index 0f4d7b23f3..4b9a3af176 100755 --- a/dashboard/src/components/notification/NotificationMenu.js +++ b/dashboard/src/components/notification/NotificationMenu.js @@ -81,7 +81,15 @@ class NotificationMenu extends Component { render() { const userId = User.getUserId(); - return this.props.notificationsVisible ? ( + const allRead = this.props.notifications && + this.props.notifications.notifications && + this.props.notifications.notifications + .length ? ( + this.props.notifications.notifications + .filter(notification => notification && + notification.read && notification.read + .indexOf(userId) <= -1)).length : null; + return this.props.notificationsVisible ? (
NOTIFICATIONS - - this.markAllAsRead( @@ -148,7 +155,7 @@ class NotificationMenu extends Component { } > Mark All As Read - + : ''}