feat(overview): replace filter panel with add-filter builder and aging column
Swaps the unbounded vertical filter panel for a Polaris-style add-filter builder (searchable grouped field picker, type-aware value control, applied chips) and colour-codes the fees column with each member's period-scoped unpaid-cycle count.
This commit is contained in:
parent
7d1a71b1fd
commit
c547ca19af
35 changed files with 2817 additions and 3149 deletions
39
test/mv_web/member_live/index_date_presets_test.exs
Normal file
39
test/mv_web/member_live/index_date_presets_test.exs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
defmodule MvWeb.MemberLive.IndexDatePresetsTest do
|
||||
@moduledoc """
|
||||
§1.8 — a date field's value control offers presets; picking "This year"
|
||||
applies the Jan 1 – Dec 31 range of the current year and writes the equivalent
|
||||
range params to the URL.
|
||||
"""
|
||||
use MvWeb.ConnCase, async: false
|
||||
|
||||
import Phoenix.LiveViewTest
|
||||
|
||||
setup %{conn: conn} do
|
||||
actor = Mv.Helpers.SystemActor.get_system_actor()
|
||||
|
||||
{:ok, _member} =
|
||||
Mv.Membership.create_member(
|
||||
%{first_name: "Preset", last_name: "Member", email: "preset@example.com"},
|
||||
actor: actor
|
||||
)
|
||||
|
||||
%{conn: conn_with_oidc_user(conn)}
|
||||
end
|
||||
|
||||
test "the 'This year' preset applies the current-year range and writes URL params", %{
|
||||
conn: conn
|
||||
} do
|
||||
{:ok, view, _html} = live(conn, ~p"/members")
|
||||
|
||||
# Open the Join date value control and apply the "This year" preset.
|
||||
pick_field(view, "join_date")
|
||||
assert has_element?(view, "[data-testid='date-presets']")
|
||||
|
||||
view |> element("[data-testid='date-preset-this_year']") |> render_click()
|
||||
|
||||
path = assert_patch(view)
|
||||
year = Date.utc_today().year
|
||||
assert path =~ "jd_from=#{year}-01-01"
|
||||
assert path =~ "jd_to=#{year}-12-31"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue