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%">Role</th>
<th style="width:20%">Created At</th>
<th style="width:20%">Updated At</th>
<th style="width:20%">Action</th>
</tr>
</thead>
@@ -26,6 +27,7 @@
<td><%= link_to employee.name,settings_employee_path(employee) %></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>
<%= link_to 'Edit', edit_settings_employee_path(employee) %>
<%if employee.role != "administrator"%>

View File

@@ -2,7 +2,7 @@
<ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li>
<li><a href="<%= settings_employees_path %>">Employee</a></li>
<span style="float: right">
</span>
</ul>
@@ -15,7 +15,8 @@
<tr>
<th>Name</th>
<th>Role</th>
<th>Created At</th>
<th>Updated At</th>
<th>Action</th>
</tr>
</thead>
@@ -24,6 +25,8 @@
<tr>
<td><%= @employee.name %></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>
<%= link_to 'Edit', edit_settings_employee_path(@employee) %>
</td>
@@ -34,4 +37,3 @@
</div>
</div>