mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 02:35:42 +00:00
fix(Map): Fix 'Allow only tracked characters' saving
This commit is contained in:
@@ -393,6 +393,7 @@ defmodule WandererAppWeb.CoreComponents do
|
|||||||
data-pc-name="checkbox"
|
data-pc-name="checkbox"
|
||||||
data-pc-section="root"
|
data-pc-section="root"
|
||||||
>
|
>
|
||||||
|
<input type="hidden" name={@name} value="false" disabled={@rest[:disabled]} />
|
||||||
<input
|
<input
|
||||||
id={@id}
|
id={@id}
|
||||||
name={@name}
|
name={@name}
|
||||||
|
|||||||
@@ -203,7 +203,10 @@ defmodule WandererAppWeb.MapsLive do
|
|||||||
socket.assigns.form,
|
socket.assigns.form,
|
||||||
form
|
form
|
||||||
|> Map.put("acls", form["acls"] || [])
|
|> Map.put("acls", form["acls"] || [])
|
||||||
|> Map.put("only_tracked_characters", form["only_tracked_characters"] || false)
|
|> Map.put(
|
||||||
|
"only_tracked_characters",
|
||||||
|
(form["only_tracked_characters"] || "false") |> String.to_existing_atom()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
{:noreply, socket |> assign(form: form)}
|
{:noreply, socket |> assign(form: form)}
|
||||||
@@ -593,7 +596,13 @@ defmodule WandererAppWeb.MapsLive do
|
|||||||
scope -> scope
|
scope -> scope
|
||||||
end
|
end
|
||||||
|
|
||||||
form = form |> Map.put("scope", scope)
|
form =
|
||||||
|
form
|
||||||
|
|> Map.put("scope", scope)
|
||||||
|
|> Map.put(
|
||||||
|
"only_tracked_characters",
|
||||||
|
(form["only_tracked_characters"] || "false") |> String.to_existing_atom()
|
||||||
|
)
|
||||||
|
|
||||||
map
|
map
|
||||||
|> WandererApp.Api.Map.update(form)
|
|> WandererApp.Api.Map.update(form)
|
||||||
|
|||||||
Reference in New Issue
Block a user