sort clothes
This commit is contained in:
parent
c732621ae4
commit
06f7ec47f1
|
@ -31,6 +31,9 @@ defmodule PokemonCoutureWeb.ClothesTrackerLive do
|
|||
|
||||
def inner_map_creator({type, list}, acc) do
|
||||
clothes_map = Enum.reduce(list, %{}, &assign_clothespiece_to_map/2)
|
||||
clothes_map = for {shop, map} <- clothes_map
|
||||
do {shop, Enum.sort_by(map, fn %Clothes{game: game} -> game end)}
|
||||
end
|
||||
Map.put(acc, type, clothes_map)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue