diff --git a/apps/red-ui/src/app/components/notifications/notifications.component.html b/apps/red-ui/src/app/components/notifications/notifications.component.html index 5f2b7e66b..0d0652faf 100644 --- a/apps/red-ui/src/app/components/notifications/notifications.component.html +++ b/apps/red-ui/src/app/components/notifications/notifications.component.html @@ -32,19 +32,18 @@
-
{{ notification.creationDate | date : 'exactDate' }}
+
{{ notification.creationDate | date: 'exactDate' }}
diff --git a/apps/red-ui/src/app/components/notifications/notifications.component.ts b/apps/red-ui/src/app/components/notifications/notifications.component.ts index 743dcda00..70992bb6f 100644 --- a/apps/red-ui/src/app/components/notifications/notifications.component.ts +++ b/apps/red-ui/src/app/components/notifications/notifications.component.ts @@ -58,6 +58,15 @@ export class NotificationsComponent { await this._notificationsService.toggleNotificationRead(notificationsIds, isRead); } + async handleMarkReadEvent(event: MouseEvent, notifications: Notification[] = this._notificationsService.all, isRead = true) { + if (!(event.target as HTMLBaseElement).href) { + event.stopPropagation(); + event.preventDefault(); + } + + await this.markRead(notifications, isRead); + } + #groupNotifications(notifications: Notification[]): NotificationsGroup[] { const todayTranslation = this._translateService.instant('today'); const groupedMap = notifications.groupBy(n => {