25 lines
1.1 KiB
HTML
Raw Normal View History

2018-04-19 21:24:45 +09:00
<h1>Notifications</h1>
2018-04-22 20:10:12 +09: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 14:31:20 +09:00
</div>
2018-04-20 16:24:19 +09:00
2018-04-24 14:31:20 +09:00
<p-table [value]="notifications" selectionMode="single" (onRowSelect)="onRowSelect($event)" >
2018-04-25 20:14:54 +09: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 21:24:45 +09: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>