Rename cycle button to Show Last/Current Cycle Payment Status

Update button text and styling to match PaymentFilterComponent.
Button now shows active state when filter is applied.
This commit is contained in:
Moritz 2025-12-18 13:10:49 +01:00
parent c65b3808bf
commit adb107e6a4
Signed by: moritz
GPG key ID: 1020A035E5DD0824
2 changed files with 8 additions and 10 deletions

View file

@ -47,18 +47,16 @@
type="button"
phx-click="toggle_cycle_view"
class={[
"btn btn-sm",
if(@show_current_cycle, do: "btn-primary", else: "btn-outline")
"btn btn-sm btn-outline gap-2",
@cycle_status_filter && "btn-active"
]}
aria-label={
if(@show_current_cycle,
do: gettext("Show last completed cycle"),
else: gettext("Show current cycle")
)
}
aria-label={gettext("Show Last/Current Cycle Payment Status")}
title={gettext("Show Last/Current Cycle Payment Status")}
>
<.icon name="hero-arrow-path" class="size-4" />
{if(@show_current_cycle, do: gettext("Current Cycle"), else: gettext("Last Cycle"))}
<span class="hidden sm:inline">
{gettext("Show Last/Current Cycle Payment Status")}
</span>
</button>
</div>
<.live_component

View file

@ -362,7 +362,7 @@ defmodule MvWeb.MemberLive.Index.MembershipFeeStatusTest do
filtered = MembershipFeeStatus.filter_unpaid_members(members, false)
# Both members have no cycles, so both should be filtered out
assert length(filtered) == 0
assert Enum.empty?(filtered)
end
end
end