Hide Regenerate Cycles button when no membership fee type assigned
All checks were successful
continuous-integration/drone/push Build is passing

- Button only shown when @member.membership_fee_type is set (same as Create Cycle).
- Test: no-type view asserts Regenerate Cycles button is not present.
This commit is contained in:
Moritz 2026-02-04 09:38:26 +01:00
parent c035d0f141
commit 7eba21dc9c
2 changed files with 13 additions and 3 deletions

View file

@ -53,7 +53,7 @@ defmodule MvWeb.MemberLive.Show.MembershipFeesComponent do
<%!-- Action Buttons (only when user has permission) --%>
<div class="flex gap-2 mb-4">
<.button
:if={@can_create_cycle}
:if={@member.membership_fee_type != nil and @can_create_cycle}
phx-click="regenerate_cycles"
phx-target={@myself}
class={["btn btn-sm btn-outline", if(@regenerating, do: "btn-disabled", else: "")]}