fix(elixir): improve storage location UI
- modify UI and UX to match categories system
This commit is contained in:
@@ -348,6 +348,15 @@ defmodule ComponentsElixir.Inventory do
|
||||
|> Repo.aggregate(:count, :id)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Counts components in a specific storage location.
|
||||
"""
|
||||
def count_components_in_storage_location(storage_location_id) do
|
||||
Component
|
||||
|> where([c], c.storage_location_id == ^storage_location_id)
|
||||
|> Repo.aggregate(:count, :id)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Increment component stock count.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user