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
|
|
@ -1,8 +1,9 @@
|
|||
defmodule MvWeb.MemberLive.IndexDefaultColumnsTest do
|
||||
@moduledoc """
|
||||
§1.2 — With no persisted column selection, exactly the curated default columns
|
||||
are visible: selection checkbox, Name (name + email), Address (composite),
|
||||
fee type, fee status, groups, join date.
|
||||
are visible: selection checkbox, Name (composite, no in-cell email line),
|
||||
E-Mail (its own column while the compact Member field keeps the email line off),
|
||||
Address (composite), fee type, fee status, groups, join date.
|
||||
"""
|
||||
use MvWeb.ConnCase, async: false
|
||||
|
||||
|
|
@ -34,6 +35,8 @@ defmodule MvWeb.MemberLive.IndexDefaultColumnsTest do
|
|||
# Composite Name + Address cells.
|
||||
assert has_element?(view, "[data-testid='member-name']")
|
||||
assert has_element?(view, "[data-testid='member-address']")
|
||||
# E-Mail is its own column by default (compact Member field, email line off).
|
||||
assert has_element?(view, "[data-testid='email']")
|
||||
# Fee type, fee status, groups, join date headers.
|
||||
assert has_element?(view, "[data-testid='membership_fee_type']")
|
||||
assert has_element?(view, "[data-testid='join_date']")
|
||||
|
|
@ -44,7 +47,9 @@ defmodule MvWeb.MemberLive.IndexDefaultColumnsTest do
|
|||
test "the individual name/address sub-fields are hidden by default", %{conn: conn} do
|
||||
{:ok, view, _html} = live(conn, ~p"/members")
|
||||
|
||||
for field <- ~w(first_name last_name email city street house_number postal_code country) do
|
||||
# The composite Name/Address cells replace their constituents by default.
|
||||
# E-Mail is excluded here: it is a default-visible column of its own.
|
||||
for field <- ~w(first_name last_name city street house_number postal_code country) do
|
||||
refute has_element?(view, "[data-testid='#{field}']")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue