Updated common (scrollbar directive)

This commit is contained in:
Adina Țeudan 2021-10-12 23:24:12 +03:00
parent d1450c5e57
commit 29fccf4de4
2 changed files with 3 additions and 5 deletions

View File

@ -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');

@ -1 +1 @@
Subproject commit 4040db5fba7c9ae951d721266380dba4bbb312a4
Subproject commit 0de03537c49056ee3d66563619ed496fb55ba296