add ammo type round totals and total rounds shot
This commit is contained in:
@ -28,6 +28,9 @@
|
||||
<%= field_name %>
|
||||
</th>
|
||||
<% end %>
|
||||
<th class="p-2">
|
||||
<%= gettext("Total # of rounds") %>
|
||||
</th>
|
||||
|
||||
<th class="p-2"></th>
|
||||
</tr>
|
||||
@ -46,6 +49,10 @@
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
<td class="p-2">
|
||||
<%= ammo_type |> Ammo.get_round_count_for_ammo_type(@current_user) %>
|
||||
</td>
|
||||
|
||||
<td class="p-2">
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<%= live_redirect to: Routes.ammo_type_show_path(Endpoint, :show, ammo_type),
|
||||
|
@ -73,6 +73,22 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<h3 class="title text-lg">
|
||||
<%= gettext("Current # of rounds:") %>
|
||||
</h3>
|
||||
|
||||
<span class="text-primary-600">
|
||||
<%= @ammo_type |> Ammo.get_round_count_for_ammo_type(@current_user) %>
|
||||
</span>
|
||||
|
||||
<h3 class="title text-lg">
|
||||
<%= gettext("Total rounds shot:") %>
|
||||
</h3>
|
||||
|
||||
<span class="text-primary-600">
|
||||
<%= @ammo_type |> Ammo.get_used_count_for_ammo_type(@current_user) %>
|
||||
</span>
|
||||
|
||||
<%= if @avg_cost_per_round do %>
|
||||
<h3 class="title text-lg">
|
||||
<%= gettext("Average Price paid") %>:
|
||||
|
Reference in New Issue
Block a user