Skip to content

Commit

Permalink
Formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
emielvdveen committed Oct 12, 2023
1 parent eb92ba4 commit da05703
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/systems/assignment/crew_page.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ defmodule Systems.Assignment.CrewPage do
|> update_menus()
end

defp update_selected_item_id(%{assigns: %{selected_item_id: selected_item_id}} = socket) when not is_nil(selected_item_id) do
defp update_selected_item_id(%{assigns: %{selected_item_id: selected_item_id}} = socket)
when not is_nil(selected_item_id) do
socket
end

Expand All @@ -73,9 +74,10 @@ defmodule Systems.Assignment.CrewPage do
socket |> assign(selected_item_id: selected_item_id)
end

defp update_selected_item(%{assigns: %{selected_item_id: selected_item_id, vm: %{items: items}}} = socket) do
selected_item =
Enum.find(items, fn {%{id: id}, _} -> id == selected_item_id end)
defp update_selected_item(
%{assigns: %{selected_item_id: selected_item_id, vm: %{items: items}}} = socket
) do
selected_item = Enum.find(items, fn {%{id: id}, _} -> id == selected_item_id end)

socket |> assign(selected_item: selected_item)
end
Expand Down

0 comments on commit da05703

Please sign in to comment.