Commit graph

6 commits

Author SHA1 Message Date
260a3264c9 feat: improve error handling in CycleGenerator
- Handle Task crashes in async_stream with {:exit, reason}
- Return {:error, {:partial_failure, successes, errors}} when some cycles fail
- Previously returned {:ok, successful} even on partial failures
- Improves debuggability and allows callers to handle partial failures
2025-12-16 15:07:06 +01:00
04b14536f9 feat: include inactive members in batch cycle generation
- Remove exit_date filter from generate_cycles_for_all_members query
- Inactive members now get cycles generated up to their exit_date
- Add tests for inactive member processing and exit_date boundary
- Document exit_date == cycle_start behavior (cycle still generated)
2025-12-16 15:07:06 +01:00
a644a32cab feat: implement automatic cycle generation for members
- Add CycleGenerator module with advisory lock mechanism
- Add SetMembershipFeeStartDate change for auto-calculation
- Extend Settings with include_joining_cycle and default_membership_fee_type_id
- Add scheduled job skeleton for future Oban integration
2025-12-16 15:07:06 +01:00
847739f581 docs: fix CalendarCycles documentation to match actual implementation 2025-12-16 15:07:06 +01:00
3af3319a86 refactor: improve CalendarCycles API and tests based on code review 2025-12-16 15:07:06 +01:00
bd4c1b69e1 feat: implement calendar-based cycle calculation functions
Add CalendarCycles module with functions for all interval types.
Includes comprehensive tests for edge cases.
2025-12-16 15:07:06 +01:00