feat(member): let members tailor overview density and visible columns
The View dropdown drives row density and whether the Member and Address fields render as composite cells or split into their underlying columns; the column manager toggles visibility and resets to the curated default. All choices persist per browser through the URL/session/cookie/global chain, so a saved layout survives reloads without a per-account store.
This commit is contained in:
parent
af2cc2e0d4
commit
dfc616257d
21 changed files with 1643 additions and 263 deletions
|
|
@ -69,12 +69,13 @@ defmodule MvWeb.Components.FieldVisibilityDropdownComponent do
|
|||
<.dropdown_menu
|
||||
id="field-visibility-menu"
|
||||
icon="hero-adjustments-horizontal"
|
||||
button_label={gettext("Show/Hide Columns")}
|
||||
button_label={gettext("Columns")}
|
||||
items={@all_items}
|
||||
checkboxes={true}
|
||||
selected={@selected_fields}
|
||||
open={@open}
|
||||
show_select_buttons={true}
|
||||
show_reset_button={true}
|
||||
phx_target={@myself}
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -115,6 +116,13 @@ defmodule MvWeb.Components.FieldVisibilityDropdownComponent do
|
|||
{:noreply, assign(socket, :selected_fields, all)}
|
||||
end
|
||||
|
||||
# reset to the curated default column set (the parent owns the settings needed
|
||||
# to compute the default, so it recomputes and re-applies the selection)
|
||||
def handle_event("reset_fields", _params, socket) do
|
||||
send(self(), {:fields_reset})
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
# select none
|
||||
def handle_event("select_none", _params, socket) do
|
||||
none =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue