|
|
|
@ -24,24 +24,32 @@ |
|
|
|
</button> |
|
|
|
</section> |
|
|
|
<mat-divider></mat-divider> |
|
|
|
<div *ngIf="(notifications$ | async).length; else emptyNotification" style="overflow: auto"> |
|
|
|
<section style="min-height: 100px; overflow: auto; padding: 6px 0;"> |
|
|
|
<div *ngFor="let notification of (notifications$ | async); let last = last; trackBy: trackById"> |
|
|
|
<tb-notification [notification]="notification" |
|
|
|
[onClose]="onClose" |
|
|
|
(markAsRead)="markAsRead($event)"> |
|
|
|
</tb-notification> |
|
|
|
<mat-divider *ngIf="!last" style="margin: 4px"></mat-divider> |
|
|
|
</div> |
|
|
|
<ng-container *ngIf="loadNotification; else loadingNotification"> |
|
|
|
<div *ngIf="(notifications$ | async).length; else emptyNotification" style="overflow: auto"> |
|
|
|
<section style="min-height: 100px; overflow: auto; padding: 6px 0;"> |
|
|
|
<div *ngFor="let notification of (notifications$ | async); let last = last; trackBy: trackById"> |
|
|
|
<tb-notification [notification]="notification" |
|
|
|
[onClose]="onClose" |
|
|
|
(markAsRead)="markAsRead($event)"> |
|
|
|
</tb-notification> |
|
|
|
<mat-divider *ngIf="!last" style="margin: 4px"></mat-divider> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
<mat-divider *ngIf="(notifications$ | async).length"></mat-divider> |
|
|
|
<section fxLayoutAlign="center center" *ngIf="(notifications$ | async).length"> |
|
|
|
<button fxFlex mat-button color="primary" (click)="viewAll($event)"> |
|
|
|
{{ 'notification.view-all' | translate }} |
|
|
|
</button> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
<mat-divider *ngIf="(notifications$ | async).length"></mat-divider> |
|
|
|
<section fxLayoutAlign="center center" *ngIf="(notifications$ | async).length"> |
|
|
|
<button fxFlex mat-button color="primary" (click)="viewAll($event)"> |
|
|
|
{{ 'notification.view-all' | translate }} |
|
|
|
</button> |
|
|
|
</section> |
|
|
|
</ng-container> |
|
|
|
<ng-template #emptyNotification> |
|
|
|
<img src="assets/notification-bell.svg" alt="empty notification" style="margin: 20px 24%"> |
|
|
|
<span style="text-align: center; margin-bottom: 12px" translate>notification.no-notifications-yet</span> |
|
|
|
</ng-template> |
|
|
|
<ng-template #loadingNotification> |
|
|
|
<div class="tb-no-data-available" style="margin: 20px; gap: 16px;"> |
|
|
|
<mat-spinner color="accent" diameter="65" strokeWidth="4"></mat-spinner> |
|
|
|
<div class="tb-no-data-text" translate>notification.loading-notifications</div> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|