Member index: rename cycle toggle, add tooltip

This commit is contained in:
Moritz 2026-03-04 14:50:30 +01:00
parent 52228ca5d5
commit 60d3fa74fb
Signed by: moritz
GPG key ID: 1020A035E5DD0824

View file

@ -54,33 +54,36 @@
boolean_filters={@boolean_custom_field_filters} boolean_filters={@boolean_custom_field_filters}
member_count={length(@members)} member_count={length(@members)}
/> />
<.button <.tooltip
type="button" content={
variant="secondary" gettext(
class={["gap-2", @show_current_cycle && "btn-active"]} "Sets whether the payment status filter and the membership fee status column use the last completed or the current payment cycle."
phx-click="toggle_cycle_view"
data-testid="toggle-cycle-view"
aria-label={
if(@show_current_cycle,
do: gettext("Current Cycle Payment Status"),
else: gettext("Last Cycle Payment Status")
)
}
title={
if(@show_current_cycle,
do: gettext("Current Cycle Payment Status"),
else: gettext("Last Cycle Payment Status")
) )
} }
position="top"
> >
<.icon name="hero-arrow-path" class="h-5 w-5" /> <.button
<span class="hidden sm:inline"> type="button"
{if(@show_current_cycle, variant="secondary"
do: gettext("Current Cycle Payment Status"), class={["gap-2", @show_current_cycle && "btn-active"]}
else: gettext("Last Cycle Payment Status") phx-click="toggle_cycle_view"
)} data-testid="toggle-cycle-view"
</span> aria-label={
</.button> if(@show_current_cycle,
do: gettext("Current payment cycle"),
else: gettext("Last payment cycle")
)
}
>
<.icon name="hero-arrow-path" class="h-5 w-5" />
<span class="hidden sm:inline">
{if(@show_current_cycle,
do: gettext("Current payment cycle"),
else: gettext("Last payment cycle")
)}
</span>
</.button>
</.tooltip>
<.live_component <.live_component
module={MvWeb.Components.FieldVisibilityDropdownComponent} module={MvWeb.Components.FieldVisibilityDropdownComponent}
id="field-visibility-dropdown" id="field-visibility-dropdown"