From 77345c7c987a51dd5db38185f51f52d2ac840c5f Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Wed, 8 Mar 2023 12:36:02 +0200 Subject: [PATCH] RED-6332: Hid notifications button for RED_ADMIN and RED_USER_ADMIN. --- .../base-screen/base-screen.component.html | 5 ++++- .../notifications/notifications.component.html | 18 +++++++++++++++--- .../notifications/notifications.component.ts | 3 ++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.html b/apps/red-ui/src/app/components/base-screen/base-screen.component.html index 4fffdc4e0..515df50ea 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.html +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.html @@ -29,7 +29,10 @@ - + 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 518a46c85..6955d4761 100644 --- a/apps/red-ui/src/app/components/notifications/notifications.component.html +++ b/apps/red-ui/src/app/components/notifications/notifications.component.html @@ -1,4 +1,9 @@ - + @@ -13,14 +18,20 @@
{{ group.date }}
-
+
{{ 'notifications.mark-all-as-read' | translate }}
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 14568e121..8320e4193 100644 --- a/apps/red-ui/src/app/components/notifications/notifications.component.ts +++ b/apps/red-ui/src/app/components/notifications/notifications.component.ts @@ -4,7 +4,7 @@ import { NotificationsService } from '@services/notifications.service'; import { Notification } from '@red/domain'; import { distinctUntilChanged, map } from 'rxjs/operators'; import { Observable } from 'rxjs'; -import { isToday, shareLast } from '@iqser/common-ui'; +import { isToday, shareLast, trackByFactory } from '@iqser/common-ui'; import dayjs, { Dayjs } from 'dayjs'; import { TranslateService } from '@ngx-translate/core'; @@ -29,6 +29,7 @@ function chronologically(first: string, second: string) { export class NotificationsComponent { readonly hasUnreadNotifications$: Observable; readonly groupedNotifications$: Observable; + readonly trackBy = trackByFactory(); constructor( private readonly _notificationsService: NotificationsService,