Hide Regenerate Cycles button when no membership fee type assigned
All checks were successful
continuous-integration/drone/push Build is passing
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:
parent
c035d0f141
commit
7eba21dc9c
2 changed files with 13 additions and 3 deletions
|
|
@ -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: "")]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue