notification bug fix

This commit is contained in:
insanity 2018-04-20 18:54:50 +09:00
parent 1547cce9c8
commit e8cf16e8d8
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
<a *ngIf="i < 5" href="javascript:void(0)" class="topbar-message" (click)="onNotiClick(noti)" [ngStyle]="noti.confirmDate ? '' : {'background-color': 'lightblue'}"> <a *ngIf="i < 5" href="javascript:void(0)" class="topbar-message" (click)="onNotiClick(noti)" [ngStyle]="noti.confirmDate ? '' : {'background-color': 'lightblue'}">
<span>{{noti.title}}</span> <span>{{noti.title}}</span>
<span>{{noti.message}}</span> <span>{{noti.message}}</span>
<span>{{noti.createDate | date: 'short'}}</span>
</a> </a>
</li> </li>
<li role="menuitem"> <li role="menuitem">

View File

@ -76,6 +76,8 @@ export class AppNotificationComponent implements OnInit, AfterContentInit {
this.router.navigate(['notification']); this.router.navigate(['notification']);
} }
noNotiClick() { onNotiClick(notification: Notification) {
this.detailStore.dispatch(new DetailStore.MarkAsRead(notification));
alert('Will redirect to ' + notification.url);
} }
} }