Merge branch 'main' into feature/223_memberfields_settings
This commit is contained in:
commit
909d4af2a2
121 changed files with 20360 additions and 2522 deletions
|
|
@ -6,7 +6,7 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
|
|||
- Create new custom field definitions
|
||||
- Edit existing custom fields
|
||||
- Select value type from supported types
|
||||
- Set immutable and required flags
|
||||
- Set required flag
|
||||
- Real-time validation
|
||||
|
||||
## Props
|
||||
|
|
@ -50,10 +50,10 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
|
|||
label={gettext("Value type")}
|
||||
options={
|
||||
Ash.Resource.Info.attribute(Mv.Membership.CustomField, :value_type).constraints[:one_of]
|
||||
|> Enum.map(fn type -> {MvWeb.Translations.FieldTypes.label(type), type} end)
|
||||
}
|
||||
/>
|
||||
<.input field={@form[:description]} type="text" label={gettext("Description")} />
|
||||
<.input field={@form[:immutable]} type="checkbox" label={gettext("Immutable")} />
|
||||
<.input field={@form[:required]} type="checkbox" label={gettext("Required")} />
|
||||
<.input
|
||||
field={@form[:show_in_overview]}
|
||||
|
|
@ -66,7 +66,7 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
|
|||
{gettext("Cancel")}
|
||||
</.button>
|
||||
<.button phx-disable-with={gettext("Saving...")} variant="primary">
|
||||
{gettext("Save Custom field")}
|
||||
{gettext("Save Custom Field")}
|
||||
</.button>
|
||||
</div>
|
||||
</.form>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do
|
|||
## Features
|
||||
- List all custom fields
|
||||
- Display type information (name, value type, description)
|
||||
- Show immutable and required flags
|
||||
- Show required flag
|
||||
- Create new custom fields
|
||||
- Edit existing custom fields
|
||||
- Delete custom fields with confirmation (cascades to all custom field values)
|
||||
|
|
@ -29,7 +29,7 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do
|
|||
phx-click="new_custom_field"
|
||||
phx-target={@myself}
|
||||
>
|
||||
<.icon name="hero-plus" /> {gettext("New Custom field")}
|
||||
<.icon name="hero-plus" /> {gettext("New Custom Field")}
|
||||
</.button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue