notification
This commit is contained in:
parent
ab6a38fbcf
commit
1a76ce57a2
|
@ -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>
|
||||
|
|
|
@ -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(
|
||||
) { }
|
||||
|
|
|
@ -1 +1 @@
|
|||
<of-notification-list [notifications]="notifications$ | async"></of-notification-list>
|
||||
<of-notification-list [notificationPage]="notificationPage$ | async"></of-notification-list>
|
||||
|
|
|
@ -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
3634
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user