Refactor admin UI structure #244

Merged
carla merged 4 commits from refactor-admin-settings-ui into main 2025-12-03 18:00:54 +01:00
2 changed files with 9 additions and 2 deletions
Showing only changes of commit 8ce89a7227 - Show all commits

View file

@ -22,7 +22,12 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
<div id={@id} class="mb-8 border shadow-xl card border-base-300">
<div class="card-body">
<div class="flex items-center gap-4 mb-4">
<.button type="button" phx-click="cancel" phx-target={@myself} aria-label={gettext("Back to custom field overview")}>
<.button
type="button"
phx-click="cancel"
phx-target={@myself}
aria-label={gettext("Back to custom field overview")}
>
<.icon name="hero-arrow-left" class="w-4 h-4" />
</.button>
<h3 class="card-title">

View file

@ -34,7 +34,9 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do
module={MvWeb.CustomFieldLive.FormComponent}
id={@form_id}
custom_field={@editing_custom_field}
on_save={fn custom_field, action -> send(self(), {:custom_field_saved, custom_field, action}) end}
on_save={
fn custom_field, action -> send(self(), {:custom_field_saved, custom_field, action}) end
}
on_cancel={fn -> send_update(__MODULE__, id: @id, show_form: false) end}
/>
</div>