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>
|
<button type="button" label="Mark all as read" pButton class="ui-button-width-fit" (click)="onMarkAllAsRead()"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p-table [value]="notifications" selectionMode="single" (onRowSelect)="onRowSelect($event)" >
|
<p-table [value]="notificationPage.content" selectionMode="single" (onRowSelect)="onRowSelect($event)" >
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:9em">Date</th>
|
<th style="width:9em">Date</th>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { Notification } from '@overflow/commons-typescript/model/notification';
|
import { Notification } from '@overflow/commons-typescript/model/notification';
|
||||||
|
import { Page } from '@overflow/commons-typescript/model/commons/Page';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'of-notification-list',
|
selector: 'of-notification-list',
|
||||||
|
@ -7,7 +8,7 @@ import { Notification } from '@overflow/commons-typescript/model/notification';
|
||||||
})
|
})
|
||||||
export class NotificationListComponent {
|
export class NotificationListComponent {
|
||||||
|
|
||||||
@Input() notifications: Notification[];
|
@Input() notificationPage: Page<Notification>;
|
||||||
|
|
||||||
constructor(
|
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 { AuthSelector } from '../../../member/store';
|
||||||
import { Member } from '@overflow/commons-typescript/model/member';
|
import { Member } from '@overflow/commons-typescript/model/member';
|
||||||
import { PageParams } from '@overflow/commons-typescript/model/commons/PageParams';
|
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({
|
@Component({
|
||||||
selector: 'of-notification-container',
|
selector: 'of-notification-container',
|
||||||
templateUrl: './list-container.component.html',
|
templateUrl: './list-container.component.html',
|
||||||
})
|
})
|
||||||
export class NotificationListContainerComponent implements OnInit {
|
export class NotificationListContainerComponent implements OnInit {
|
||||||
notifications$: Observable<Notification[]>;
|
notificationPage$: Observable<Page<Notification>>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<ListStore.State>,
|
private store: Store<ListStore.State>,
|
||||||
) {
|
) {
|
||||||
this.notifications$ = store.pipe(select(NotificationSelector.select('notifications')));
|
this.notificationPage$ = store.pipe(select(NotificationSelector.select('page')));
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
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