import { Subscription } from 'rxjs';
import { Icons } from '../../../shared/enum/icons.enum';
+import { CdNotification } from '../../../shared/models/cd-notification';
import { NotificationService } from '../../../shared/services/notification.service';
import { SummaryService } from '../../../shared/services/summary.service';
export class NotificationsComponent implements OnInit, OnDestroy {
icons = Icons;
hasRunningTasks = false;
+ hasNotifications = false;
private subs = new Subscription();
constructor(
this.hasRunningTasks = summary.executing_tasks.length > 0;
})
);
+
+ this.subs.add(
+ this.notificationService.data$.subscribe((notifications: CdNotification[]) => {
+ this.hasNotifications = notifications.length > 0;
+ })
+ );
}
ngOnDestroy(): void {