improve ActivityLog.list_shot_records

This commit is contained in:
2023-06-05 21:47:03 -04:00
parent 9643e9f46d
commit 7e55446b3e
5 changed files with 44 additions and 46 deletions

View File

@ -120,7 +120,7 @@ defmodule CanneryWeb.RangeLive.Index do
defp display_shot_records(
%{assigns: %{class: class, search: search, current_user: current_user}} = socket
) do
shot_records = ActivityLog.list_shot_records(search, class, current_user)
shot_records = ActivityLog.list_shot_records(current_user, search: search, class: class)
packs = Ammo.list_packs(current_user, staged: true)
chart_data = shot_records |> get_chart_data_for_shot_record()
original_counts = packs |> Ammo.get_original_counts(current_user)