notification

This commit is contained in:
insanity 2018-05-25 12:51:42 +09:00
parent ab6a38fbcf
commit 1a76ce57a2
5 changed files with 1825 additions and 1822 deletions

View File

@ -3,7 +3,7 @@
<button type="button" label="Mark all as read" pButton class="ui-button-width-fit" (click)="onMarkAllAsRead()"></button>
</div>
<p-table [value]="notifications" selectionMode="single" (onRowSelect)="onRowSelect($event)" >
<p-table [value]="notificationPage.content" selectionMode="single" (onRowSelect)="onRowSelect($event)" >
<ng-template pTemplate="header">
<tr>
<th style="width:9em">Date</th>

View File

@ -1,5 +1,6 @@
import { Component, Input } from '@angular/core';
import { Notification } from '@overflow/commons-typescript/model/notification';
import { Page } from '@overflow/commons-typescript/model/commons/Page';
@Component({
selector: 'of-notification-list',
@ -7,7 +8,7 @@ import { Notification } from '@overflow/commons-typescript/model/notification';
})
export class NotificationListComponent {
@Input() notifications: Notification[];
@Input() notificationPage: Page<Notification>;
constructor(
) { }

View File

@ -1 +1 @@
<of-notification-list [notifications]="notifications$ | async"></of-notification-list>
<of-notification-list [notificationPage]="notificationPage$ | async"></of-notification-list>

View File

@ -8,18 +8,20 @@ import { NotificationSelector } from '../../store';
import { AuthSelector } from '../../../member/store';
import { Member } from '@overflow/commons-typescript/model/member';
import { PageParams } from '@overflow/commons-typescript/model/commons/PageParams';
import { Page } from '@overflow/commons-typescript/model/commons/Page';
import { Notification } from '@overflow/commons-typescript/model/notification';
@Component({
selector: 'of-notification-container',
templateUrl: './list-container.component.html',
})
export class NotificationListContainerComponent implements OnInit {
notifications$: Observable<Notification[]>;
notificationPage$: Observable<Page<Notification>>;
constructor(
private store: Store<ListStore.State>,
) {
this.notifications$ = store.pipe(select(NotificationSelector.select('notifications')));
this.notificationPage$ = store.pipe(select(NotificationSelector.select('page')));
}
ngOnInit() {

3634
package-lock.json generated

File diff suppressed because it is too large Load Diff