Skip to content

Commit

Permalink
fix after feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansalamon committed Sep 15, 2023
1 parent dae598b commit 4b704bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/haj_web/live/apply_live/complete.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ defmodule HajWeb.ApplyLive.Complete do
</.inputs_for>
<.input
:if={length(Map.keys(@show_groups)) > 1}
field={@form[:ranking]}
type="textarea"
label="Eftersom du söker flera grupper: Rangordna vilka grupper du helst vill vara med i"
label={"Eftersom du söker flera grupper (#{group_names(@show_groups)}): Rangordna vilka grupper du helst vill vara med i"}
/>
<.input field={@form[:other]} type="textarea" label="Har du något övrigt på hjärtat?" />
Expand All @@ -126,4 +127,9 @@ defmodule HajWeb.ApplyLive.Complete do
</div>
"""
end

defp group_names(show_groups) do
Enum.map(show_groups, fn {_, sg} -> sg.group.name end)
|> Enum.join(", ")
end
end

0 comments on commit 4b704bc

Please sign in to comment.