Client: display created user date
authorChocobozzz <florian.bigard@gmail.com>
Fri, 23 Sep 2016 15:20:15 +0000 (17:20 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Fri, 23 Sep 2016 15:20:15 +0000 (17:20 +0200)
client/src/app/admin/users/user-list/user-list.component.html
client/src/app/shared/users/user.model.ts

index 2ef9ea0e0af14a4463c4784199cd27bc129bcea9..328b1be77d2b3217cbc012f7df4738e3cfba3ffc 100644 (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>
index 0f34d4480faf4e176b5927b2d3269a6aee840200..b775cb8e7bc08c6321920907e4708a4fc0f1a18a 100644 (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() {