refactor: Use submit_form wrapper in all LiveView forms
- Replace AshPhoenix.Form.submit with submit_form/3 wrapper - Import current_actor and submit_form from LiveHelpers - Consistent actor handling in all form submissions
This commit is contained in:
parent
897677a782
commit
77ae5c4888
7 changed files with 22 additions and 13 deletions
|
|
@ -63,7 +63,9 @@ defmodule MvWeb.MembershipFeeSettingsLive do
|
|||
Map.put(params, "include_joining_cycle", false)
|
||||
end
|
||||
|
||||
case AshPhoenix.Form.submit(socket.assigns.form, params: normalized_params) do
|
||||
actor = MvWeb.LiveHelpers.current_actor(socket)
|
||||
|
||||
case MvWeb.LiveHelpers.submit_form(socket.assigns.form, normalized_params, actor) do
|
||||
{:ok, updated_settings} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue