Client: display created user date

pull/10/head
Chocobozzz 2016-09-23 17:20:15 +02:00
parent d74a0680f7
commit b539c9b34c
2 changed files with 5 additions and 1 deletions

View File

@ -5,6 +5,7 @@
<tr>
<th class="table-column-id">ID</th>
<th>Username</th>
<th>Created Date</th>
<th class="text-right">Remove</th>
</tr>
</thead>
@ -13,6 +14,7 @@
<tr *ngFor="let user of users">
<td>{{ user.id }}</td>
<td>{{ user.username }}</td>
<td>{{ user.createdDate | date: 'medium' }}</td>
<td class="text-right">
<span class="glyphicon glyphicon-remove" *ngIf="!user.isAdmin()" (click)="removeUser(user)"></span>
</td>

View File

@ -2,11 +2,13 @@ export class User {
id: string;
username: string;
role: string;
createdDate: Date;
constructor(hash: { id: string, username: string, role: string }) {
constructor(hash: { id: string, username: string, role: string, createdDate: Date }) {
this.id = hash.id;
this.username = hash.username;
this.role = hash.role;
this.createdDate = hash.createdDate;
}
isAdmin() {