feat: add validation for same-interval membership fee type changes
This commit is contained in:
parent
6763d4f2eb
commit
7994303166
4 changed files with 347 additions and 3 deletions
|
|
@ -178,6 +178,11 @@ defmodule Mv.Membership.Member do
|
|||
where [changing(:user)]
|
||||
end
|
||||
|
||||
# Validate that membership fee type changes only allow same-interval types
|
||||
change Mv.MembershipFees.Changes.ValidateSameInterval do
|
||||
where [changing(:membership_fee_type_id)]
|
||||
end
|
||||
|
||||
# Auto-calculate membership_fee_start_date when membership_fee_type_id is set
|
||||
# and membership_fee_start_date is not already set
|
||||
change Mv.MembershipFees.Changes.SetMembershipFeeStartDate do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue