Commit graph

6 commits

Author SHA1 Message Date
446f75bcc1
fix: remove unused variable warning in ValidateSameInterval 2025-12-15 12:40:31 +01:00
28b2be1125
fix: prevent nil assignment for membership_fee_type_id
Reject attempts to set membership_fee_type_id to nil when a current type
exists.
2025-12-15 12:39:29 +01:00
032db2a4ba
fix: implement fail-closed behavior in ValidateSameInterval
Change validation to fail closed instead of fail open when types cannot
be loaded. This prevents inconsistent data states and provides clearer
error messages to users.
2025-12-15 12:39:08 +01:00
e9c53cc520 refactor: reduce nesting depth and improve code readability
All checks were successful
continuous-integration/drone/push Build is passing
- Replace Enum.map |> Enum.join with Enum.map_join for efficiency
- Extract helper functions to reduce nesting depth from 4 to 2
- Rename is_current_cycle? to current_cycle? following Elixir conventions
2025-12-15 11:50:08 +01:00
06324d77c5
feat: regenerate cycles when membership fee type changes (same interval)
Some checks failed
continuous-integration/drone/push Build is failing
- Implemented regenerate_cycles_on_type_change helper in Member resource
- Cycles that haven't ended yet (cycle_end >= today) are deleted and regenerated
- Paid and suspended cycles remain unchanged (not deleted)
- CycleGenerator reloads member with new membership_fee_type_id
- Adjusted tests to work with current cycles only (no future cycles)
- All integration tests passing

Phase 4 completed: Cycle regeneration on type change
2025-12-15 11:39:26 +01:00
7994303166
feat: add validation for same-interval membership fee type changes 2025-12-15 11:35:48 +01:00