fix week_start settings typo

This commit is contained in:
Adam Piontek 2021-03-19 16:47:09 -04:00
parent 8957f2d1dd
commit 174876a62b

View file

@ -3,7 +3,6 @@ defmodule Shift73kWeb.UserLive.Settings.WeekStart do
alias Shift73k.EctoEnums.WeekdayEnum alias Shift73k.EctoEnums.WeekdayEnum
alias Shift73k.Accounts alias Shift73k.Accounts
# alias Shift73k.Accounts.User
@impl true @impl true
def update(%{current_user: user} = assigns, socket) do def update(%{current_user: user} = assigns, socket) do
@ -18,7 +17,7 @@ defmodule Shift73kWeb.UserLive.Settings.WeekStart do
WeekdayEnum.__enum_map__() |> Enum.map(fn {d, n} -> {Timex.day_name(n), d} end) WeekdayEnum.__enum_map__() |> Enum.map(fn {d, n} -> {Timex.day_name(n), d} end)
end end
@iml true @impl true
def handle_event("changed", %{"calendar_view" => %{"week_start_at" => day}}, socket) do def handle_event("changed", %{"calendar_view" => %{"week_start_at" => day}}, socket) do
{:noreply, assign(socket, form_week_start_at: String.to_existing_atom(day))} {:noreply, assign(socket, form_week_start_at: String.to_existing_atom(day))}
end end