Updated common (scrollbar directive)
This commit is contained in:
parent
d1450c5e57
commit
29fccf4de4
@ -18,6 +18,7 @@ import { DossiersService } from '@services/entity-services/dossiers.service';
|
|||||||
export class NotificationsComponent {
|
export class NotificationsComponent {
|
||||||
notifications: Notification[];
|
notifications: Notification[];
|
||||||
groupedNotifications: { dateString: string; notifications: Notification[] }[] = [];
|
groupedNotifications: { dateString: string; notifications: Notification[] }[] = [];
|
||||||
|
hasUnreadNotifications = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly _translateService: TranslateService,
|
private readonly _translateService: TranslateService,
|
||||||
@ -30,13 +31,10 @@ export class NotificationsComponent {
|
|||||||
this._notificationControllerService.getNotifications(false).subscribe((response: NotificationResponse) => {
|
this._notificationControllerService.getNotifications(false).subscribe((response: NotificationResponse) => {
|
||||||
this.notifications = response.notifications.filter(notification => this._isSupportedType(notification));
|
this.notifications = response.notifications.filter(notification => this._isSupportedType(notification));
|
||||||
this._groupNotifications(this.notifications);
|
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 {
|
getTime(date: string): string {
|
||||||
moment.locale(this._translateService.currentLang);
|
moment.locale(this._translateService.currentLang);
|
||||||
return moment(date).format('hh:mm A');
|
return moment(date).format('hh:mm A');
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 4040db5fba7c9ae951d721266380dba4bbb312a4
|
Subproject commit 0de03537c49056ee3d66563619ed496fb55ba296
|
||||||
Loading…
x
Reference in New Issue
Block a user