Add inserted and updated dates to list and show

This commit is contained in:
2023-05-20 18:29:16 +03:00
parent 6c3869706d
commit 5ef0cff56a
2 changed files with 14 additions and 0 deletions

View File

@@ -30,6 +30,8 @@
<th>Jäsen?</th> <th>Jäsen?</th>
<th>Kaksi laskua?</th> <th>Kaksi laskua?</th>
<th>Parilliset viikot</th> <th>Parilliset viikot</th>
<th>Lisätty</th>
<th>Viimeisin muutos</th>
<th></th> <th></th>
</tr> </tr>
@@ -49,6 +51,8 @@
<td><%= order.is_member %></td> <td><%= order.is_member %></td>
<td><%= order.split_invoice %></td> <td><%= order.split_invoice %></td>
<td><%= order.even_weeks %></td> <td><%= order.even_weeks %></td>
<td><%= order.inserted_at.day %>.<%= order.inserted_at.month %>.<%= order.inserted_at.year %></td>
<td><%= order.updated_at.day %>.<%= order.updated_at.month %>.<%= order.updated_at.year %></td>
<td> <td>
<span><%= live_redirect "Näytä", to: Routes.order_show_path(@socket, :show, order) %></span> <span><%= live_redirect "Näytä", to: Routes.order_show_path(@socket, :show, order) %></span>

View File

@@ -77,6 +77,16 @@
<%= @order.even_weeks %> <%= @order.even_weeks %>
</li> </li>
<li>
<strong>Lisätty:</strong>
<%= @order.inserted_at.day %>.<%= @order.inserted_at.month %>.<%= @order.inserted_at.year %>
</li>
<li>
<strong>Viimeisin muutos:</strong>
<%= @order.updated_at.day %>.<%= @order.updated_at.month %>.<%= @order.updated_at.year %>
</li>
</ul> </ul>
<span><%= live_patch "Muokkaa", to: Routes.order_show_path(@socket, :edit, @order), class: "button" %></span> | <span><%= live_patch "Muokkaa", to: Routes.order_show_path(@socket, :edit, @order), class: "button" %></span> |