add used filtering to container show page

This commit is contained in:
2022-11-07 00:37:53 -05:00
parent 36a0a1c6c8
commit 9e386f1631
15 changed files with 114 additions and 36 deletions

View File

@@ -212,6 +212,7 @@ defmodule Cannery.Containers do
container
|> Repo.preload(:ammo_groups)
|> Map.fetch!(:ammo_groups)
|> Enum.reject(fn %{count: count} -> count == 0 end)
|> Enum.count()
end