2018-04-19 12:24:45 +00:00
|
|
|
<h1>Notifications</h1>
|
2018-04-22 11:10:12 +00:00
|
|
|
<div class="ui-g-12" dir="rtl">
|
|
|
|
<button type="button" label="Mark all as read" pButton class="ui-button-width-fit" (click)="onMarkAllAsRead()"></button>
|
2018-04-24 05:31:20 +00:00
|
|
|
</div>
|
2018-04-20 07:24:19 +00:00
|
|
|
|
2018-04-24 05:31:20 +00:00
|
|
|
<p-table [value]="notifications" selectionMode="single" (onRowSelect)="onRowSelect($event)" >
|
2018-04-25 11:14:54 +00:00
|
|
|
<ng-template pTemplate="header">
|
|
|
|
<tr>
|
|
|
|
<th style="width:9em">Date</th>
|
|
|
|
<th style="width:12em">Title</th>
|
|
|
|
<th pResizableColumn>Message</th>
|
|
|
|
<th style="width:8em">User</th>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
<ng-template pTemplate="body" let-notification let-rowIndex="rowIndex" >
|
2018-04-19 12:24:45 +00:00
|
|
|
<tr [pSelectableRow]="notification" [ngStyle]="notification.confirmDate ? '' : {'background-color': 'lightblue'}">
|
|
|
|
<td>{{notification.createDate | date: 'dd/MM/yyyy'}}</td>
|
|
|
|
<td>{{notification.title}}</td>
|
|
|
|
<td>{{notification.message}}</td>
|
|
|
|
<td>{{notification.member.name}}</td>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
</p-table>
|
|
|
|
<p-paginator [rows]="pageSize" [totalRecords]="totalLength" (onPageChange)="onPaging($event)"></p-paginator>
|