From 29fccf4de44924d4d4d1fbffe634aeca62ac75d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 12 Oct 2021 23:24:12 +0300 Subject: [PATCH] Updated common (scrollbar directive) --- .../app/components/notifications/notifications.component.ts | 6 ++---- libs/common-ui | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) 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 1cc50d2a1..f50474a7e 100644 --- a/apps/red-ui/src/app/components/notifications/notifications.component.ts +++ b/apps/red-ui/src/app/components/notifications/notifications.component.ts @@ -18,6 +18,7 @@ import { DossiersService } from '@services/entity-services/dossiers.service'; export class NotificationsComponent { notifications: Notification[]; groupedNotifications: { dateString: string; notifications: Notification[] }[] = []; + hasUnreadNotifications = false; constructor( private readonly _translateService: TranslateService, @@ -30,13 +31,10 @@ export class NotificationsComponent { this._notificationControllerService.getNotifications(false).subscribe((response: NotificationResponse) => { this.notifications = response.notifications.filter(notification => this._isSupportedType(notification)); this._groupNotifications(this.notifications); + this.hasUnreadNotifications = this.notifications?.filter(n => !n.readDate).length > 0; }); } - get hasUnreadNotifications() { - return this.notifications?.filter(n => !n.readDate).length > 0; - } - getTime(date: string): string { moment.locale(this._translateService.currentLang); return moment(date).format('hh:mm A'); diff --git a/libs/common-ui b/libs/common-ui index 4040db5fb..0de03537c 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 4040db5fba7c9ae951d721266380dba4bbb312a4 +Subproject commit 0de03537c49056ee3d66563619ed496fb55ba296