add Updated_at to Employee Listing

This commit is contained in:
Phyo
2017-08-14 14:04:39 +06:30
parent a870423e7d
commit 497a1b60f7
2 changed files with 7 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
<th style="width:20%">Name</th> <th style="width:20%">Name</th>
<th style="width:20%">Role</th> <th style="width:20%">Role</th>
<th style="width:20%">Created At</th> <th style="width:20%">Created At</th>
<th style="width:20%">Updated At</th>
<th style="width:20%">Action</th> <th style="width:20%">Action</th>
</tr> </tr>
</thead> </thead>
@@ -26,6 +27,7 @@
<td><%= link_to employee.name,settings_employee_path(employee) %></td> <td><%= link_to employee.name,settings_employee_path(employee) %></td>
<td><%= employee.role %></td> <td><%= employee.role %></td>
<td><%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td> <td><%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td><%= employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td> <td>
<%= link_to 'Edit', edit_settings_employee_path(employee) %> <%= link_to 'Edit', edit_settings_employee_path(employee) %>
<%if employee.role != "administrator"%> <%if employee.role != "administrator"%>

View File

@@ -15,7 +15,8 @@
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Role</th> <th>Role</th>
<th>Created At</th>
<th>Updated At</th>
<th>Action</th> <th>Action</th>
</tr> </tr>
</thead> </thead>
@@ -24,6 +25,8 @@
<tr> <tr>
<td><%= @employee.name %></td> <td><%= @employee.name %></td>
<td><%= @employee.role %></td> <td><%= @employee.role %></td>
<td><%= @employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td><%= @employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td> <td>
<%= link_to 'Edit', edit_settings_employee_path(@employee) %> <%= link_to 'Edit', edit_settings_employee_path(@employee) %>
</td> </td>
@@ -34,4 +37,3 @@
</div> </div>
</div> </div>