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:
parent
c65b3808bf
commit
adb107e6a4
2 changed files with 8 additions and 10 deletions
|
|
@ -47,18 +47,16 @@
|
||||||
type="button"
|
type="button"
|
||||||
phx-click="toggle_cycle_view"
|
phx-click="toggle_cycle_view"
|
||||||
class={[
|
class={[
|
||||||
"btn btn-sm",
|
"btn btn-sm btn-outline gap-2",
|
||||||
if(@show_current_cycle, do: "btn-primary", else: "btn-outline")
|
@cycle_status_filter && "btn-active"
|
||||||
]}
|
]}
|
||||||
aria-label={
|
aria-label={gettext("Show Last/Current Cycle Payment Status")}
|
||||||
if(@show_current_cycle,
|
title={gettext("Show Last/Current Cycle Payment Status")}
|
||||||
do: gettext("Show last completed cycle"),
|
|
||||||
else: gettext("Show current cycle")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<.icon name="hero-arrow-path" class="size-4" />
|
<.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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<.live_component
|
<.live_component
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ defmodule MvWeb.MemberLive.Index.MembershipFeeStatusTest do
|
||||||
filtered = MembershipFeeStatus.filter_unpaid_members(members, false)
|
filtered = MembershipFeeStatus.filter_unpaid_members(members, false)
|
||||||
|
|
||||||
# Both members have no cycles, so both should be filtered out
|
# Both members have no cycles, so both should be filtered out
|
||||||
assert length(filtered) == 0
|
assert Enum.empty?(filtered)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue